CLI Reference
PrivacyCode runs entirely in your terminal. No daemon, no background service.
Quick Start
# Install curl -fsSL https://getprivacycode.com/install | sh # Set your key export OPENAI_API_KEY=sk-... # Run privacycode
Commands
| Command | Description |
|---|---|
| privacycode | Start interactive session in current directory |
| privacycode <prompt> | Run a single prompt and exit |
| privacycode --model <id> | Start with a specific model |
| privacycode --provider <id> | Start with a specific provider |
Slash Commands
| Command | Description |
|---|---|
| /privacy on|off | Toggle Defender tokenization |
| /model <id> | Switch AI model |
| /provider <id> | Switch AI provider |
| /stats | Show token usage statistics |
| /vault | Show vault statistics |
| /clear | Clear conversation history |
| /exit | Quit |
File Mentions
Attach files to your prompt with @path/to/file:
privacycode> Look at @src/auth.js and fix the null check on line 42
Configuration
Config is resolved in order: CLI flags → environment variables → project config → global config.
// ~/.config/privacycode/config.json
{
"provider": "anthropic",
"model": "claude-sonnet-4-20250514"
}
Project-level config (place in your repo):
// ./privacycode.jsonc
{
"provider": "openai",
"model": "gpt-4o"
}
Environment Variables
| Variable | Description |
|---|---|
| OPENAI_API_KEY | OpenAI API key |
| ANTHROPIC_API_KEY | Anthropic API key |
| PRIVACYCODE_PROVIDER | Default provider name |
| PRIVACYCODE_MODEL | Default model name |