Skip to main content

Environment Variables

Atomic accepts environment variables for configuration, provider credentials, and subprocess context. Atomic-prefixed application variables take precedence over their legacy Pi aliases when both are set.

Application configuration

PI_CACHE_RETENTION=long is a provider/upstream prompt-cache option and intentionally has no Atomic-prefixed alias. VISUAL and EDITOR select the Ctrl+G external editor when externalEditor is unset.

Provider credentials

Provider keys include ANTHROPIC_API_KEY, OPENAI_API_KEY, AZURE_OPENAI_API_KEY, GEMINI_API_KEY, AWS/Bedrock credentials, and the variables listed in Providers. ANTHROPIC_AUTH_TOKEN is a distinct header-only bearer credential for Anthropic-compatible gateways: Atomic sends Authorization: Bearer … without requiring or inventing an API key, including normal turns, isolated execution, branch summaries, and Verbatim Compaction. Custom headers remain independent.

Bash session environment

Every built-in, factory-created, direct, foreground/background, workflow-stage, and isolated bash execution receives one execution-time snapshot: Atomic clears these ten reserved names before overlaying the current snapshot, preventing stale metadata from another session or workflow stage. Unrelated inherited/caller variables remain intact. The snapshot is taken when execution begins, so a resumed session or later model change is reflected. SDK createBashTool() exposes it by default; set exposeSessionEnvironment: false to opt out. See Using Atomic and RPC direct bash for execution and streaming behavior.