docs / configuration

Configuration

Every setting, environment variable and file the PromptConduit CLI uses, and how they combine.

You rarely need to edit configuration by hand. promptconduit init writes what a normal setup needs, and every setting below has a config set flag. This page explains what the settings mean and where the CLI keeps its files. If something isn't working, start with Troubleshooting.

Set the API key

promptconduit login saves a key through a browser sign-in, and turns local-only mode off. For CI or a script, pass a key from the profile page on stdin:

bash
promptconduit config set --api-key-stdin < key.txt

--api-key=sk_… works too, but leaves the key in your shell history and the process list.

The config file

Settings live in ~/.config/promptconduit/config.json, created with mode 0600 in a directory with mode 0700. With XDG_CONFIG_HOME set, it's $XDG_CONFIG_HOME/promptconduit/config.json instead. promptconduit config path prints the exact location. Unset and false fields are left out when the CLI writes the file.

A single-account setup uses top-level fields:

config.json
{
  "api_key": "sk_your_key_here",
  "api_url": "https://api.promptconduit.dev",
  "timeout_seconds": 30,
  "event_log_retention_days": 90,
  "disable_telemetry": true
}

With named environments, current_env picks the active one:

config.json
{
  "current_env": "prod",
  "environments": {
    "local": {
      "api_key": "sk_local_key",
      "api_url": "http://localhost:8787",
      "debug": true
    },
    "prod": {
      "api_key": "sk_prod_key",
      "api_url": "https://api.promptconduit.dev"
    }
  },
  "disable_telemetry": true,
  "event_log_retention_days": 60
}

Config keys

KeyTypeDefaultSet withEnv overrideMeaning
api_key string config set --api-key / --api-key-stdin PROMPTCONDUIT_API_KEY API key used to send events and call team endpoints. Written by promptconduit login and init.
api_url string https://api.promptconduit.dev config set --api-url PROMPTCONDUIT_API_URL API base URL.
debug bool false config set --debug-mode PROMPTCONDUIT_DEBUG Hooks write debug lines to the CLI log (promptconduit logs).
timeout_seconds int 30 PROMPTCONDUIT_TIMEOUT HTTP timeout in seconds.
disable_auto_update bool false config set --disable-auto-update PROMPTCONDUIT_AUTO_UPDATE Turns off the background update check and self-upgrade, the daily rate-card refresh, and the editor extension and MCP refresh after an upgrade.
disable_telemetry bool false config set --disable-telemetry PROMPTCONDUIT_TELEMETRY Turns off the anonymous daily usage ping.
disable_event_log bool false config set --disable-event-log PROMPTCONDUIT_EVENT_LOG Stops writing the local event log in ~/.promptconduit/.
local_only bool false config set --local-only PROMPTCONDUIT_LOCAL_ONLY Local-only mode: capture events locally and never send them, even with an API key.
event_log_retention_days int 30 config set --event-log-retention-days PROMPTCONDUIT_EVENT_LOG_RETENTION_DAYS Days of local hook history to keep. -1 keeps it forever.
batch_upload bool true config set --batch-upload PROMPTCONDUIT_BATCH_UPLOAD Upload events in batches from a background process. false sends one request per event.
current_env string Name of the active environment in environments. When unset, the top-level keys apply. Switch it with promptconduit config env use <name>.
environments object Named environments (for example local, dev, prod), each holding the keys above. Manage them with promptconduit config env.

Generated from the config file struct of CLI v0.43.5. Run promptconduit upgrade if yours is older.

How settings combine

Environment variables win over the config file, and the file wins over built-in defaults. In practice:

  • PROMPTCONDUIT_API_KEY and PROMPTCONDUIT_API_URL override the file one at a time. Setting only the key keeps the file's URL, which is how a production key ends up sent to a local server. config show warns about it.
  • With an environment active, api_key, api_url and debug come from that environment. config set --api-key, --api-url and --debug-mode write there too.
  • The other settings, such as local_only, the disable_* switches, event_log_retention_days and batch_upload, are saved at the top level and apply to every environment.
  • Most of the on and off variables only turn something off, or force local-only on. For example, PROMPTCONDUIT_LOCAL_ONLY=0 doesn't undo local_only: true in the file. Two work both ways: PROMPTCONDUIT_BATCH_UPLOAD and PROMPTCONDUIT_EVENT_LOG_RETENTION_DAYS.
  • Command flags such as login --api-url apply to that one run and aren't saved.

See the current settings

bash
promptconduit config show
promptconduit config path

config show prints the values in effect after environment variables are applied. It covers the API URL and masked key, auto-update, the usage ping, the event log and retention. Then the mode, how events are uploaded, the config file path and the active environment.

Local-only mode

To capture everything but never send it, even with a key set:

bash
promptconduit config set --local-only=true

Every hook event is still written to ~/.promptconduit/events.jsonl, and cost, graph, sessions, the editor extension and local skills keep working. No events are sent and transcripts aren't synced. The anonymous usage ping is separate: turn it off as shown under Usage ping. Turn sending back on with promptconduit config set --local-only=false.

Named environments

Keep separate keys for local development, staging and production:

bash
promptconduit config env add local --api-key-stdin --api-url=http://localhost:8787 --debug-mode < local-key.txt
promptconduit config env add prod --api-key-stdin < prod-key.txt

promptconduit config env use local
promptconduit config env list
promptconduit config env remove local
  • env add needs --api-key or --api-key-stdin. --api-url defaults to the production API.
  • The first environment you add becomes active. Adding a name that exists replaces it.
  • config set-env prod is a shortcut for config env use prod.

Hooks read the config file on every event, so a switch applies from the next event. Environment variables are different: your assistant passes its own environment to hooks, so a variable you change only applies in a session started afterwards. Events waiting to be retried are kept per API URL, so events that failed against production only ever go to production.

Environment variables

VariableDefaultDescription
PROMPTCONDUIT_API_KEY API key for sending events and for team commands. Overrides the key in config.json. Prefer promptconduit login or config set --api-key-stdin, which keep the key out of your shell history. Overrides api_key.
PROMPTCONDUIT_API_URL https://api.promptconduit.dev API base URL. Overrides the URL in config.json. Overrides api_url.
PROMPTCONDUIT_TIMEOUT 30 HTTP timeout in seconds for requests to the API. Only positive whole numbers are used. Overrides timeout_seconds.
PROMPTCONDUIT_ORG Default team for team commands, skills install/sync --org and team MCP tools, as an id, slug or name. --org wins over it.
PROMPTCONDUIT_LOCAL_ONLY unset 1, true or yes forces local-only mode: events are written to the local event log and never sent, even with an API key. Overrides local_only.
PROMPTCONDUIT_BATCH_UPLOAD on 0 or false sends each event in its own request. 1 or true turns batching back on when config.json turned it off. Overrides batch_upload.
PROMPTCONDUIT_EVENT_LOG on 0, false or no stops writing the local event log (~/.promptconduit/events.jsonl). Overrides disable_event_log.
PROMPTCONDUIT_EVENT_LOG_RETENTION_DAYS 30 Days of local hook history to keep. -1 keeps it forever. Overrides config.json in either direction. Overrides event_log_retention_days.
PROMPTCONDUIT_TOOL Forces the assistant a hook event is attributed to (for example claude-code), instead of detecting it from the event.
PROMPTCONDUIT_QUIET unset 1 does what --quiet does on every command: hides update and telemetry notices and tips.
PROMPTCONDUIT_NO_INPUT unset 1 does what --no-input does on every command: never prompt, and fail with a hint naming the flag to pass instead.
PROMPTCONDUIT_NO_TIPS unset 1 hides the one-line team tip under cost output. --quiet hides it too.
NO_COLOR Any value turns off color output, like --no-color.
TERM dumb turns off color output.
PROMPTCONDUIT_DEBUG unset 1 or true turns on debug logging to the CLI log (promptconduit logs). --debug also echoes it to stderr for one run. Overrides debug.
PROMPTCONDUIT_AUTO_UPDATE on 0, false or no turns off the background update check and self-upgrade, the daily rate-card refresh, and the editor extension and MCP refresh after an upgrade. Overrides disable_auto_update.
PROMPTCONDUIT_TELEMETRY on 0, false, off or no turns off the anonymous daily usage ping. Overrides disable_telemetry.
DO_NOT_TRACK Any value other than 0, false, off or no turns off the anonymous daily usage ping.
CI When set to anything other than 0, false, off or no, the anonymous daily usage ping is not sent.
ANTHROPIC_API_KEY Used by skills generate --local when there is no Claude Code subscription to use.
OPENAI_API_KEY Used by skills generate --local as a fallback when neither Claude Code nor ANTHROPIC_API_KEY is available.
GITHUB_TOKEN GitHub token for ci audit and ci sync. Checked first, then GH_TOKEN, then gh auth token.
GH_TOKEN GitHub token for ci audit and ci sync, used when GITHUB_TOKEN is unset.
XDG_CONFIG_HOME ~/.config Base directory for config.json: the CLI reads $XDG_CONFIG_HOME/promptconduit/config.json.
PC_CAMPAIGN <source>/<campaign> the install command was copied under. Set by promptconduit.dev; the CLI attaches it to a team checkout it starts.

Installer variables

The install script reads these:

VariableDefaultDescription
PROMPTCONDUIT_VERSION latest Version to install, for example 0.42.1 or v0.42.1.
PROMPTCONDUIT_INSTALL_DIR /usr/local/bin Directory to install the binary into. The installer uses sudo when it can't write there.

Generated from the code of CLI v0.43.5. Run promptconduit upgrade if yours is older.

Where files live

The CLI uses two directories. The config directory holds settings and the CLI's own state. The data directory, ~/.promptconduit/, holds what your assistants produced, and it's where the editor extension reads. XDG_CONFIG_HOME moves only the config directory.

Config directory: ~/.config/promptconduit/

PathContents
config.jsonThe settings above.
logs/promptconduit.logThe CLI log: errors always, debug lines when debug is on. Rotates to .log.1 at 1 MiB, keeping one backup.
outbound.ndjsonEach HTTP request the CLI makes, with credentials redacted. Read it with promptconduit watch. Rotates at 50 MB.
sync_state.jsonWhich transcripts promptconduit sync has uploaded.
local_skills_state.jsonTranscripts that skills generate --local already analyzed.
skills-installed.jsonSkills installed by skills install, so they can be uninstalled safely.
cost/Price caches: pricing-card.json (the daily rate card) and pricing.json (from cost refresh-pricing).
transcript-missing/Claude Code sessions seen saving no transcript, for the status warning. Kept 7 days.
mcp.jsonAssistants you removed the MCP server from, so upgrades don't add it back.
traces/Correlation IDs per session, read by promptconduit debug trace.
collect/Files written by promptconduit collect.
update.json, telemetry.json, tips.json, campaignThe last update check; the usage-ping install ID and notice state; which tips were shown; the campaign the install came from, if any.

Data directory: ~/.promptconduit/

PathContents
events.jsonlThe local event log: one record per hook event, written before anything is sent, with secret-looking values masked. The same JSON is what's sent.
spool-<hash>.jsonlEvents waiting to be uploaded in the next batch, one file per API URL.
outbox-<hash>.jsonlEvents queued for another try after a failed send, one file per API URL. Send them now with promptconduit events flush.
errors.logEvents the server rejected, and dropped events. Read it with promptconduit events --errors.
status.jsonThe counters and last error that promptconduit status shows.
hook-eventsA short status line per event: the event name, directory and session.
extension-update.jsonTells the editor extension that the CLI installed a newer bundled copy.

Retention and pruning

events.jsonl keeps event_log_retention_days of history, 30 by default. Everything inside that window is kept. Older records are trimmed only once the file grows past about 500 MB, oldest first, in a background process, so hooks never wait. The file isn't rotated by size, so recent history is never lost to a rotation.

bash
promptconduit config set --event-log-retention-days=90
promptconduit prune --dry-run
promptconduit prune

-1 keeps history forever. prune removes only records older than the window, and does nothing when retention is -1. The editor extension and cost history read the same file, so a short window also limits how far back they go.

Batch upload

By default, hooks add each event to a local spool, and a background process uploads them in batches. Hooks never wait on the network. To send one request per event instead:

bash
promptconduit config set --batch-upload=false

config show shows the current mode on its Upload: line.

Auto-update

Once every 24 hours, a command checks GitHub for a newer release, with a 5-second timeout. When there is one, the CLI prints a notice and upgrades in the background, so the next command runs the new version. After an upgrade it also updates the bundled editor extension, if you installed it, and the MCP registration. The same daily cycle refreshes the rate card used for cost.

The check is skipped for hooks and for upgrade, watch, collect, cost, graph, sessions, resume and mcp. To turn it all off:

bash
promptconduit config set --disable-auto-update=true

Self-upgrade needs write access to the binary's directory. If it can't write there, upgrade fails with an error. See Upgrade.

Usage ping

Release builds send one anonymous ping a day. It holds a random install ID, the CLI version, OS and CPU, which assistants have hooks, the editor extension version, and whether you're signed in. No prompts, paths or repository names. Nothing is sent until a command has shown a one-time notice, and nothing is sent when CI is set. Local-only mode doesn't turn it off. Opt out with any of:

bash
promptconduit config set --disable-telemetry=true

Or set DO_NOT_TRACK=1 or PROMPTCONDUIT_TELEMETRY=0.

Debug mode

bash
promptconduit config set --debug-mode
promptconduit logs

Debug mode makes hooks write debug lines to the CLI log until you turn it off with --debug-mode=false. With environments in use, it's saved in the active one. PROMPTCONDUIT_DEBUG=1 turns it on for one shell, and the global --debug flag prints debug output to stderr for one command.

Tip

Events going to the wrong server, or a 401, usually means PROMPTCONDUIT_API_KEY is exported in your shell profile while the URL comes from the file. Unset it, and start a new assistant session so hooks stop inheriting it.

Next steps