Skip to content

Environment variables

Each section lists the variables one program reads, from a scan of the Go code for every environment read. zentri is the CLI, also installed as zt. A flag that sets the same thing wins over its variable.

Paths are symbolic, not as resolved on any one machine: ~ is the home directory, and $XDG_DATA_HOME and the like are those variables’ values.

Variable Default Meaning
CODEX_HOME ~/.codex Where Codex reads its profiles. zt start writes the Zentri profile there.
DBUS_SESSION_BUS_ADDRESS none D-Bus session bus on Linux, which zt reaches the Secret Service keychain over. Without it, zt looks for the bus at /run/user/UID/bus. zt never starts a bus, so with none the token goes in the config file.
GH_TOKEN none GitHub token zt done opens a pull request with when gh is not logged in. It stays on this machine.
GITHUB_TOKEN none Read when GH_TOKEN is unset.
GIT_CONFIG_COUNT none Git’s count of GIT_CONFIG_KEY_n and GIT_CONFIG_VALUE_n pairs. Zentri keeps the pairs and adds one that points core.hooksPath at the session’s git hooks.
HOME none The home directory. Locates ~/.codex when CODEX_HOME is unset.
TMUX none Set inside tmux. zt attach then switches the client instead of attaching.
XDG_CONFIG_HOME none Base of the default config file path, when absolute.
XDG_DATA_HOME none Base of the default worktree root, when absolute.
XDG_STATE_HOME none Base of the state directory, $XDG_STATE_HOME/zentri, when absolute. Otherwise the state directory is ~/.local/state/zentri. It holds session records and token files.
ZENTRI_AGENT claude Agent command line for zt start when --agent is not given. The config file’s agent comes before the default.
ZENTRI_CONFIG $XDG_CONFIG_HOME/zentri/config.json when XDG_CONFIG_HOME is absolute, else zentri/config.json in the OS config directory Path of the CLI config file. See Configuration.
ZENTRI_CREDENTIAL subscription How the agent authenticates, subscription or api-key, when --credential is not given. The model router routes only an API key session.
ZENTRI_EDITS_FAIL_OPEN none true lets edits through when the coordinator is unreachable. Read only in a sandbox, where the openshell launcher sets it from the project’s edits_fail_open.
ZENTRI_INVITE none Invite code for zt login when --invite is not given.
ZENTRI_LAUNCHER none Launcher for zt start, local-dev or openshell, when --launcher is not given. Falls back to the config file’s launcher, then local-dev.
ZENTRI_OPENSHELL openshell OpenShell program the openshell launcher and zt doctor run.
ZENTRI_OPENSHELL_PROVIDERS none Comma list of the OpenShell providers to attach to a sandbox. No other provider is attached.
ZENTRI_PROJECT none Project name or ID when --project is not given. Wins over the config file’s project.
ZENTRI_SERVER none Zentri coordinator URL.
ZENTRI_SESSION_ID none ID of the agent session the process runs in. zt start sets it for the agent, and the hooks do nothing without it.
ZENTRI_SESSION_TOKEN none Session token of the agent session. Wins over ZENTRI_SESSION_TOKEN_FILE.
ZENTRI_SESSION_TOKEN_FILE none File holding the session token. zt start sets it for the agent. A file the group or others can read is refused.
ZENTRI_TMUX tmux tmux program the local-dev launcher and zt doctor run.
ZENTRI_TOKEN_STORE auto Where zt keeps your user token. auto uses the OS keychain when one answers and the config file otherwise, file keeps it in the config file and never touches the keychain, and keychain fails rather than use the file. See Configuration.
ZENTRI_WORKTREE none Worktree of the agent session. zt start sets it for the agent.
ZENTRI_WORKTREE_ROOT $XDG_DATA_HOME/zentri/worktrees when XDG_DATA_HOME is absolute, else ~/.local/share/zentri/worktrees Directory the launchers create session worktrees in.
Variable Default Meaning
ZENTRI_GITHUB_API_URL https://api.github.com GitHub REST API base URL.
ZENTRI_GITHUB_APP_ID none GitHub App ID.
ZENTRI_GITHUB_APP_PRIVATE_KEY_FILE none File holding the App’s PEM private key.
ZENTRI_GITHUB_CHECK_ADDR 127.0.0.1:8090 Address to listen on.
ZENTRI_GITHUB_REPO_MAP_FILE none JSON file mapping owner/name repositories to project IDs.
ZENTRI_GITHUB_WEBHOOK_SECRET_FILE none File holding the App’s webhook secret.
ZENTRI_INTEGRATION_TOKEN_FILE none File holding a zt_i_ integration token with checks:read.
ZENTRI_SERVER none Zentri coordinator URL.
Variable Default Meaning
OTEL_EXPORTER_OTLP_ENDPOINT none Turns on OpenTelemetry trace export to this endpoint. The exporter reads the other standard OTEL_ variables itself.
ZENTRI_ADDR :8080 Listen address.
ZENTRI_BOOTSTRAP_ADMIN_TOKEN_FILE none File holding the first admin token. Without it, the coordinator generates the token and prints it once.
ZENTRI_DATABASE_URL none Postgres URL the coordinator serves with. Required.
ZENTRI_DATA_KEY_FILE none File holding the 32-byte key that encrypts raw prompts. Without it, raw prompts are not kept.
ZENTRI_EMBEDDER hash Embedder: hash (offline), ollama or openai.
ZENTRI_EMBED_API_KEY_FILE none File holding the embedder’s API key (openai, optional).
ZENTRI_EMBED_BASE_URL none Embedder URL: Ollama’s root, or an OpenAI-compatible URL ending in /v1.
ZENTRI_EMBED_MODEL none Embedding model. Ollama defaults to nomic-embed-text, and openai needs it.
ZENTRI_LLM_API_KEY_FILE none File holding the LLM’s API key (optional).
ZENTRI_LLM_BASE_URL none OpenAI-compatible URL ending in /v1. Turns on the LLM steps.
ZENTRI_LLM_MODEL none Chat model for the LLM steps. Required with ZENTRI_LLM_BASE_URL.
ZENTRI_LLM_REASONING_EFFORT none Sent as reasoning_effort when set. none turns off a model’s thinking.
ZENTRI_LLM_RESPONSE_FORMAT json_schema json_schema or json_object.
ZENTRI_LLM_STEPS judge Comma list of extract, judge and phrase.
ZENTRI_MIGRATE_DATABASE_URL the value of ZENTRI_DATABASE_URL Postgres URL of the schema owner, for migrations.
ZENTRI_MODEL_TIMEOUT 5s Per-call model timeout.
ZENTRI_SLACK_RETRY_BASE 10s First retry delay of a Slack delivery, doubling up to 15m.

No program reads these. The Go tests and make docs-gen do.

Variable Default Meaning
ZENTRI_TEST_DATABASE_URL none Postgres URL the integration tests (-tags integration) create their databases on. Without it, they skip.
ZENTRI_UPDATE_REFERENCE none 1 makes the reference tests write these pages instead of checking them. make docs-gen sets it.

The Slack bot is TypeScript, outside this scan. Its variables are on Slack bot.