Skip to content

Configuration

Zentri reads two settings files, both JSON. The coordinator reads none: zentri-server takes flags and environment variables, on zentri-server CLI and Environment variables.

zt login writes the file, and zt reads your server and defaults from it. Its path is the first of these that applies. ~ is your home directory.

  1. $ZENTRI_CONFIG, when ZENTRI_CONFIG is set.
  2. $XDG_CONFIG_HOME/zentri/config.json, when XDG_CONFIG_HOME is absolute.
  3. zentri/config.json in the OS config directory, ~/Library/Application Support on macOS and ~/.config on Linux.

zt writes the file with mode 0600 in a 0700 directory, and refuses to read one the group or others can read.

zt keeps your token in the OS keychain when one answers: the macOS Keychain, the Windows Credential Manager, or the Secret Service on Linux. The entry has service zentri and account HANDLE@SERVER. With no keychain, as in an SSH session, a container or CI, the token goes in this file. ZENTRI_TOKEN_STORE picks the store: auto (the default) tries the keychain first, file never touches it, and keychain fails rather than use the file. zt status and zt doctor say which store holds the token, and zt logout removes it from both.

Field Type Required Description
agent string no Default agent command line for zt start. --agent and ZENTRI_AGENT win over it, and with none of them zt runs claude.
handle string no Your handle, as the coordinator reported it at login. With the token in the keychain, zt finds it by handle and server.
launcher string no Default launcher for zt start. --launcher and ZENTRI_LAUNCHER win over it. The launchers are local-dev (the default) and openshell.
project string no Default project, by name or ID. zt login --project sets it, and --project and ZENTRI_PROJECT win over it.
server string yes Coordinator URL. zt login --server sets it.
token string no Your user token, when token_store is file. A secret, which zt login writes and never prints.
token_store string no Where your token is: keychain for the OS keychain, or file for this file. zt sets it. Unless ZENTRI_TOKEN_STORE is file, zt moves a token it finds in this file to the keychain the next time it loads it, and drops it from the file once the keychain gives it back.

zt router set --file FILE replaces a project’s model router settings with this document, and zt router set shows an example. Only a lead of the project may set them.

zt refuses a file over 64 KiB, more than one JSON value, and a field not listed here. A field left out is off or empty.

Field Type Default Description
cheap_terms array of string empty Words that pick the cheap model when a prompt holds one, added to the built-in ones zt router show lists.
enabled boolean false Turns the router on. It routes only sessions started with --credential api-key.
frontier_terms array of string empty Words that pick the frontier model when a prompt holds one, added to the built-in ones zt router show lists.
llm boolean false Lets the coordinator’s LLM decide a prompt no rule decides, when the coordinator has one.
models object empty Each agent’s two models, by agent kind. An agent left out keeps its own model.
models.<agent>.cheap string none Model for a prompt the rules call cheap. Required for a listed agent.
models.<agent>.frontier string none Model for a prompt the rules call frontier. Required for a listed agent.

The coordinator checks the settings when they arrive. An agent kind is one of claude, codex or opencode. A model name matches ^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,127}$. Each term list holds at most 64 terms, each one word that matches ^[\p{L}\p{N}]+$, at most 40 bytes long. The coordinator lowercases, sorts and deduplicates the terms.