Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

The config command group manages CLI configuration stored at ~/.pretorin/config.json.

List Configuration

$ pretorin config list
         Pretorin Configuration
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┓
┃ Key     ┃ Value           ┃ Source      ┃
┡━━━━━━━━━╇━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━┩
│ api_key │ pretorin...9v7o │ config file │
└─────────┴─────────────────┴─────────────┘

Config file: /home/user/.pretorin/config.json

Get a Config Value

pretorin config get api_key

Set a Config Value

pretorin config set api_base_url https://custom-api.example.com/api/v1

Show Config File Path

$ pretorin config path
/home/user/.pretorin/config.json

Config File Format

The config file is JSON:

{
  "api_key": "pretorin_...",
  "api_base_url": "https://platform.pretorin.com/api/v1/public",
  "platform_api_base_url": "https://platform.pretorin.com/api/v1/public",
  "model_api_base_url": "https://platform.pretorin.com/api/v1/public/model",
  "active_system_id": "sys-abc123",
  "active_system_name": "My Application",
  "active_framework_id": "nist-800-53-r5",
  "disable_update_check": false
}

Configuration Keys

KeyDescription
api_keyPretorin API key
api_base_urlPlatform REST API URL
platform_api_base_urlPlatform API base URL
model_api_base_urlModel API URL for agent runtime
openai_api_keyOptional model key for agent runtime
openai_base_urlOptional model API base URL for the built-in agent (overridden by OPENAI_BASE_URL)
openai_modelOptional model name for the built-in agent (overridden by OPENAI_MODEL; defaults to the org model, then gpt-4o)
active_system_idCurrently active system ID
active_system_nameCached display name for the active system
active_framework_idCurrently active framework ID
disable_update_checkDisable passive update notifications

Agent harness selection

The shared Codex/OpenCode selection and per-harness runtime settings are non-secret entries in this same configuration file, but manage them with the purpose-built command:

pretorin agent configure --agent codex
# Or:
pretorin agent configure --agent opencode \
  --model openai/gpt-5.6-terra --reasoning-effort low

When no environment or stored selection exists, the first explicit pretorin agent install --agent codex|opencode or pretorin campaign install --agent codex|opencode saves that choice; either interactive install without --agent prompts and saves the answer. Once a default exists, an install of the alternate harness does not replace it. Later, an explicit --agent takes precedence over PRETORIN_AGENT_HARNESS, then the saved agent_harness; Codex is the final default. Per-harness keys record the auto|system|managed runtime policy, model/provider, optional low|medium|high reasoning effort, and optional absolute executable path. They never store API keys, OAuth tokens, or other credentials. See Agent Runtime Management.

Environment Variable Overrides

Environment variables take precedence over config file values. See Environment Variables for the full list.

Customer-Managed Platforms

For air-gapped or customer-managed platform installs, point the CLI at the customer platform public API instead of hosted Pretorin:

pretorin config set platform_api_base_url https://<platform-host>/api/v1/public
pretorin config set model_api_base_url https://<platform-host>/api/v1/public/model

See Customer-Managed Air-Gapped Installs for the full setup and troubleshooting guide.