https://github.com/dfinke/PSWeave
PSWeave: a PowerShell module bringing OpenAI's GPT to your fingertips, and simplified prompt engineering
https://github.com/dfinke/PSWeave
Last synced: about 2 months ago
JSON representation
PSWeave: a PowerShell module bringing OpenAI's GPT to your fingertips, and simplified prompt engineering
- Host: GitHub
- URL: https://github.com/dfinke/PSWeave
- Owner: dfinke
- License: mit
- Created: 2024-01-26T13:43:10.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-04T14:46:43.000Z (about 1 year ago)
- Last Synced: 2025-04-01T23:45:03.256Z (2 months ago)
- Language: PowerShell
- Homepage:
- Size: 26.2 MB
- Stars: 31
- Watchers: 6
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - dfinke/PSWeave - PSWeave: a PowerShell module bringing OpenAI's GPT to your fingertips, and simplified prompt engineering (PowerShell)
README
# PSWeave - Innovating automation
## 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:
```powershell
'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](https://platform.openai.com/signup) or [sign in](https://platform.openai.com/login).
2. Navigate to the [API key page](https://platform.openai.com/account/api-keys).
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](https://github.com/asheroto/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.