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"

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_KEYYesYour platform API key
PROMPTCONDUIT_API_URLNohttps://api.promptconduit.devAPI endpoint
PROMPTCONDUIT_DEBUGNofalseEnable debug logging
PROMPTCONDUIT_TIMEOUTNo30HTTP 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

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