> ## Documentation Index
> Fetch the complete documentation index at: https://docs.actual.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Every environment variable the Actual CLI reads, grouped by what it controls.

The Actual CLI reads these variables from the environment of the process that runs it. When the plugin runs the CLI inside Claude Code or Codex, the CLI inherits the agent's environment, so set them in the shell or service that starts the agent.

The plugin's own switches, such as `ACTUAL_UNATTENDED` and `ACTUAL_RULES_DIR`, are read by its hooks rather than the CLI, and [Settings](https://docs.actual.ai/plugin/settings.md) lists them.

## Configuration

| Variable | What it does | Values and default |
| - | - | - |
| `ACTUAL_CONFIG` | The exact path of the [config file](https://docs.actual.ai/cli/configuration-keys.md). Its directory also holds your Actual AI sign-in and the CLI's caches. Wins over `ACTUAL_CONFIG_DIR`. | An absolute path with no `..`. Unset: `~/.actualai/actual/config.yaml`. |
| `ACTUAL_CONFIG_DIR` | The directory that holds `config.yaml`, your sign-in (`credentials.yaml`) and the caches. | An absolute path with no `..`. Unset: `~/.actualai/actual`. |

## Sign-in and tokens

| Variable | What it does | Values and default |
| - | - | - |
| `ACTUAL_AUTH_URL` | The sign-in server `actual login` and `actual mint-token` use when their own flag (`--api-url`, `--issuer`) isn't given. | A URL. Unset: `https://app.actual.ai`. |
| `ACTUAL_TOKEN_STORE` | Where `actual auth create-token` keeps the token it mints. | `auto` (the default) tries the OS keychain, then the encrypted file when `ACTUAL_TOKEN_PASSPHRASE` is set; `keyring` and `file` use one store only. |
| `ACTUAL_TOKEN_PASSPHRASE` | The passphrase that seals the encrypted-file store. Reading or writing that store needs it. | A long random string, kept as secret as the token itself. No default. |
| `ACTUAL_SERVICE_ACCOUNT_ID` | `actual mint-token --service-account-id`: the service account's id. | A UUID. |
| `ACTUAL_SERVICE_ACCOUNT_KID` | `actual mint-token --kid`: the id of the key registered for that account. | A key id. |
| `ACTUAL_SERVICE_ACCOUNT_KEY_FILE` | `actual mint-token --key`: the path of the account's private key in PEM. | A path. An EC key must be PKCS#8. |
| `ACTUAL_SERVICE_ACCOUNT_KEY` | The same private key as PEM text, so it never touches disk. A key file wins when both are set. | PEM text, best supplied by a secret store. |

[Unattended agents and CI](https://docs.actual.ai/guides/unattended-agents-and-ci.md) shows how to mint a token with the service-account variables.

## Checks

| Variable | What it does | Values and default |
| - | - | - |
| `ACTUAL_PLAN_CHECK_MAX_ROUNDS` | `actual plan-check --max-rounds`: how many times the plan check may deny one rule in an agent session before it stops blocking on that rule. Hook mode only. | A whole number of 1 or more. Default `3`. |
| `ACTUAL_IMPL_CHECK_MAX_ROUNDS` | `actual impl-check --max-rounds`: the same limit for the change check, counted separately, so plan-stage denials don't spend it. | A whole number of 1 or more. Default `3`. |

## Runners

The checks and `actual adr-bot` call a model through one of five runners. See [`actual runners`](https://docs.actual.ai/cli/runners) and the `runner` and `model` [configuration keys](https://docs.actual.ai/cli/configuration-keys.md).

| Variable | What it does | Values and default |
| - | - | - |
| `ANTHROPIC_API_KEY` | The key for `anthropic-api`. Wins over `anthropic_api_key` in the config file. | An Anthropic API key. |
| `OPENAI_API_KEY` | The key for `openai-api`, also handed to `codex-cli`, which otherwise uses its `codex login`. Wins over `openai_api_key`. | An OpenAI API key. `actual adr-bot` needs one to run `codex-cli` on any model but Codex's default. |
| `CURSOR_API_KEY` | The key handed to `cursor-cli`, which otherwise uses its `cursor-agent login`. Wins over `cursor_api_key`. | A Cursor API key. |
| `CLAUDE_BINARY` | The `claude` binary `claude-cli` runs, in place of the one on `PATH`. | The path of an executable file. |
| `CODEX_BINARY` | The `codex` binary `codex-cli` runs, in place of the one on `PATH`. | The path of an executable file. |
| `CURSOR_BINARY` | The binary `cursor-cli` runs, in place of `cursor-agent` (or `agent`) on `PATH`. | The path of an executable file. |
| `ANTHROPIC_API_BASE_URL` | The address `actual adr-bot` sends `anthropic-api` requests to. | A URL. Unset: Anthropic's API. |
| `OPENAI_API_BASE_URL` | The address `actual adr-bot` sends `openai-api` requests to. | A URL. Unset: OpenAI's API. |

## Actual AI API

| Variable | What it does | Values and default |
| - | - | - |
| `ACTUAL_API_URL` | The Actual AI API that signed-in commands (`actual adr`, `actual advisor`, `actual auth create-token`) call when their `--api-url` isn't given. Telemetry sent to this address carries your sign-in. | A URL. Unset: `https://api-service.api.prod.actual.ai`. |

`actual adr-bot` and telemetry's default endpoint use the `api_url` [configuration key](https://docs.actual.ai/cli/configuration-keys.md) instead.

## Telemetry and updates

| Variable | What it does | Values and default |
| - | - | - |
| `ACTUAL_NO_TELEMETRY` | Stops every telemetry event, as `telemetry.enabled: false` does. | Any non-empty value. Unset: telemetry on. |
| `ACTUAL_OTLP_LOGS_ENDPOINT` | Overrides `telemetry.otlp_logs_endpoint`, the OTLP/HTTP logs URL for ADR, check and session-end events. | An `https://` URL, or `http://` to `localhost`, `127.0.0.1` or `[::1]` only. |
| `ACTUAL_OTLP_FILE` | Overrides `telemetry.otlp_file`, a local file that gets each of those event requests appended. | An absolute path. |
| `ACTUAL_TELEMETRY_DEBUG` | Logs every telemetry event a run queues, sends or holds back, telemetry off included, to `telemetry-debug/<id>.jsonl` in the config directory, and prints `telemetry debug: <id> -> <path>` on standard error. Inside an agent hook the id is the session id. | Any value but `0` or `false`. Unset: off. |
| `TRACEPARENT` | A W3C trace context. The telemetry events a run sends join that trace. | A `traceparent` header value. Unset: no trace. |
| `ACTUAL_NO_UPDATE_CHECK` | Turns off the daily update notice and `actual version --check`, as `update_check.enabled: false` does. `actual self-update` refuses to run while it's set. | Any non-empty value. Unset: update checks on. |
| `CI` | Hides the update notice, and makes `actual self-update` refuse to run. Most CI services set it for you. | Any non-empty value. |

The CLI never reads `OTEL_EXPORTER_OTLP_ENDPOINT` or `OTEL_EXPORTER_OTLP_LOGS_ENDPOINT`, which a shell or CI job may set for other tools. [Privacy and telemetry](https://docs.actual.ai/resources/privacy-and-telemetry.md) covers what each event holds.

## Markers the agents set

Claude Code and Codex set `CLAUDECODE`, `CLAUDE_CODE_ENTRYPOINT`, `CODEX_THREAD_ID` and `CODEX_SESSION_ID` in the shells they start, and you never set them yourself. `actual check-override` refuses to run where any of them is set, so an agent can't override a rule its own check denied. Run it from an ordinary terminal, as [Overrides](https://docs.actual.ai/guides/overrides.md) describes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.