Reference

Environment variables

Environment variables let you point the CLI at a different backend, relocate its state, or authenticate without an interactive login. All are optional.

Hosts

VariablePurpose
`BRAINBASE_WEB_URL`Override the web app URL used by `login` (default `https://new.usekafka.com`).
`BRAINBASE_API_URL`Override the API URL used by `link` / `sync` (default `https://kafka-llm-service.onrender.com`).
`BRAINBASE_REGISTRY_URL`Override the registry API URL (falls back to `BRAINBASE_API_URL`, then the same `https://kafka-llm-service.onrender.com` default).

Authentication

VariablePurpose
`BRAINBASE_TOKEN`A long-lived PAT (`bbpat_…`). Overrides `~/.brainbase/token.json` and the browser session.
`BRAINBASE_SKIP_AUTH`Set to `1` to bypass the auth gate for local development.

CI & automation

VariablePurpose
`BRAINBASE_NON_INTERACTIVE`Set to `1` to force non-interactive mode: prompts auto-resolve to their defaults instead of waiting for input. For CI and agent-driven runs.
`BRAINBASE_RUN_ENTRYPOINT`Set to `1` to make `agent pull` execute the agent entrypoint (equivalent to passing `--run-entrypoint`).

State & debugging

VariablePurpose
`BRAINBASE_HOME`Override the local config dir (default `~/.brainbase`).
`CODEX_HOME`Codex global root, used by the `codex` harness (default `~/.codex`).
`BRAINBASE_DEBUG`Set to print full stack traces on error.
Credential precedence
Precedence depends on which API the command talks to. On the core API path (agent, link, sync): BRAINBASE_TOKEN env, then the ~/.brainbase/auth.json JWT — token.json is not consulted here. On the registry path (template, skill, token): BRAINBASE_TOKEN env, then the auth.json JWT, then the ~/.brainbase/token.json PAT (a live login session outranks a stored PAT). See Authentication.