Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

The config file is TOML: $BRNR_CONFIG, else $XDG_CONFIG_HOME/brnr/config.toml, else ~/.config/brnr/config.toml. Profiles has a complete example. A missing file is no configuration.

  • Unknown keys, keys in the wrong section, and unknown names in experimental, client_capabilities and features fail to load. doctor checks every profile.
  • The file loads only if it is the user’s own and neither the group nor others can read or write it, and its folder is the user’s own and neither can write it. A symlink is followed, and the file it resolves to and that file’s folder are checked. Otherwise every command that reads it fails, naming the path, the owner or mode, and the chmod or chown that fixes it (config_invalid), and doctor fails its config check the same way. brnr never changes the file’s mode (ADR 9.4).
  • Without --profile, the default profile applies, if there is one.
  • A profile is read on the machine that runs the command, and holds no routing: a remote key is unknown. --remote on the command line is the one way to another machine, whose config is its own (remote hosts).
  • brnr profile shows what a profile holds and every key it can have, without the file (profile).
  • Beside the profiles, the file has one key of its own, retention.

Covered from 1.0.0: the TOML below, its sections, keys, values and names; the environment variables below, BRNR_DIR as where the runtime directory is, not what is in it; the BRNR_* variables event notify gives its command; and BRNR_PID in a started bridge’s environment, but not BRNR_SOCKET. A configuration that uses a key added in a later 1.x release doesn’t load in an earlier one.

retention

At the top of the file, outside the profiles: what every process uses, whatever its profile.

retention = 2592000   # 30 days
KeyTypeMeaning
retentionintegerSeconds, 1 or more. Each process, as it starts, deletes brnr’s transcripts of the sessions last active longer ago, and the host logs of processes that have gone and were, as session prune does, and records what it deleted in its host log (transcripts_pruned). Unset, nothing is deleted. 0, or a value that isn’t a whole number ("30d"), fails to load (ADR 9.5).

[profiles.<name>]

What every process of the profile uses.

KeyTypeMeaning
agentlist of stringsThe agent’s command and its arguments, used when none is given after --.
logstringWhat the process records (transcripts): "all" (the default), "events" (no raw ACP) or "off". A string only.
strictbooleanStable ACP only (ADR 2.1). Default false.
bridgesarray of tablesThe bridges the process starts.

[profiles.<name>.headless]

What only session new and session resume use.

KeyTypeMeaning
cwdstringThe sessions’ working directory.
modestringThe mode, set before the first prompt.
modelstringThe model.
thought_levelstringThe thought level.
optionstable of stringsConfig options, by id, to values.
authstringThe agent’s login method, run first (ADR 4.7).
response_timeoutintegerSeconds an approval or elicitation waits for an answer, 0 or more. Then an approval is answered with its reject_once option, else its turn is cancelled; an elicitation is answered cancel.
stop_when_idleintegerClose a session idle this many seconds, 0 or more.
mcp_serversarray of tablesThe MCP servers of the sessions it opens.

A timeout that isn’t set imposes no deadline, and neither has a default: an unattended run must set response_timeout, or a request nobody answers waits as long as the process runs. --mode, --model, --thought-level, --option, --stop-when-idle and --response-timeout win over these.

[profiles.<name>.editor]

What only brnr acp uses.

KeyTypeMeaning
experimentallist of stringsThe actions on the editor’s session from outside that are enabled: send, context, cancel, permission, elicitation, config, close. Default empty.
client_capabilitieslist of stringsThe editor’s capabilities that reach the agent outside strict mode: fs, terminal (ADR 2.7). Default empty.
featureslist of stringsshared_sessions, if enabled (ADR 3.10). Default empty.
echo_asstringHow a message or context sent through brnr is shown to the editor: "tool_call" (the default) or "user_message_chunk" (ADR 7.2).

Bridges

[[profiles.<name>.bridges]]: a program the process starts, which speaks the bridge protocol.

KeyTypeMeaning
commandstringThe program, not empty. A list fails to load.
argslist of stringsIts arguments, as an MCP server’s. Optional.
eventslist of stringsThe events it gets: event names, not notes. Optional; the default is every event but acp.

MCP servers

[[profiles.<name>.headless.mcp_servers]]: an MCP server for the sessions the process opens, local or remote (ADR 6.3).

KeyTypeMeaning
namestringIts name.
commandstringA local (stdio) server’s program.
argslist of stringsIts arguments.
envtable of stringsIts environment.
urlstringA remote server’s URL, in place of command.
typestringA remote server’s transport: "http" (the default) or "sse".
headerstable of stringsA remote server’s HTTP headers.

A server has command or url, not both. type and headers are for a url server, args and env for a command one. The values of env and headers are redacted from the transcripts.

Environment variables

VariableMeaning
BRNR_HOMEThe state directory: transcripts, host logs and session locks. Default ~/.brnr.
BRNR_CONFIGThe config file. Default $XDG_CONFIG_HOME/brnr/config.toml, else ~/.config/brnr/config.toml.
BRNR_DIRThe private runtime directory: sockets and metadata. Default $XDG_RUNTIME_DIR/brnr, else $TMPDIR/brnr-<uid>. brnr refuses one others can use.
BRNR_START_TIMEOUTSeconds a start has to commit. Default 120.

How BRNR_HOME and BRNR_DIR are found, and the state directory’s layout, are fixed for 1.x (ADR 3.9); what host logs and lock files contain isn’t. See environment.

Agents and bridges inherit the environment brnr was started in; the variables an agent logs in with are its own. A started bridge also gets BRNR_PID, its process, and BRNR_SOCKET, the control socket. event notify gives its command BRNR_EVENT, BRNR_TEXT, BRNR_TITLE, BRNR_MESSAGE, BRNR_SESSION, BRNR_REQUEST and BRNR_PID (event notify).