docs / configuration
Configuration
The PromptConduit CLI reads its configuration from
~/.config/promptconduit/config.json, with environment
variables taking precedence over the file. Named environments let you
switch between local, staging, and production API keys with one command.
Set API Key
promptconduit config set --api-key="sk_your_key_here"
Most setups don't need this — promptconduit login saves your key via a
browser sign-in, and promptconduit init runs the full guided setup. Use
config set for CI or scripted environments.
Local-only
Capture works with no account. To stay local even after setting a key:
promptconduit config set --local-only=true # or at install time: promptconduit install claude-code --local-only
View Current Config
promptconduit config show promptconduit config path
Multi-Environment Setup
Manage separate keys for local development, staging, and production.
# Create environments promptconduit config env add local \ --api-key=sk_local_key \ --api-url=http://localhost:8787 \ --debug promptconduit config env add prod \ --api-key=sk_prod_key \ --api-url=https://api.promptconduit.dev # Switch environments promptconduit config env use local promptconduit config env use prod # List environments promptconduit config env list
After switching environments, start a new Claude Code session for hooks to pick up the change.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
PROMPTCONDUIT_API_KEY | Yes* | — | Your platform API key (*not required for local-only capture) |
PROMPTCONDUIT_API_URL | No | https://api.promptconduit.dev | API endpoint |
PROMPTCONDUIT_DEBUG | No | false | Enable debug logging |
PROMPTCONDUIT_TIMEOUT | No | 30 | HTTP timeout (seconds) |
PROMPTCONDUIT_LOCAL_ONLY | No | false | Capture to disk, never send — even if an API key is set |
PROMPTCONDUIT_AUTO_UPDATE | No | 1 | Set to 0 to disable background self-update |
PROMPTCONDUIT_EVENT_LOG | No | 1 | Set to 0 to disable ~/.promptconduit/events.jsonl |
Prefer the config file over environment variables when using multi-environment setups. Mixing both can cause mismatches (e.g., prod API key with local URL).
Debug Mode
# Enable via config promptconduit config set --debug=true # Enable via env var PROMPTCONDUIT_DEBUG=1 promptconduit test # Check logs (macOS) cat $TMPDIR/promptconduit-hook.log