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

bash
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:

bash
promptconduit config set --local-only=true
# or at install time:
promptconduit install claude-code --local-only

View Current Config

bash
promptconduit config show
promptconduit config path

Multi-Environment Setup

Manage separate keys for local development, staging, and production.

bash
# 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

VariableRequiredDefaultDescription
PROMPTCONDUIT_API_KEYYes*Your platform API key (*not required for local-only capture)
PROMPTCONDUIT_API_URLNohttps://api.promptconduit.devAPI endpoint
PROMPTCONDUIT_DEBUGNofalseEnable debug logging
PROMPTCONDUIT_TIMEOUTNo30HTTP timeout (seconds)
PROMPTCONDUIT_LOCAL_ONLYNofalseCapture to disk, never send — even if an API key is set
PROMPTCONDUIT_AUTO_UPDATENo1Set to 0 to disable background self-update
PROMPTCONDUIT_EVENT_LOGNo1Set 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

bash
# 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