Prompt Garden - VS Code Extension
Your AI prompt library. Save prompts auto-formatted as steps, sync to GitHub Gist, and auto-append custom guidelines.
Features
- Prompt Library: Save and organize your favorite AI prompts
- Backlog: Keep track of ideas and thoughts you want to explore
- Prompt Suffix: Automatically append custom guidelines to every copied prompt
- GitHub Gist Sync: Backup and sync your prompts across devices using GitHub Gist
- Text Formatting: Toggle between sentence case and uppercase
- Auto-save: Automatically save changes to your local storage
- Import/Export: Export your prompts as JSON for backup or sharing
Installation
From Source
- Clone this repository
- Run
npm install to install dependencies
- Press F5 in VS Code to launch the Extension Development Host
- The extension will be available in the new window
From VSIX (when published)
- Download the
.vsix file
- In VS Code, go to Extensions view
- Click on "..." menu and select "Install from VSIX..."
- Select the downloaded
.vsix file
Usage
Opening Prompt Garden
- Click the Prompt Garden icon in the Activity Bar (left sidebar)
- Or use keyboard shortcut:
Alt+P
Syncing with GitHub Gist
- Click "Sign In" and enter your GitHub Personal Access Token
- Click "Export to Gist" to upload your prompts
- Click "Import from Gist" to download your prompts
Managing Prompts
- Add Prompt: Click the "Add Prompt" button
- Edit Prompt: Double-click on a prompt
- Delete Prompt: Select prompts and click "Delete"
- Copy Prompts: Select prompts and click "Copy" to copy to clipboard
Managing Backlog
- Add Thought: Type in the input field and click "Add Thought"
- Edit Thought: Double-click on a backlog item
- Delete Thoughts: Select items and click "Delete"
- Copy Thoughts: Select items and click "Copy" (ordered by selection)
Development
Setup
npm install
Testing
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Generate coverage report
npm run test:coverage
Packaging
# Install vsce globally
npm install -g @vscode/vsce
# Package extension
npm run package
Architecture
- Extension Host (
src/extension.js): Main extension logic running in Node.js
- Webview Provider (
src/webview-provider.js): Manages the webview panel UI
- Storage Manager (
src/lib/storage.js): Handles data persistence using VS Code globalState
- GitHub Auth (
src/lib/github-auth.js): Manages GitHub authentication
- Gist Sync (
src/lib/gist-sync.js): Handles GitHub Gist synchronization
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
| |