Skip to content

dfinke/PSWeave

Repository files navigation

PSWeave - Innovating automation

Alt text

In Action

There are 27+ ready to go prompts that you can pipe to. You can list them with: Weave -List

Then choose one and pipe to it. For example:

'arm templates, ansible, terraform, bicep' | CompareAndContrast 

Contrasts each of those IaC tools based on criteria GPT determines. The output is a markdown table. All controlled via the prompt, that you can tweak.

Arm Templates Bicep Ansible Terraform
Language JSON Bicep YAML HCL
Complexity High Low Medium Medium
Provisioning Yes Yes Yes Yes
Configuration Management No No Yes No
Cloud Compatibility Azure Azure Multi-Cloud Multi-Cloud
Community Support Good Growing Strong Strong
Learning Curve Steep Moderate Moderate Moderate

In Action

Check out the video below to see PSWeave in action.

Inspired by this Python implementation https://github.com/danielmiessler/fabric. Bootstrapped with the prompts from that repo.

Requirements

  • PSWeave will install the required module: Install-Module PowerShellAIAssistant - PowerShell integration to OpenAI

Configure OpenAI API Key

  1. Create an OpenAI account or sign in.
  2. Navigate to the API key page.
  3. Click "Create new secret key", optionally naming the key. Make sure to save this somewhere safe and do not share it with anyone.
  4. Set the environment variable OpenAIKey to your API key.
  5. Open a new PowerShell and type $ENV:OpenAIKey. If you do not see your API key, you may need to either restart your computer or use a script like Refresh-EnvironmentVariables for it to be detected.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to add or change.

About

PSWeave: a PowerShell module bringing OpenAI's GPT to your fingertips, and simplified prompt engineering

Resources

License

Stars

Watchers

Forks

Packages

No packages published