Environment Variables
Environment variables override stored configuration values.
Authentication & API
| Variable | Description | Default |
|---|---|---|
PRETORIN_API_KEY | API key for platform access. Overrides api_key in config file. | — |
PRETORIN_PLATFORM_API_BASE_URL | Platform REST API base URL | https://platform.pretorin.com/api/v1/public |
PRETORIN_API_BASE_URL | Backward-compatible alias for PRETORIN_PLATFORM_API_BASE_URL | — |
PRETORIN_MODEL_API_BASE_URL | Model API URL for agent runtime | https://platform.pretorin.com/api/v1/public/model |
Context
| Variable | Description | Default |
|---|---|---|
PRETORIN_SYSTEM_ID | Active system ID. Overrides the system set via pretorin context set. | — |
PRETORIN_FRAMEWORK_ID | Active framework ID. Overrides the framework set via pretorin context set. | — |
Agent Runtime
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY | Model key override for agent runtime. Takes precedence over stored Pretorin login key. | — |
OPENAI_BASE_URL | Base URL for the model API endpoint. Overrides openai_base_url in config file. | — |
OPENAI_MODEL | Model name for the agent runtime. | gpt-4o |
Source Attestation
| Variable | Description | Default |
|---|---|---|
PRETORIN_SOURCE_PROVIDERS | JSON array of source provider configurations. Overrides source_providers in config file. | — |
PRETORIN_SOURCE_MANIFEST | JSON string or file path to a source manifest. Falls back to .pretorin/source-manifest.json in the git repo root, then ~/.pretorin/source-manifest-{system_id}.json, then the source_manifest config key. | — |
Behavior
| Variable | Description | Default |
|---|---|---|
PRETORIN_DISABLE_UPDATE_CHECK | Set to a truthy value (1, true, yes, on) to disable passive update notifications. | — |
PRETORIN_LOG_LEVEL | Logging level (DEBUG, INFO, WARNING, ERROR) | WARNING |
Precedence
For the API key:
PRETORIN_API_KEYenvironment variable (highest)api_keyin~/.pretorin/config.json
For the platform API URL:
PRETORIN_PLATFORM_API_BASE_URLenvironment variable (highest)PRETORIN_API_BASE_URLenvironment variable (legacy alias)platform_api_base_urlin~/.pretorin/config.jsonapi_base_urlin~/.pretorin/config.json(legacy)https://platform.pretorin.com/api/v1/publicdefault
For the model key (agent runtime):
OPENAI_API_KEYenvironment variable (highest)config.api_key(frompretorin login)config.openai_api_key
For the model name:
OPENAI_MODELenvironment variable (highest)openai_modelin~/.pretorin/config.json- Org AI settings from the platform (cached)
gpt-4odefault
For the source manifest:
PRETORIN_SOURCE_MANIFESTenvironment variable (highest) — JSON string or file path.pretorin/source-manifest.jsonin the git repo root~/.pretorin/source-manifest-{system_id}.jsonsource_manifestkey in~/.pretorin/config.json
CI/CD Example
export PRETORIN_API_KEY=pretorin_your_key_here
export PRETORIN_DISABLE_UPDATE_CHECK=1
export PRETORIN_SYSTEM_ID=your_system_id
pretorin frameworks list
pretorin evidence push