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"
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 |
PROMPTCONDUIT_API_URL | No | https://api.promptconduit.dev | API endpoint |
PROMPTCONDUIT_DEBUG | No | false | Enable debug logging |
PROMPTCONDUIT_TIMEOUT | No | 30 | HTTP timeout (seconds) |
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