Drop-in LLM security for your applications - directly in VS Code.
- LLM SDK Detection: Automatically detects OpenAI, Anthropic, Cohere, and HuggingFace SDKs in your code
- Status Indicator: See PromptGuard status at a glance in the status bar
- One-Click Setup: Initialize PromptGuard with a single command
- Real-time Diagnostics: Get warnings when LLM SDKs are detected
- CLI Integration: Seamlessly wraps the PromptGuard CLI
- VS Code 1.80.0 or higher
- PromptGuard CLI installed (see Installation)
curl -fsSL https://raw.githubusercontent.com/acebot712/promptguard-cli/main/install.sh | shOr install manually from GitHub Releases.
- Open VS Code
- Go to Extensions (Cmd+Shift+X / Ctrl+Shift+X)
- Search for "PromptGuard"
- Click Install
Or install from the command line:
code --install-extension promptguard.promptguard-vscode- Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
- Run
PromptGuard: Initialize - Enter your API key when prompted
- Select providers (or press Escape to use all)
- Run
PromptGuard: Scan for LLM SDKsfrom Command Palette - View results in the Output channel
- Click the status bar indicator (bottom right)
- Or run
PromptGuard: Show Statusfrom Command Palette
- Run
PromptGuard: Apply Transformationsfrom Command Palette - Confirm the action
- Your code will be automatically transformed to use PromptGuard
If the CLI is not in your PATH, you can set a custom path:
- Open Settings (Cmd+, / Ctrl+,)
- Search for "PromptGuard"
- Set
PromptGuard: Cli Pathto the full path to the binary
Example: /usr/local/bin/promptguard or C:\Program Files\PromptGuard\promptguard.exe
PromptGuard: Initialize- Set up PromptGuard in your projectPromptGuard: Scan for LLM SDKs- Scan project for LLM SDK usagePromptGuard: Show Status- Display current configurationPromptGuard: Apply Transformations- Apply PromptGuard transformationsPromptGuard: Disable- Temporarily disable PromptGuardPromptGuard: Enable- Re-enable PromptGuard
The status bar shows:
- Active - PromptGuard is active and protecting your app
- Disabled - PromptGuard is temporarily disabled
- Not initialized - PromptGuard hasn't been set up yet
Click the status bar to view detailed status.
- TypeScript (
.ts,.tsx) - JavaScript (
.js,.jsx) - Python (
.py)
- OpenAI
- Anthropic
- Cohere
- HuggingFace
- Gemini (Google)
- Groq
If you see "CLI not found" errors:
- Verify the CLI is installed:
promptguard --version - Check it's in your PATH:
which promptguard(macOS/Linux) orwhere promptguard(Windows) - Set the
promptguard.cliPathsetting to the full path
- Check the Output channel: View → Output → Select "PromptGuard"
- Reload the window: Cmd+Shift+P → "Developer: Reload Window"
- Check VS Code version: Must be 1.80.0 or higher
Apache 2.0