Environment Variables
Plugin runtime variables
Section titled “Plugin runtime variables”Exported by the session-start hook and read by subsequent plugin code.
| Variable | Description |
|---|---|
PRISM_GCK_KEY | Your gck_* API key. Falls back to CLAUDE_PLUGIN_OPTION_apiKey then ~/.prism/config.json. |
PRISM_THRESHOLD | Advisor strictness value (0–10). Falls back to CLAUDE_PLUGIN_OPTION_prismThreshold then config (default 4). |
PRISM_DEBUG | Set to 1 to enable debug logging. Any other value (including true) is treated as off. |
ANTHROPIC_BASE_URL | Gateway URL, exported when gateway routing is enabled. |
ANTHROPIC_CUSTOM_HEADERS | X-Gateway-Api-Key: <gck> — exported alongside ANTHROPIC_BASE_URL. |
Provided by Claude Code
Section titled “Provided by Claude Code”Claude Code injects these automatically. The plugin consumes them but does not set them.
| Variable | Description |
|---|---|
CLAUDE_PLUGIN_DATA | Per-plugin data directory. Used to place session-state.json. |
CLAUDE_PLUGIN_OPTION_apiKey | userConfig.apiKey value |
CLAUDE_PLUGIN_OPTION_enableGateway | userConfig.enableGateway value ("true" / "false") |
CLAUDE_PLUGIN_OPTION_prismThreshold | userConfig.prismThreshold value |
CLAUDE_PLUGIN_OPTION_showStatusLine | userConfig.showStatusLine value ("true" / "false") |
OTEL variables (written to ~/.claude/settings.json)
Section titled “OTEL variables (written to ~/.claude/settings.json)”The plugin writes these on session start (source: optra-prism-plugin/lib/settings.js):
| Variable | Value |
|---|---|
OTEL_LOGS_EXPORTER | otlp |
OTEL_METRICS_EXPORTER | otlp |
OTEL_METRIC_EXPORT_INTERVAL | 10000 |
OTEL_EXPORTER_OTLP_PROTOCOL | http/json |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | <ingest>/v1/logs |
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | <ingest>/v1/metrics |
OTEL_EXPORTER_OTLP_HEADERS | x-api-key=<gck_*> |
OTEL_LOG_USER_PROMPTS | 1 |
OTEL_LOG_TOOL_DETAILS | 1 |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is not managed by the plugin. Claude Code does not currently emit OTLP traces through this pipeline.
Override
Section titled “Override”Only one URL override is supported:
| Variable | Description |
|---|---|
PRISM_INGEST_URL | Override the ingest base URL. Intentionally not exported by the session hook — set it in your shell before starting Claude Code for local dev. Gateway and dashboard URLs are always resolved from the config endpoint. |