Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Environment Variables

Exported by the session-start hook and read by subsequent plugin code.

VariableDescription
PRISM_GCK_KEYYour gck_* API key. Falls back to CLAUDE_PLUGIN_OPTION_apiKey then ~/.prism/config.json.
PRISM_THRESHOLDAdvisor strictness value (0–10). Falls back to CLAUDE_PLUGIN_OPTION_prismThreshold then config (default 4).
PRISM_DEBUGSet to 1 to enable debug logging. Any other value (including true) is treated as off.
ANTHROPIC_BASE_URLGateway URL, exported when gateway routing is enabled.
ANTHROPIC_CUSTOM_HEADERSX-Gateway-Api-Key: <gck> — exported alongside ANTHROPIC_BASE_URL.

Claude Code injects these automatically. The plugin consumes them but does not set them.

VariableDescription
CLAUDE_PLUGIN_DATAPer-plugin data directory. Used to place session-state.json.
CLAUDE_PLUGIN_OPTION_apiKeyuserConfig.apiKey value
CLAUDE_PLUGIN_OPTION_enableGatewayuserConfig.enableGateway value ("true" / "false")
CLAUDE_PLUGIN_OPTION_prismThresholduserConfig.prismThreshold value
CLAUDE_PLUGIN_OPTION_showStatusLineuserConfig.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):

VariableValue
OTEL_LOGS_EXPORTERotlp
OTEL_METRICS_EXPORTERotlp
OTEL_METRIC_EXPORT_INTERVAL10000
OTEL_EXPORTER_OTLP_PROTOCOLhttp/json
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT<ingest>/v1/logs
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT<ingest>/v1/metrics
OTEL_EXPORTER_OTLP_HEADERSx-api-key=<gck_*>
OTEL_LOG_USER_PROMPTS1
OTEL_LOG_TOOL_DETAILS1

OTEL_EXPORTER_OTLP_TRACES_ENDPOINT is not managed by the plugin. Claude Code does not currently emit OTLP traces through this pipeline.

Only one URL override is supported:

VariableDescription
PRISM_INGEST_URLOverride 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.