Skip to main content

CLI reference

bravebot 0.9.0: a general-purpose agent resistant to prompt injection

Usage:
bravebot Start an interactive session
bravebot -i "<prompt>" Start an interactive session and send the prompt as its first turn
bravebot --plain Start a session in lines, taking nothing from the terminal
bravebot "<task>" [--file <path>]... Run a single task
cat file | bravebot -p "<task>" ...with piped input, never trusted
bravebot --resume [id] Choose a session to pick up
bravebot --from-pr <number|url> Choose among the sessions linked to a pull request
bravebot --continue Pick up the most recent session in this directory
bravebot -p "<task>" --resume <id> Send a one-shot task as the next turn of a session
bravebot -p "<task>" --continue Send a one-shot task as the next turn of the most recent session
bravebot --fork <id> Fork a session and start exploring a different path
bravebot doctor Check configuration and confinement
bravebot doctor --sandbox-check Run everyday workflows under the sandbox and report which work
bravebot doctor --push-identity [<host>/<owner>] Ask GitHub which account each of your ssh keys pushes as
bravebot bug-report Write the version, what doctor reports and the newest log's name to a file to attach to a bug report
bravebot update Print the command that updates this copy
bravebot auth login [way] Sign in to a model service, listing every way when none is named
bravebot auth logout <way> Forget the stored Brave premium key, a gateway key, a ChatGPT or xAI sign-in, or the Google project block
bravebot auth status [way] Say whether a sign-in is usable, exiting 0 only if it is
bravebot import-providers Import a model service Claude Code or opencode configured
bravebot mcp <command> Declare, list and approve MCP servers
bravebot permissions check <call> Report which permission rule decides a tool call
bravebot completion <bash|zsh|fish> Print a shell completion script
bravebot shell-init <bash|zsh|fish> Print the shell hook that gives @bravebot the commands you ran
bravebot acp Serve an editor over the Agent Client Protocol
bravebot --handle-uri <link> Open a session from a bravebot://open link, its prompt in the box and not sent

Commands​

CommandWhat it does
bravebotstart an interactive session in the current directory
bravebot -i "<prompt>", --interactivestart the same session and send the prompt as its first turn (below)
bravebot --plainstart a session in lines, drawing nothing (below)
bravebot "<task>"run one task and print the reply
bravebot --resume, -ropen the Sessions screen to choose a session to pick up; Esc leaves it for an ordinary session
bravebot --resume <id>resume that session by id
bravebot --from-pr <number or url>choose among the sessions linked to that pull request. The Sessions screen opens and says nothing matches when no session is linked, even in a directory with no sessions at all; Esc leaves it for an ordinary session
bravebot --continue, -cpick up the most recent session in this directory
bravebot -p "<task>" --resume <id>run the task as one more turn of that session, without opening it (below)
bravebot -p "<task>" --continuethe same, for the most recent session in this directory
bravebot --fork <id>, -fcopy a session into one of its own and open that, to try a second approach
bravebot doctorreport configuration and confinement, changing nothing
bravebot doctor --sandbox-checkrun git, cargo, npm and the other everyday programs under the sandbox and report which work
bravebot doctor --push-identity [<host>/<owner>]print each ssh public key's fingerprint and the GitHub login that key pushes as. A key you chose for the owner at a run prompt is marked as chosen; /reach keys in the terminal client lists it and forgets it
bravebot bug-reportwrite a text file to attach to a bug report (below)
bravebot updateprint the command that updates this copy, and run nothing (below)
bravebot auth login [way]sign in to a model service, listing the ways when none is named (below)
bravebot auth logout braveforget the premium key auth login brave stored
bravebot auth logout gateway [id]forget a gateway key auth login gateway stored
bravebot auth logout chatgptforget the ChatGPT sign-in auth login chatgpt stored
bravebot auth logout xaiforget the xAI sign-in auth login xai stored
bravebot auth logout googleremove the google-vertex block auth login google recorded, and offer to end the Google Cloud CLI's sign-in
bravebot auth status [brave|bedrock|gateway [id]|chatgpt|xai|google]say whether a sign-in is usable, exiting 0 only if it is (below)
bravebot import-providersimport a model service Claude Code or opencode configured, asking first
bravebot --bg "<prompt>"start a session that runs in the background and keeps going after the terminal closes (Sessions)
bravebot sessionslist the background sessions of every project, grouped by state when run in a terminal (Sessions)
bravebot attach <id>draw a background session as a foreground one, and answer what it holds
bravebot reply <id> "<text>"send a background session its next prompt
bravebot sessions stop <id>stop a background session and keep its record
bravebot sessions import claude-codecopy Claude Code's sessions for this directory in as words to read (Sessions)
bravebot sessions search [workspace:<dir>] [since:<n>h|d|w] <text>print the ids and titles of past sessions that said it (Sessions)
bravebot sessions list [--json] [--limit <n>]print the sessions recorded for this directory, newest first (Sessions)
bravebot sessions delete <id>delete one session recorded for this directory, with its trail and search index (Sessions)
bravebot sessions purge [--dry-run] [-y]delete every session recorded for this directory, asking first unless -y is given (Sessions)
bravebot stats [--days <n>] [--models] [--project [<dir>]]total the sessions, turns and tokens, read and written, the recorded sessions spent, for every project or one (below)
bravebot schedule add|list|remove|run-now|history|pause|resume|pending|clearrun a prompt from a cron expression as a one-shot run, started by your crontab, a launchd job or a systemd timer (below)
bravebot skill eval <name> [--model <model>] [--max-rounds <n>] [--max-tokens <n>] [--trust-workspace]run a skill's saved cases with the skill and without it and report both scores (below)
bravebot mcp <command>declare, list, approve and remove MCP servers (below)
bravebot permissions check <call>say which permission rule decides a tool call, and the file it is in (below)
bravebot trigger add <name> --event <event> [--workspace <dir>] -- <prompt>store a prompt to run when a delivery signed for that event arrives, and print the secret that signs it once (below)
bravebot trigger list [--json], remove <name>, pending, clear <name>, serve [--port <n>]list the stored triggers, remove one with its secret, show and clear the question a run stopped at, and listen on 127.0.0.1 for deliveries (below)
bravebot completion <shell>print a completion script for bash, zsh or fish (below)
bravebot shell-init <shell>print a shell hook that gives @bravebot the commands you ran (below)
bravebot acpserve an editor over the Agent Client Protocol on standard input and output (below)
bravebot --version, -Vprint the build
bravebot --help, -hprint this

Anything that is not a recognised flag or subcommand is treated as the task prompt.

Options​

OptionWhat it does
--file <path>include a workspace file as trusted context; repeatable
--session-ref <id>add the newest part of an earlier session of this directory to the task; repeatable
--add-dir <path>make a directory outside the working one reachable for this run; repeatable (below)
--trust-workspacetrust the working directory for this run, writing no record (below)
-p, --printnon-interactive; reads piped stdin as quarantined context
-i, --interactive <prompt>open the interactive session and send the prompt as its first turn (below)
--plaina session in lines, taking nothing from the terminal (below)
--mode <turn|manifest>how a one-shot is run; turn (the default) decides step by step, manifest plans the whole run first (below)
--model <name>the model this run asks for; outranks every other way one is named (below)
--advisor <name>a model the planner may put a question to, through the advisor tool (below)
--processor-model <name>the model processors run on for this run; outranks the processorModel setting (below)
--effort <level>how hard this run asks the model to think; outranks every other way one is named (below)
--settings <path>read one more settings file, above every layer found (below)
--output-schema <path>hold the reply to the JSON Schema in this file, or end on status 6 (below)
--goal <condition>keep working until a judge says the condition holds, or end on status 7 (below)
--max-rounds <n>stop the run when the agent asks for a round of tool calls past this many, and end on status 8 (below)
--max-tokens <n>stop the run before a request once it has spent this many tokens, and end on status 8 (below)
--run-network <open|closed>closed takes the network from a program the agent runs unless it needs to fetch or reach a remote (run.network)
--sandbox <mode>how far the programs the agent runs may reach: strict, read-only (which also stops the agent's file tools writing), workspace-write or off. Without it the mode is workspace-write (sandbox.mode). Where a machine-level file pins sandbox.mode, a mode that reads more of the machine, writes more or both is refused, and the refusal says which and names the pinned mode to run with
--sandbox-allow-read <path>, --sandbox-deny-read <path>, --sandbox-allow-write <path>, --sandbox-deny-write <path>add a path or glob to one of the four lists that move what a program the agent runs reads and writes; repeatable (sandbox.filesystem)
--log-level <error|info|debug>how much of a failure's shape goes to the diagnostic log
--agent <name>address every turn to one of your definitions, as /agent does for one (below)
--issue <url>, --pr <url>give the session it opens its issue and pull request links, as /issue and /pr do (below)
--system-prompt <prompt>replace the opening of the system prompt for this run; the rest of it stays (below)
--append-system-prompt <prompt>add your own words to the system prompt for this run, after the project's AGENTS.md (below)
--jsonput one result object on stdout in the reply's place (below)
--json-streamwrite one event per line as the run goes, then the result object (below)
--input-format linesread turns, steers, answers and stops from stdin, a JSON object to a line, for as many turns as it is sent; implies --json-stream (below)
--trust-input-lineswith --input-format lines, treat the lines as your own words and not a program's (below)
--approve-input-lineswith --input-format lines, let the program sending the lines approve or decline each write, run or fetch (below)
--traceprint the audit trail to stderr
--vetlet a check answer about a quarantined slot, for this run: it releases what it finds nothing in, and where nobody can be asked it keeps back everything else (below)
--tools <a,b,c>offer the agent only the named tools; a tool a setting removed stays removed, and no MCP server's tools are offered (below)
--no-shelloffer no tool that runs a program or reads what one printed: run, read_output and job_output (below)
--lockedas --safe, and read no project or local settings file; refuse --dangerously-skip-permissions and --dangerously-bypass-approvals-and-sandbox and make the bypass mode unreachable (below)
--safeload none of your hooks, skills, definitions, MCP server requests or AGENTS.md, and say so once; sign-in, model and permissions still apply
--incognitowrite nothing to ~/.bravebot: no history, no session record, no preference
--accept-editsfor a one-shot run, write files without asking; commands, fetches and a write that would create a credential are still refused (below)
--autoopen a one-shot run or a session in the auto permission mode, where a classifier answers a confined command and the first fetch of a URL (below)
--dangerously-skip-permissionsbypass every permission check; recommended only for a sandbox with no internet access
--dangerously-bypass-approvals-and-sandboxas --dangerously-skip-permissions with --sandbox off: nothing is asked, a language server's start included, and no program is confined; refused where that flag is, and beside a --sandbox other than off
-h, --helpshow the help
-V, --versionshow the version

-p may lead, as it does for other agents: bravebot -p "task".

Ten flags are taken out of the line before anything dispatches on it, so each may go anywhere and each combines with every way of starting, one another included: --incognito, --safe, --locked, --dangerously-skip-permissions, --accept-edits, --auto, --settings, --vet, --tools and --no-shell. --agent is taken out there too, and combines with a session, --plain and a one-shot run, but not with --resume, --continue, --fork or --mode manifest, a task carrying on a session included. --issue and --pr are taken out there too, and combine with a session opened by no command, -i, --resume, --continue, --fork or --from-pr, and with nothing else. --system-prompt and --append-system-prompt are taken out there as well, and combine with every way of starting except --mode manifest.

--incognito writes nothing under ~/.bravebot. See an incognito session.

--safe is for finding out whether your own configuration is why a session misbehaves. The run reads none of your hooks, skills, delegate definitions, mcp.request entries or AGENTS.md files, whether they are under ~/.bravebot or in the project, and says once what it skipped. The built-in skills and delegate kinds, --append-system-prompt and --settings are unaffected, and so are sign-in, the model, permission rules and trust. --bg refuses it.

--locked​

For a run on a shared machine, or one whose checkout you do not trust. It does what --safe does, and reads settings from only your own file under ~/.bravebot, the managed file and the one --settings names: the checkout's .bravebot/settings.json and settings.local.json are not read. It refuses --dangerously-skip-permissions and --dangerously-bypass-approvals-and-sandbox, and the bypass mode cannot be reached from the keyboard either. A permission question nobody can answer is declined, as it is in any unattended run. --bg refuses it.

--tools <a,b,c> and --no-shell​

bravebot -p "summarise this repository" --tools read_file,list_files,search
bravebot -p "fix the failing test" --no-shell

--tools offers the agent the tools it names and no others, for every turn of the run and for every delegate it starts. --no-shell takes away run, read_output and job_output. A name that is no tool is refused with the list of those that are. Both only remove: a tool your settings already removed is not offered because a flag names it, and a call to a tool taken away is refused as an unknown name even with --dangerously-skip-permissions. --tools offers no MCP server's tools. --mode manifest, --bg and the commands that start no session refuse them.

--dangerously-skip-permissions is the only way to reach the mode that answers every permission question, including the ones that decide trust, and it gives the file tools the reach of your account outside the workspace. See modes for what it costs.

--accept-edits​

Opens a one-shot run in the accepting-edits mode, so a script that only needs to change files does not have to take the larger grant. Writes go through unasked. A command, a fetch, vouching for a directory, a write the credential scan found a value in and a write to a protected path are refused, because nobody can be asked. A deny rule still holds, and an allow rule decides a command or a fetch here as it does in a one-shot run without the flag (Non-interactive use).

bravebot --accept-edits -p "apply the lint fixes"

It is refused together with --dangerously-skip-permissions, and refused where the line starts no one-shot run: a session has the mode key.

--auto​

Opens a one-shot run, or an interactive session, in the auto mode. Writes go through as they do under --accept-edits, and a command the sandbox confines and the first fetch of a URL are put to a classifier on the session's own model, which answers only by allowing. Where it does not allow, a one-shot run refuses the question, because nobody can be asked, and a session puts it to you.

bravebot --auto -p "run the tests and fix what fails"
bravebot --auto

A session takes it on a bare bravebot, -i, --fork, --from-pr, and --resume or --continue with no task, and draws the mode under the input box. Shift-Tab leaves it: the next press goes to bypassing where that is reachable and then to asking, and goes straight to asking where a settings file made bypassing unreachable. A session you resume or fork opens in auto only because the line or the setting says so.

It is refused together with --dangerously-skip-permissions or --accept-edits, and refused where the line starts neither a one-shot run nor a session, as on --plain, --bg, --handle-uri and bravebot doctor. To open every session in auto without the flag, set permissions.startInAuto in your own settings file. A flag typed on the line wins over that setting.

--mode <turn|manifest>​

bravebot --mode manifest "add a --verbose flag and a test for it"

turn, the default, observes and decides step by step, which is what a plain bravebot "task" has always been. manifest plans the whole run first and then executes it, with nothing re-planned. An unknown name is refused rather than guessed.

A manifest run asks you to approve the plan before the first step. The plan is narrated a line at a time, and the question that follows names the task in your own words, how many steps you are approving, and what a yes does not cover. It is the one question a one-shot run asks, and it is put only where both stdin and stderr are a terminal, since that is where whoever typed the command is still whoever is reading the output. With either end piped or redirected there is nobody to ask, so the run stops before its first step unless --dangerously-skip-permissions was given. A plan that failed to build is printed on stderr even without --trace, and never shares stdout with the reply.

This is a different axis from the permission mode: --mode decides when control flow is settled, the other decides who answers a prompt, and the two compose. See Plan first, then execute for the rest.

--model <name>​

bravebot --model opus "review the diff on this branch"

Names the model for one run, and outranks every other way one is named. Where no flag names one, a run asks for the model a session opening in the same directory would: a model key in the file --settings names (a checkout's own settings files cannot name a model), then the choice /model recorded, then the key in ~/.bravebot/settings.json, then an exported BRAVEBOT_DEFAULT_MODEL, then the model the build was made with. So a script uses the model you picked without your having to write it down twice, and the flag names a different one for a single run.

opus, sonnet and haiku name a tier here, exactly as they do in a settings file, and resolve the same way. Any other name is sent as you wrote it. --model with no name after it, or a blank one, is refused and the run stops: a script that computed an empty variable asked for a model, and answering it with whatever was configured is the substitution this flag exists to rule out.

Where the server answers with a model other than the one in force, both names go to stderr, whether the flag, your recorded choice or a settings file named it. Where --model named it, the run also exits non-zero, which is the part a script is certain to read. A run that named no model takes whatever was recorded or configured and does not fail over it. Two cases are neither reported nor failed: an entry that resolves per request, such as automatic-bravebot, and a backend asked by an opaque handle, which never reports back the name it was given.

--advisor <name>​

bravebot --advisor opus "plan the migration, then carry it out"

Names a second model the planner may consult during the run. The planner is then offered an advisor tool, which sends the conversation so far and a question the planner wrote to that model and returns its reply. Without the flag the model is the one the advisorModel setting names, and with neither there is no such tool. The flag wins over the setting. The name is read as --model reads it, so opus, sonnet and haiku name a tier.

--advisor with no name, a blank one, a model this machine's managed settings refuse, a model nothing is configured to serve, or --mode manifest is refused and the run stops before it starts. A turn may ask its advisor at most three times. The advisor's tokens are added to the run's total.

--processor-model <name>​

bravebot --mode manifest --processor-model haiku "shorten every README under docs/"

Names the model processors run on for this run. A processor is the isolated call that reads and rewrites a file nobody vouched for, and in a --mode manifest run it is each processing step. The planner keeps the model the run was given, so a plan can be made on a stronger model and carried out on a cheaper one. Without the flag the model is the one the processorModel setting names, and with neither a processor runs on the run's model. The flag wins over the setting, and inherit puts processors on the run's model whatever the setting names. The name is read as --model reads it, so opus, sonnet and haiku name a tier.

--processor-model with no name or a blank one is refused and the run stops before it starts. So is a model that your administrator refuses or that no configured service answers for: nothing is sent, and the run is not started on the run's model in its place. A model that needs a sign-in this machine has not made, and the same models named in the processorModel setting, are met at the first processor instead, which in a manifest run is after the two planning calls. --trace prints the model each processor call asked for.

--effort <level>​

bravebot --effort high "why does this test fail only on the second run?"

Names how hard the model is asked to think for one run, in the words /effort takes (low, medium, high, xhigh and max, in any case), and outranks every other way one is named. Where no flag names one, a run asks for the level a session opening in the same directory would: an effort key in the checkout's settings or the file --settings names, then the level /effort recorded, then the key in ~/.bravebot/settings.json. Nothing is recorded, so the next run is back to those.

--effort with no word after it, a blank one, or a word that is no level is refused and the run stops, naming the levels it takes. A level the model in force reads none of is not sent, as it is not from any other source.

--trust-workspace​

bravebot --trust-workspace -p "summarise what src/ does"

Starts the run from what a yes to the startup question writes: the working directory and everything beneath it is trusted, so the planner can read project files. Nothing is written to ~/.bravebot/trusted. Directories opened with --add-dir are trusted with the working directory (below). A run carrying on an earlier session keeps that session's trust and adds the working directory to it.

It is a flag and nothing else: no settings file, environment variable or file in the directory turns it on. A run in a directory about which a session kept an answer (r), or inside the git worktree whose root it was kept about, opens trusting the directory without the flag and says so on stderr.

--add-dir <path>​

bravebot --add-dir /srv/other-checkout "how does their error type differ from ours?"

Opens a directory outside the working one for the length of the run, and may be given more than once. An absolute path outside the working directory is otherwise refused whatever else is true, so without this a task pointed at one checkout cannot read another at all.

It makes the directory reachable, and trusted where the run trusts its working directory. With --trust-workspace, or a kept answer about the directory the run works in, each directory --add-dir opens is trusted for the run as /add-dir trusts its directory in a session, and nothing is written to ~/.bravebot/trusted. Without either, a file read there is quarantined on the same terms as a file nobody vouched for, since a tree beside the project must not end up better trusted than the project. The trust approves no effect: a write there is refused as any write in an unattended run is. A directory a settings file declares under references is reachable the same way and is never trusted with it.

The path may be relative, and is resolved against the working directory as /add-dir resolves one, so --add-dir ../notes opens the directory beside the working one. A leading ~ is not expanded here; the shell ordinarily does that before bravebot sees the path. The resolved path must exist, must be a directory, and must not already sit inside the working one. Anything else is refused by name and the run stops before the turn, rather than failing further in over a file it was told it could open.

--settings <path>​

bravebot --settings ./ci/bravebot.json -p "run the checks and summarise what failed"

Reads one more settings file for the length of the run, above the three Configuration resolves. It resolves as those do, a name at a time, so a file that sets one value leaves everything else a person and a checkout configured in force.

The three layers that are found are properties of a person, of a checkout and of a machine, and none of them is a property of one invocation. This is how a CI job or somebody holding two accounts configures one run differently from the next without editing the home directory or the checkout.

Given twice, the last file named is the one read, and naming a file that is already one of the three reads it once. A path naming no file, and a blank path, are refused by name and the run stops before it starts, because a run told to configure itself from a file is a run whose configuration is that file: carrying on under whatever the directory happened to hold would be the wrong configuration used in silence. A mistyped path and a variable that expanded to nothing look the same from here.

The named file can grant allow rules, sandbox.mode and run.network, so it is protected as .bravebot is: a write to it through a tool asks, even in accepting-edits mode, a run redirection into it asks, and on macOS a command cannot rewrite it. On Linux and Windows nothing holds one file back from a command that may write the directory it sits in, so a named file inside the working directory or a directory opened with --add-dir, /add-dir or --sandbox-allow-write is read as a checkout's file is: it grants no allow rule, no sandbox.mode and no run.network, and bravebot doctor and the opening of the session say so. Name a file outside those directories for its rules to apply there. Its deny and ask rules apply wherever it is.

What is checked is that the file is there. What is in it is read by the rule every layer gets, where a file that is oversized or unparseable leaves the others in force, and bravebot doctor lists the layers it read, so a named file that did not parse shows up by its absence from that list.

--issue <url> and --pr <url>​

bravebot --issue https://github.com/brave/bravebot/issues/1267
bravebot -i "work on this issue" --issue https://github.com/brave/bravebot/issues/1267
bravebot --resume <id> --pr https://github.com/brave/bravebot/pull/1270

Set the session's issue or pull request link as /issue and /pr do, so the info panel says what the session is about from the first frame. A value that is not one http or https address with a host in printable ASCII is refused before the session opens, with status 2, and the message does not repeat it. A missing value is refused too. Given twice, the last of a kind is used. On --resume, --continue and --fork the link replaces the one the record held, and a link the line does not give is left alone. A line that opens no interactive session (a one-shot run, --plain, --bg or a command such as doctor) refuses them rather than dropping them.

--agent <name>​

bravebot --agent rule-reviewer
bravebot --agent rule-reviewer -p "review the diff on this branch"

Addresses every turn of a session, a session in lines or a one-shot run to one of your definitions, from the first turn on. /agent does the same for a single line. Typed lines, /loop ticks and /goal rounds are all addressed to it. A /agent line naming another definition addresses that one for one turn, and the next line goes back to the one you started with. Replies are drawn under its name, and /status shows it.

The name is checked before anything is sent. In a session, that happens after you answer the question about the directory, because the set of definitions depends on the answer. A one-shot run reads only your own definitions, in ~/.bravebot/agents. It does not ask whether to trust the checkout, so it counts the definitions in the checkout's .bravebot/agents without reading them, and a name that only the checkout defines is refused with a message saying so. A name no definition has is refused with the list of names that exist. A definition whose model needs a sign-in this machine has not made is also refused. Each refusal exits with status 2.

If --agent is given twice, the last name is used. A blank name, or one opening with -, is refused.

The session record keeps the name. --resume, --continue, --fork, --from-pr, /resume and a -p run carrying a session on all work under the definition the session was started under, so bravebot --resume <id> needs no --agent. A --agent given with one of them names the definition for that session instead. If the recorded definition no longer exists, the session opens without it, says which definition is gone and that the narrowing is gone with it, and stops recording the name. A recorded definition whose model needs a sign-in is refused rather than replaced by the planner.

To start every session under one definition without typing the flag, set agent in your settings. --agent outranks it, and so does the name a resumed session's record carries.

A model the definition names is the one every turn uses. In a session, /status shows it as the definition's, and /model is refused. On a one-shot run, --model outranks the definition's model, and the run says so on stderr.

note

Under --agent, a /loop with no interval stops after one tick, because an addressed turn cannot schedule the next one. Give the loop an interval to keep it running.

--system-prompt <prompt> and --append-system-prompt <prompt>​

bravebot --append-system-prompt "Answer in French." -p "summarise the last commit"
bravebot --system-prompt "You are a release-notes editor." -p "draft the notes"

Puts your own words in the system prompt of one run. They apply to every turn of it: typed lines, /loop ticks and /goal rounds.

--append-system-prompt adds the words as the last standing source, after the project's AGENTS.md, so they have the last word (Instructions). --system-prompt replaces the opening of the system prompt, the paragraph saying what kind of assistant this is. It does not replace the rest. What teaches the planner that a tool's output is data, the facts about your machine, the mode and the goal are still sent. A delegate is given the appended words and never the replaced opening. The aside, the summary, the goal check and the other checks are given neither.

The words grant nothing. A write is still put to you where it would have been, and plan mode still refuses it. A session record does not store them, so resuming without the flag runs without them.

The words carry your authority, whatever they came from. --append-system-prompt "$(cat x)" gives the file's bytes the same standing as something you typed. Content that should not have that standing is better piped in, where it is quarantined.

A flag with no words after it, a blank one, or one whose words open with - and hold no space is refused with status 2. A sentence opening with - is words. If a flag is given twice, the last is used. Both are refused with --mode manifest, and with doctor, bug-report, auth, mcp, permissions, stats, import-leo-creds, import-providers, completion, shell-init and acp. There is no settings key for them: words a checkout always wants belong in its AGENTS.md.

--json​

bravebot --json -p "what changed on this branch?" | jq -r '.reply'

Puts one object, on one line, on stdout, in the reply's place. It is written whether the run finished, failed before the turn began, or was refused something along the way, so a caller never has to tell an empty stdout from a result.

It holds how the run ended, the status and identifier, the message where there is one, the reply, the model that answered, the definition it was addressed to under agent (null where none was), the session it wrote down under session (null where it wrote none), how many rounds it took, what it cost in tokens, every tool it called with what it acted on and whether that call was refused, and every refusal with the principle it upholds. A tool is named as the driver matched it rather than by the word you are shown on screen, and what a call acted on is the name it was given rather than a resolved path.

Progress, the message and the audit trail stay on stderr, exactly as they do without the flag.

It carries a schema number. Within one number a field may be added and never removed, renamed or given a different meaning, so a caller reading the fields it knows keeps working. structured is the reply as a JSON value when the run was given --output-schema, and null otherwise.

--output-schema <path>​

bravebot --json --output-schema ./verdict.json -p "do the tests cover the parser?" | jq '.structured.verdict'

Reads a JSON Schema from the file, sends it to the service with the run's requests as the shape the reply must take, and checks the finished reply against it before anything is written. The file is yours, trusted as --settings is, and the model never sees its path.

A reply that conforms is written as usual, and under --json it is also in structured as a JSON value rather than a string. A reply that does not conform ends the run on status 6 (BB1006): nothing goes to stdout, structured is null, and the message on stderr says where the reply broke and which constraint, for example $.verdict and an enum. The reply is read as one JSON value with nothing around it, so a reply wrapped in a code fence does not conform.

The check covers type, enum, const, properties, required, additionalProperties as true or false, items as one schema, minItems, maxItems, minLength, maxLength, minimum and maximum. $schema, $id, title, description, default and examples are accepted and constrain nothing. Any other keyword, $ref, oneOf and pattern included, is refused when the file is loaded rather than ignored.

The flag is refused with status 2 before anything is sent when no path follows it, when the file cannot be read or is not a usable schema, with --mode manifest, and when the model cannot honour a schema: Bedrock, or a model whose listing states its supported parameters without structured_outputs or response_format. A model whose listing states none is asked, and the check after the turn is what holds the reply there.

--goal <condition>​

bravebot --goal "docs/api.md documents every public function in src/lib.rs" \
-p "document the public API in docs/api.md" --accept-edits

Keeps a one-shot run working until a condition you wrote is judged met, as /goal does in a session. The prompt is the first round. When a round ends, a judge with no tools reads a copy of the conversation and answers MET, NOT MET or IMPOSSIBLE on its first line. On NOT MET the work goes back for another round with the reason, and the run ends when the judge says MET. Every round is told the condition, and nothing a round reads or writes changes it. Files and piped input given with the prompt go to the first round only. The judge reads the conversation and runs nothing, so a condition is met only when a round observed it. With nobody to ask, a run is refused unless --dangerously-skip-permissions is given, so a condition about what a command prints needs that flag, and one about files can be observed without it.

The status says how it ended. MET ends as the rounds alone would have, usually 0. Status 7 (BB1007) is a run that did its work and did not meet the condition: the work was sent back ten times, three rounds in a row made no tool call, the judge said IMPOSSIBLE, or its answer began with no verdict or could not be read. A refusal in any round is status 4 and outranks it, and the message still says the condition was not met. A judge that cannot be reached ends the run on status 1 or 5 as any failed request does. stdout is the last round's reply, or the result object under --json, whose steps and tokens cover every round and every check. After each check one line on stderr gives the verdict and its reason.

The run is written down as one session, so --resume carries the whole conversation, and the condition is not carried with it. The flag is refused with status 2 before anything is sent when no condition follows it, when it is blank or is the next flag, and with --mode manifest, --max-rounds or --max-tokens. A summaryModel that cannot be used for the judge is refused with status 3 before the first round.

caution

Every round re-sends the conversation. Ten rounds of a long task cost more than ten ordinary turns, and a condition the conversation can never show to be met spends all ten.

--max-rounds <n> and --max-tokens <n>​

bravebot --json --max-rounds 30 --max-tokens 400000 -p "update the changelog"

Two limits on a one-shot run, for a job that has to bound what a run costs or how long it takes.

--max-rounds is the most rounds of tool calls the run may make. When the agent asks for another round after that many, the calls are not run and the run stops. --max-tokens is the most tokens, input and output together, the run may have spent when it is about to send a request. At or over it the request is not sent. The count is the one the result object reports as tokens.total, so the figure from an earlier run is the number to choose from.

A run that reaches either ends on status 8 (BB1008). The message on stderr says which limit it was and nothing goes to stdout. Under --json the object has "reason": "limit", the rounds the run made in steps, the tokens it spent and the calls it made, and reply is empty. The files it had changed stay changed, and no session is recorded for it.

A run that finishes within the limits is not affected. An agent that answers after its last allowed round has reached nothing. An answer that takes the total past --max-tokens is still written, because the limit stops a request from being sent and none is left, so --max-tokens bounds what the run sends next and not what it has spent. The count comes from the usage the service reports, so a service that reports none never stops a run at it, and a delegate still running when the run stops is waited for and its tokens are in the total.

Each takes a whole number written in digits, 1 or more. --max-rounds is below 200, the bound every one-shot run carries, which has the agent answer with what it has and exits 0. Either flag is refused with status 2, before anything is sent, when its value is anything else, and when --mode manifest is given, since a manifest run plans the whole run first and makes no rounds of tool calls, and when --goal is given, since each round of a goal run counts a limit from nothing and the run would spend it in every round. There is no limit in money, because bravebot holds no price table. A session has the limit setting and /limit instead.

--json-stream​

bravebot --json-stream -p "fix the failing test" | jq -c 'select(.event == "refusal")'

A --json run that also writes one object per line on stdout as the run goes, so a script can show progress, tell a hung run from a slow one, and keep what happened if the process is killed. Three kinds of event are written, each with schema and event:

eventwritten whenother fields
calla tool call finishestool, target, refused, as in the result object's calls
refusala gate refuses somethinggate, principle, reason, as in the result object's refusals
usagethe run's token usage changes, which is when a model request finishestokens, the cumulative counts

The last line is the result object, exactly what --json writes for the same run. It has no event field. Nothing else is on stdout, and progress, the message and the audit trail stay on stderr. The schema rule of --json applies to each event: fields and event kinds may be added within one number, and none is removed or renamed.

--input-format lines​

bravebot --input-format lines --trust-input-lines -p "review the diff" < turns.jsonl

One process that reads JSON lines on stdin for as many turns as it is sent. It is a --json-stream run, writing the events and each turn's result object. Each line is one JSON object with a type:

typeother fieldswhat it does
prompttextstarts a turn with those words; one that arrives while a turn runs waits for its turn
steertextreaches the turn that is running at its next round, as a line typed mid-turn does; one sent while no turn runs, or that the turn ended without taking, starts a turn of its own
answerid, choices or textanswers the question or permission event with that id; choices is one array of choice positions for each question, an empty array declining it; text answers a question of one prompt in words, and is taken only with --trust-input-lines
stopnoneends the turn that is running and leaves the prompts behind it to run

The words on the command line are the first turn, and --file and --session-ref attach to it alone. Each later turn carries on the session record the one before wrote, as -p with --resume does, and ends with a result object of its own, so session is the same id throughout. A turn that wrote no record, because the record could not be written, leaves nothing to carry on from, so the turns after it are not run and each says so. The process exits when stdin closes and the last turn has ended, with that turn's status. Stdin closing before any prompt arrived is a run with no task and exits on status 2.

A line is a program's words until you say otherwise. Without --trust-input-lines the text of a prompt or steer is labelled as piped input is: untrusted and private, so the planner is given a reference to it and never the words, and a steer waits for a turn of its own. With the flag the lines are your words, a prompt is the prompt of its turn and a steer is delivered to the turn running. The flag vouches for the words and nothing else. A write, a command, a fetch and every other question are still refused, as in any run nobody is watching, and no line approves one unless you also typed --approve-input-lines.

Questions. A question the planner asks is written as a question event and the turn waits for the answer:

{"schema":1,"event":"question","id":1,"questions":[{"header":"Cache","question":"Which cache?","choices":[{"label":"HTTP","detail":null},{"label":"Query","detail":null}],"multiple":false}]}
{"type":"answer","id":1,"choices":[[1]]}

An answer is positions among the choices the planner offered, sent after the question event it names. With --trust-input-lines it can instead hold text, the words you want to give for a question of one prompt, and a line with both is taken as its choices. Without the flag a line with text is refused as not_vouched and the question keeps waiting. A line is refused when no question with that id is waiting or the positions do not fit the question. A question still waiting when stdin closes, or when the turn is stopped, is declined.

Approving a write, a command or a fetch. With --approve-input-lines a write, a run or a fetch that would ask you is written as a permission event and the turn waits for the answer:

{"schema":1,"event":"permission","id":2,"kind":"run","call":{"command":"make test","directory":"."},"choices":[{"label":"reject"},{"label":"approve"}]}
{"type":"answer","id":2,"choices":[[1]]}

kind is write, run or fetch, and call holds the words that say what the call is: path and contents for a write, command and directory for a run, url and host for a fetch. [[1]] approves that one call and [[0]] declines it. Nothing is remembered, so the next call is a new permission event, and nothing is added to your trust map or permission rules. A write to a protected path or to which the credential scan found a value, and a command that asks for credential scopes or to run unconfined, are not put to the program and stay refused. A decline, stdin closing and a stop each decline it, and a decline ends the run on the status for a refusal.

A line that is not taken is written as an input_refused event with line, its number counted from 1, and reason: unreadable (over the size cap of piped input, or not UTF-8), not_json, unknown_type, bad_field, no_such_question, not_vouched (an answer with text where nobody typed --trust-input-lines) or too_much_waiting (the prompts waiting for a turn already hold as many bytes as that cap). The event holds nothing the line said. A blank line is ignored, and a field a line's type does not use is skipped.

The flags are refused with status 2 before stdin is read when --input-format names anything but lines and with --mode manifest, and when --trust-input-lines or --approve-input-lines comes without --input-format lines. --approve-input-lines is also refused with --accept-edits, --auto and --dangerously-skip-permissions, which already answer what it would.

Under --incognito no record is written, so each turn is carried on from the conversation held in memory for as long as the process runs. Every result names no session.

Continuing a session from a one-shot run​

id=$(bravebot --json -p "review the diff" | jq -r '.session')
bravebot -p "now fix what you found" --resume "$id"
bravebot -p "summarise what changed" --continue

A one-shot run is written down as a session of one turn, unless --incognito is given, and its --json object names the record under session. A run that failed writes none, and session is null.

--resume <id> and --continue given with a task run that task as one more turn over the session's conversation, in either order with -p, and write the record back with the turn added. The run is a one-shot run in every other respect: nothing is asked, a write is refused unless --dangerously-skip-permissions was given, and --incognito leaves the record as it was. The paths you vouched for in the session still count. The commands you vouched for do not, and stay in the record for the next time you resume it interactively. Content a run could not show the planner, such as piped input, stays a reference, and the follow-up is told the reference names nothing now.

The turn adds a rewind point behind the record's own, so /undo in the session you resume next takes back only that turn, its files included. A program the turn ran is shown as something the undo cannot put back.

Given with no task, --resume and --continue open the session as they always have.

Both are refused with the argument status before anything is sent when the id names no session in this directory, when --continue finds none, when the session is a --mode manifest run or is running in the background, and with --agent or --mode manifest.

-i <prompt>​

bravebot -i "fix the failing test in crates/parser"
bravebot --dangerously-skip-permissions --interactive "fix the failing test, then run the suite"
bravebot -i "review the diff" --model opus --effort high

Opens the session a bare bravebot opens and sends the prompt as its first turn, as though you had typed it and pressed Enter, so you can watch the work, stop it with Esc and carry on from the reply. It is sent once every question the session opens with is answered, the one about trusting the working directory included, and leaving at one of them sends nothing. A prompt opening with / or ! is sent as words, as -p sends it, not run as a command. bravebot "<task>" is still the one-shot run.

The prompt is one argument, so quote it; its line breaks are kept. Characters a terminal draws as nothing are removed from it, as from a paste, and the session says how many. -i goes first, and the flags that combine with every way of starting go anywhere around it, as they do with a bare bravebot. Only --model <name> and --effort <level> may follow the prompt, in either order. They apply to this session only and are recorded nowhere, so the next session opens on the model and level it would have without them. A blank name or a word that is no level is refused with the argument status, and a model that nothing serves ends the start before the screen opens, as it does for a one-shot run. /model and /effort change them once the session is open as they always do. --file and the other options for a task belong to a one-shot run and are refused here rather than ignored.

It is refused with the argument status when no prompt follows it, after --resume, --continue, --fork, --from-pr or --bg, and where stdin or stdout is not a terminal, since there is nothing to draw the session on. Use -p for a run nobody watches.

bravebot --handle-uri 'bravebot://open?dir=%2Fhome%2Fme%2Fproject&prompt=fix+the+failing+test'

What a bravebot://open link runs. On Linux install.sh and on Windows install.ps1 register it, so opening such a link in a browser starts a terminal with this command. You do not type it.

A link carries two optional parameters, percent-encoded: dir, an absolute path, and prompt. Anything else in a link, a mode, a tool, a model or dangerously-skip-permissions among them, refuses the whole link with the argument status, since a link has no say in how the session runs.

  • Where it starts. In dir only if you already answered yes to trusting that directory in an earlier session. Otherwise in your home directory, and the first line of the session says so. The question about trusting the directory is asked as in any session.
  • The prompt. It is put in the box as a paste is, and is not sent. The line under the box says it came from an external link, and over 1000 characters says how many there are and asks you to scroll and review it. Enter sends it as your own message, as it sends any paste, so read it first. The note goes when the box is emptied or the message is sent.

Links are switched off by deepLinks, and the installer registers nothing where BRAVEBOT_NO_DEEP_LINKS is set. macOS registers nothing yet.

--plain​

bravebot --plain

An ordinary session with nothing drawn: the same turns, the same conversation carried between them, the same trust map and the same questions. None of what the drawing interface takes from your terminal is taken here, so what the terminal held before is where it stays, the session's own lines are added to its scrollback, nothing is repainted, and nothing moves on its own.

A line you type is a prompt and Enter sends it. A blank line is not a prompt. The end of the input ends the session, and it is the only way out: no chord is read, because none can be. The keyboard is the terminal's, so its own interrupt ends the process.

Every question is put in lines: what it is about, then the question, then how to answer it. Only the affirmative approves, and any other line refuses, as does the end of the input. One answer per question and no second key, so the answers that grant something standing are not offered and nothing answered here outlives the session, except the yes to the question about the working directory, which is kept as it is in the drawing interface, after lines that say so and name the file. A directory whose yes was kept is not asked about here; the session says it is trusting it for that reason and names the file that holds the answer: delete the lines about the directory from it to be asked again.

stdin must be a terminal, and --plain is refused where it is not, naming -p as the invocation that reads a pipe. It composes with --incognito, --dangerously-skip-permissions, --settings and --agent, and with nothing else: it starts a session rather than describing one.

What it does not have, each being a thing the interface draws or a thing that needs what it draws: the scroller and its search, the key list, the slash commands, @ naming a file, a picture on the clipboard, and the audit trail under a key. No session record is written either, so nothing picks a session in lines up again and a later --resume will not find it.

caution

A line typed before a question was asked is read as the answer to it. The terminal queues what is typed and this reads a line at a time, so somebody who pastes several lines at once has typed all of them before anything asked them anything, and a question raised while those lines are still queued takes the next one as its answer. Only the affirmative approves, so the line has to be exactly that word for an effect to follow.

--log-level <error|info|debug>​

Brave Bot keeps a diagnostic log you can attach to a bug report. It records the shape of a failure: the host a request went to, the status it came back with, how many attempts were made, and whether a language server or an MCP server started. A reply that is reset, cut off or runs out of time while it is still being read counts as a failed request. A request you stopped, and a read that fails after you stopped it, are not recorded as failures. It never records a prompt, a reply, a file's contents, a header, a credential or the text of an error.

Each run that has something to write makes its own file in logs/ in the state directory, readable by you alone, and the ten most recent are kept. At the default level, error, a run that fails nowhere leaves no file. info adds the steps taken, such as a retry or a server starting, and debug adds the detail between them. doctor prints the directory.

An --incognito session writes no log.

When the desktop app's page fails, the window shows a "This window hit an error" screen with Reload and Copy details, where the details are the error, the components being drawn and the stack, shown as text and sent nowhere. The app also asks the agent to write one window.fault line for the failure, for an error nothing caught, for a promise nothing handled, and for the window's process or another process of the app ending. The line holds the kind of failure and, where known, the error's name, Electron's reason, the process and an exit code, as fixed words; anything else is written as other. At most twenty are written in a run, and none in an incognito session.

bug-report​

bravebot bug-report

Writes bravebot-bug-report.txt in the current directory, readable by you alone, and prints its path. A file of that name is never overwritten: the next report is bravebot-bug-report-1.txt.

The file holds the version and target, everything doctor prints, and the path of the newest diagnostic log. The log's own lines are not copied in, so attach that file as well. doctor names paths, model services and the names, never the values, of environment variables, so read the file before posting it. No transcript, trace, settings file, environment value or file of the directory holds a place in it.

Nothing reads the file back. An --incognito session, or a machine with no home directory, writes no report, and the command exits with status 1. Any argument is refused with status 2.

In the desktop app, Help ▸ Report a Bug… (also a link in About) opens a preview of the same report, with the settings report from Run Diagnostics in place of doctor's output and a note saying what it names. Save Report… writes it where you choose, bravebot-bug-report.txt in Documents by default, readable by you alone. Copy puts it on the clipboard, Open an Issue opens the repository's new issue page with nothing filled in, and Show Log reveals the newest diagnostic log in your file manager without opening it. Nothing sends the report. An incognito session, or a machine with no home directory, is told a report is not available.

update​

bravebot update

Prints the command that updates this copy, and runs nothing. Seven installations have a command it can name:

How this copy was installedWhat it prints
the npm package @brave/bravebotnpm install -g @brave/bravebot@latest
install.shthe same curl line that installed it, piped to sh
install.ps1the same irm line that installed it, piped to iex
the Homebrew caskbrew upgrade --cask bravebot
the WinGet packagewinget upgrade Brave.Bravebot
the apt packagesudo apt update && sudo apt upgrade bravebot
the dnf packagesudo dnf upgrade bravebot

The apt and dnf packages put the binary at /usr/bin/bravebot. A binary there is theirs when the package manager's files say so: the list dpkg keeps for the bravebot package for apt, and an rpm database with the bravebot.repo file for dnf. A binary at that path that those files do not account for is told there is no command, as a build from source is.

A copy none of those put here, a build from source above all, is told there is no update command for it; that is a success, since nothing on the machine is wrong. The lines are not interchangeable: the npm one installs a package manager's copy, which leaves a script install's binary untouched, the shell script's one cannot run in a Windows shell, and each script's one writes over the path that script recorded.

It asks nothing of any registry, so the command is the same whether or not a newer version has been published and no version is named. Whether one is out is said once at the top of an interface session instead. Any argument is refused with status 2.

--vet​

bravebot --vet -p "read the linked issue and tell me what it is asking for"

Turns auto-vetting on for the length of the run: where a check completes and finds nothing, the quarantined slot the planner asked to be shown, or the output it asked to read back, is released without a prompt. Given twice it is given once, which is asking for something already on rather than an error.

A one-shot run has nobody to ask, so a check on this path would otherwise end in a refusal whatever it found. The flag is what says in advance that a clean check may answer, and it is a narrower statement than --dangerously-skip-permissions: it answers one question, about one slot at a time, and only where a check completed and found nothing.

Paired with --dangerously-skip-permissions it is also what lets a check refuse. That mode releases those two slots unshown on its own; with this flag the check's word is what answers instead, so a verdict that objects, or a check that did not complete, keeps the bytes back and the model is told the slot was kept from it. The model reads the same refusal it reads in every mode, and the person is also told, on the run's output, that auto-vetting kept the bytes back. That is the way to screen a run nobody is watching. It costs a model call per release, in the run's own critical path, and the bytes reach the backend to be checked whether or not they are then released.

It outranks both standing answers, a recorded off included, because it is the narrowest in time. There is no flag the other way: for one run without it, change the file the standing answer is kept in. See Vetting.

doctor​

bravebot doctor

Answers "what will this actually use", and changes nothing. Text it names from a settings file, such as a rule, a key or an environment name, is drawn with its control characters replaced, because the project and local files belong to whoever made the checkout. It reports:

  • every backend this build can reach and what identifies it, which names the settings set;
  • the premium host and whether a premium key is stored, never its value, and the premium key file's path where it cannot be read (Brave's premium service);
  • for each AWS account, whether it is signed in, and bravebot auth login bedrock where signing in is what is missing;
  • which settings files are in force, and which of them won a name more than one set;
  • any key in a settings file that this build does not read, at the top level or inside permissions, sandbox.filesystem or run, by name and file, never its value: the file still applies and the report still passes. A key a file wrote twice and a managed retrieval value that pins nothing are named the same way, even where the configuration cannot be used. A session names all of these as it opens, and a one-shot run names them on stderr before its task starts;
  • any project or local settings file whose provider block or model key was ignored, since those two are read from your own file and the one --settings names;
  • whether a gateway key is stored by bravebot auth login gateway, without printing it;
  • where a ChatGPT sign-in is stored by bravebot auth login chatgpt, when its access token expires and what would end it, without printing either token, nothing where none is stored, and that the file cannot be read, with the remedy, where it cannot, which fails the report;
  • where an xAI sign-in is stored by bravebot auth login xai, when its access token expires, that the access token is sent to api.x.ai alone and the refresh token to auth.x.ai alone, and what would end each, without printing either token, nothing where none is stored, and that the file cannot be read, with the remedy, where it cannot, which fails the report;
  • any settings file that tries to declare an MCP server, which fails the report, since only ~/.bravebot/mcp.json declares one;
  • which names a machine-level file pinned, and where that file is;
  • how to configure a model service where nothing configured will serve a turn;
  • the model in force, and whether it was chosen or defaulted;
  • where the state directory is, or that there is none, and the diagnostic logs in it;
  • what a TLS handshake is validated against, and what a request is routed through;
  • the confinement available on this platform, and the sandbox mode in force with where it came from. A --sandbox flag given to doctor counts, and one a managed file refuses is named.
bravebot doctor --sandbox-check

Runs everyday workflows under the sandbox the way a person's shell command would: git init, commit and branch, a script, make, cargo build and test, npm, Python, Go, gh offline and an editor. Each runs on a throwaway account that holds a credential of each kind. It also runs the rows that must stay refused, a read of an SSH key or AWS credentials and a write beside or outside the session. A workflow that works without the sandbox and fails with it is reported with its stage, its exit code, a fix and a log path. A program that is not installed is reported as skipped, by name, and does not fail the report. It exits non-zero when a workflow fails or a refused row gets through. When gh holds a login in your own home, it also checks that gh can still read that login under the sandbox, and the fix for a failure names sandbox.filesystem.allowRead. It takes no further argument.

bravebot doctor --push-identity [<host>/<owner>]

Asks the host which account each ssh public key pushes as: the keys at ssh's default names and the ones an IdentityFile line in ~/.ssh/config names. Each key is tried alone, so the answer is for that key. The report gives its fingerprint and the login the host names, or says that no account has the key or that the host did not answer. The login is compared with the owner you gave, or with the owner in the address of origin in the directory you ran it in. The host is github.com where neither names another. It runs only when you ask, because a hardware key waits for a touch, and it gives each key 60 seconds. ssh-keygen, ssh and git are found only in PATH entries that lie outside the directory you ran it in and the checkout holding it, so a program planted there is reported as absent rather than run, and they start without Brave Bot's own credentials (Security). Every bravebot command records the directory it was run in and its checkout, the nearest directory above it that holds a .git, before it looks up a program, so the same holds for bravebot doctor, bravebot auth and bravebot schedule. A directory with no .git above it, or one marked by .hg or .jj, has no checkout and only the directory itself is left out. More than one argument, or one that is not <host>/<owner>, is refused with exit status 2.

No value from a settings file is ever printed. Where a credential decides whether a backend works, what is reported is that one was found, because a settings file holds credentials on some machines and this is the report people paste into issues. The signing key is named as never transmitted. The endpoint host and the key id are printed here and left off /status.

The state directory is named with the variable that answered for it. Where there is none, the report says which variables were looked at, what is not kept without one, and that a checkout's own settings, skills and instructions are read regardless. On a platform where the files under it cannot be restricted to one account, the report says which of them carry the permissions of the profile directory instead. That is worth knowing before typing a token into a prompt, since the prompt history is every path, branch name and pasted fragment somebody has typed.

A configuration error makes it fail rather than pass with a warning. Four things it can report are errors of that kind: a named path that yielded no certificate, a set of trust roots that leaves nothing trusted, a proxy named in a protocol this build cannot connect through, and a configuration naming nothing that will serve a turn. A missing state directory is reported rather than failed on, because a container or a daemon with no profile directory runs as designed. The report ends on the configuration error and exits with status 3, printing BB1003 in front of it as any failed run does.

In a Bravebot source checkout it also reports whether the root AGENTS.md resolves to agents/AGENTS.md and whether direnv is executable on PATH. These are development advice, do not change the exit status, and are shown in no ordinary workspace. Nothing is repaired: somebody runs this to learn what is wrong, and a report that fixed what it found would leave them unable to tell what was already true.

auth​

bravebot auth login [brave | bedrock | import | gateway [id] | chatgpt | xai | google]
bravebot auth logout brave
bravebot auth logout gateway [id]
bravebot auth logout chatgpt
bravebot auth logout xai
bravebot auth logout google
bravebot auth status [brave | bedrock | gateway [id] | chatgpt | xai | google]

With no way named, auth login lists the ways to sign in, marks the ones already in use, and asks which to run. It needs a terminal for that. A script names the way instead:

WayWhat it runs
braveasks for a premium key with nothing shown as it is typed, and keeps it in ~/.bravebot/brave-key.json, asking first before it replaces one already stored (Brave's premium service)
bedrockthe AWS sign-in a session would make on its first turn, for every account the configuration names, then sets BRAVEBOT_USE_BEDROCK to 1 in ~/.bravebot/settings.json once the AWS_PROFILE account signs in, unless that file names it, something turns Bedrock off, or the session is incognito
importwhat import-providers runs
gateway [id]asks for a key for openrouter, openai, anthropic, google-vertex (Gemini on Google Vertex AI) or a gateway a provider block names, with nothing shown as it is typed, and keeps it in ~/.bravebot/gateway-keys.json. For one of those that no block names it then adds "provider": {"<id>": {}} to ~/.bravebot/settings.json. google-vertex first asks for a Google Cloud project and, with one, a location; no project is express mode and the entry then states options.project and options.location (global where none was typed) (Signing in)
chatgptprints an address on auth.openai.com and opens it in a browser, waits five minutes for the browser to return to a port on 127.0.0.1, and keeps the sign-in in chatgpt-account.json (ChatGPT)
xaiasks auth.x.ai for a code, prints an address and the code on standard error, waits for them to be used on any device, and keeps the sign-in in xai-account.json (Signing in)
googleasks for a Google Cloud project, runs gcloud auth application-default login and shows each line it writes, then adds "provider": {"google-vertex": {"options": {"project": "<project>", "location": "global"}}} to ~/.bravebot/settings.json and stores no key (Signing in)

brave and google need a terminal, and are refused with status 2 where standard input or standard error is not one. gateway needs a terminal even with the id named, since the key is typed rather than given as an argument, and google-vertex asks for its project and location first. A project or location Google cannot build a Vertex AI host from is refused with status 2 before the key is asked for, and nothing is stored. A word after the id is refused with status 2 by auth login, auth status and auth logout alike, and is not repeated, since it may be a key. With one service offered it asks for no id. Where the machine-level file names the gateways, only those are offered, and the list and the refusal of any other id name that file.

auth logout brave removes the stored premium key and ends nothing at Brave, where the key still works until it is revoked. auth logout gateway [id] forgets a stored key, and the id can be left off when only one is stored. It names the host the key still works at, and leaves the settings as they are. For google-vertex it names the host of the entry in settings, or aiplatform.googleapis.com where none names it. auth logout chatgpt forgets the stored ChatGPT sign-in and ends nothing at OpenAI, and auth logout xai forgets the stored xAI sign-in and ends nothing at xAI. auth logout google removes the google-vertex block auth login google wrote, only where it still holds exactly that, and leaves the Google Cloud CLI's sign-in in place unless a yes is typed at the terminal to gcloud auth application-default revoke --quiet. In an incognito session the brave, import, gateway, chatgpt, xai and google ways are refused, and bedrock, auth status and every form of auth logout are allowed. See Signing in.

auth status prints one line per sign-in and changes nothing:

$ bravebot auth status
brave: signed in: a premium key is stored and is sent to Brave's premium service alone
bedrock: not signed in: the AWS session has lapsed: run `bravebot auth login bedrock`
gateway openrouter: signed in: stored by bravebot auth login gateway (never printed)
chatgpt: signed in: the access token expires 2026-10-22T21:05:27Z
xai: signed in: the access token expires 2026-10-22T21:05:27Z and is sent to api.x.ai alone, and the refresh token is sent to auth.x.ai alone
google: signed in: the Google Cloud CLI gives an access token, which a session sends to the Vertex AI host of the project google-vertex names and to no other host

A line says signed in, not signed in (signing in fixes it), or unusable (it does not: an unreadable file, a missing aws), with the reason and what to run. For Brave it says a premium key is stored and is sent to Brave's premium service alone, or that none is stored and to run bravebot auth login brave, or that the file cannot be read, naming it. For ChatGPT it says when the access token expires, and a token past that time is still signed in, since the next request replaces it. For xAI it says when the access token expires, and that a token past that time is still signed in, that the access token is sent to api.x.ai alone, and that the refresh token is sent to auth.x.ai alone. For Google it says the Google Cloud CLI gives an access token, asked for without a sign-in or a browser, or that it gives none and to run bravebot auth login google, or that no block or GOOGLE_CLOUD_PROJECT names a project it signs in, or that gcloud is missing or did not answer within twenty seconds. Only counts and fixed sentences are printed, never a credential. For Bedrock the reason is one of four fixed sentences: the AWS session has lapsed, the AWS CLI has no profile by the name you set, the AWS CLI is not installed, or the AWS CLI answered with something that is not a credential. What the AWS CLI itself printed is never copied, because it can name accounts and roles. With no way named it exits 0 if any sign-in is usable. With a way named it exits 0 only if every sign-in under it is usable. Otherwise it prints a BB1001 line and exits 1, or exits 3 when the configuration could not be read. auth status import is refused, since an import keeps no sign-in. auth status gateway asks about each gateway a provider block names and about a service whose key is stored with no block naming it, and auth status gateway openai asks about that id whether or not a block names it. A key stored for openai, openrouter or anthropic with no block naming it is reported as not signed in, since no session sends it, and auth login gateway <id> records the block. google-vertex is asked about the same way, and an express entry of it with no key stored is reported as not signed in, since Vertex AI refuses a request with no key. A project the environment names alone, or a block whose env names an unset GOOGLE_API_KEY, is reported as not signed in although gcloud would sign the request, since the listing does not ask gcloud. A block that names an options.keyFile that gives no key is reported as not signed in, with the file named only as the setting, and storing a key with auth login gateway <id> makes the stored key win over the file. The desktop accounts list says the same.

import-leo-creds​

bravebot import-leo-creds

Retired. It prints that bravebot no longer imports a Leo subscription from Brave and that premium requests use a key stored with bravebot auth login brave, and it exits with status 2. See Brave's premium service.

import-providers​

bravebot import-providers

Reads what Claude Code and opencode configured in your home directory, and asks a running Ollama, LM Studio and llama-server on this machine what each serves, shows what it would add to ~/.bravebot/settings.json, and asks once for each. It takes no arguments, needs a terminal to ask on, and refuses in an incognito session. See Importing from Claude Code, opencode or a local model server.

mcp​

bravebot mcp add <alias> [-s <scope>] [-e|--env <name>[=<value>]...]... [--dir <path>] [--allowed-hosts <list>] [--startup-timeout <seconds>] [--tool-timeout <seconds>] [--tools <list>] [--exclude-tools <list>] [--ask-every-call] [--choice <tool>:<argument>]... [--openshell <image>] [--stdio] -- <program> [args...]
bravebot mcp add <alias> [-s <scope>] [--startup-timeout <seconds>] [--tool-timeout <seconds>] [--tools <list>] [--exclude-tools <list>] [--ask-every-call] [--bearer-env <name>] [--header-env <header>=<name>...] --http <url>
bravebot mcp get <alias>
bravebot mcp list
bravebot mcp approve <alias>
bravebot mcp enable <alias> [-s <scope>]
bravebot mcp disable <alias> [-s <scope>]
bravebot mcp remove <alias>
bravebot mcp forget [path]

Declares a server in ~/.bravebot/mcp.json, approves one, and asks for one in a settings file. add writes the declaration and then asks whether to use it; approve asks again later. enable asks where the server is not approved and adds it to mcp.request, and disable takes it out. -s names the file for add, enable and disable: local, the default, is .bravebot/settings.local.json in the current directory, project is .bravebot/settings.json there, and user is ~/.bravebot/settings.json. Without -s, disable takes the server out of each of the three. The question is put only where stdin and stdout are both a terminal, and only y approves. approve and enable with nobody to ask, or answered with anything else, exit 4. list exits 3 where a declaration in the file cannot be used. list and get name the machine-level file beside a server it refuses, and why. forget drops the standing answers recorded for a project, the current directory unless a path is given, so its servers and tools are asked about again. add, approve, enable, disable, remove and forget are refused in an incognito session. See MCP servers.

permissions check​

bravebot permissions check Bash git push origin main
bravebot permissions check Read src/secret.env
bravebot permissions check WebFetch https://api.example.com/v1
bravebot permissions check WebSearch
bravebot permissions check Mcp weather:get_forecast

Loads the permissions rules as a session started in this directory would and says which of deny, ask or allow decides the call, which rule, and which settings file wrote it. The first of deny, then ask, then allow that matches decides, however specific a later rule is. Read and Edit take one path, Bash a program and its arguments as separate words, WebFetch a host or a URL (only the host is matched), WebSearch nothing more, since a rule for it takes no specifier, and Mcp a server:tool.

decision: ask
rule: Bash(git commit *)
file: /work/app/.bravebot/settings.json

The rule is printed as its file spelled it, with each control character drawn as its picture, because a checkout's settings files can hold any text. When the deciding rule was written with a reason, a reason: ... line follows file:.

When no rule matches, it says so and the ordinary approval gates decide. An allow rule from a checkout's settings is not in force until you grant it at the question a session asks, so it is never reported as the rule that decides: a line says it would allow the call and is not in force. It starts nothing and changes nothing. It checks the rules only, not the permission modes, and a command line that names no call exits 2.

stats​

bravebot stats [--days <n>] [--models] [--project [<dir>]]

Adds up what the session records under ~/.bravebot hold and prints the number of sessions, turns and tokens, and how many of the tokens the model read and how many it wrote, for every project unless --project narrows it. It writes nothing, and it runs under --incognito.

$ bravebot stats --days 7 --models
Sessions last written in the last 7 days, in every project

Model Sessions Turns Tokens Read Written Unsplit
qwen-3-235b 2 10 214600 198400 16200 0
unknown 1 2 0 0 0 0
Total 3 12 214600 198400 16200 0
OptionWhat it does
--days <n>count only the sessions last written within the last n days, in days of 24 hours. n is a whole number from 1 to 9223372036854775807
--modelsput a row for each model above the total, the one that spent the most first
--project [<dir>]count only the sessions that ran in this directory, or in <dir> when one follows. A word that starts with - is the next option, not a directory. An empty <dir> is refused, so quote a variable: an unquoted empty one leaves --project bare, which is this directory

The figures are tokens, not money: the record keeps no price (Sessions says why). Read is what the model was sent, which is the total less what it wrote, so a prompt the service answered out of its own cache is counted as read. A session written before the split was kept has tokens and no split, so its tokens are in the Unsplit column and Read, Written and Unsplit add up to Tokens. A session is counted whole, under the day it was last written and the model that answered its last turn, so a session that ran over several days or changed model part way is not split between them. The unknown row holds sessions whose record names no model: ones written before the model was kept, ones whose turns never reached a server, and ones copied in from another program. A model name is shown with the characters a terminal would act on removed and cut to 60 characters, and names that read alike after that are one row.

Each record is counted, and a record can hold spend another one holds. A session forked with --fork or /branch starts with the spend of the original, and one moved with /cd leaves its record in the directory it came from beside the one it writes in the new directory. Such a session is counted once for each record, so the totals can read higher than what was spent.

An incognito session leaves no record, so it is not counted, and the command says so on stderr. Entries in the sessions directory that cannot be read as a record are counted there as well, without their names, and add to no figure. Stdout holds the table and nothing else, so bravebot stats | tail -n 1 is the total. A project that is not a directory, a count that is zero, too large or not a number, a repeated option and any other word are refused with status 2.

schedule​

bravebot schedule add --cron "<five fields>" --prompt "<text>" [--dir <path>] [--scheduler crontab|launchd|systemd] [--deliver-to <program>] [--accept-edits | --dangerously-skip-permissions]
bravebot schedule list
bravebot schedule remove <id>
bravebot schedule run-now <id>
bravebot schedule history [<id>]
bravebot schedule pause <id>
bravebot schedule resume <id>
bravebot schedule pending [<id>]
bravebot schedule clear <id>

Runs a prompt on a repeating schedule with no session open. add writes an entry and has your operating system's scheduler run bravebot schedule run-now <id>, which starts the same one-shot run as bravebot -p in the entry's directory (this one unless --dir says otherwise). Nothing of bravebot's keeps running between runs.

$ bravebot schedule add --cron "0 9 * * 1-5" --prompt "summarize the pull requests merged yesterday"
Added schedule 1.
reads and reports only: every write is refused, because nobody is there to ask

The expression is five fields of digits and *, /, , and -: names such as mon and shortcuts such as @daily are not read. A run has nobody to ask, so it can read and report and cannot write unless the add line carries --accept-edits (edits are accepted and nothing else is answered) or --dangerously-skip-permissions (every question is answered yes). list states which for each entry. add must be typed at a terminal, so a command a session runs cannot add one. In a session, /schedule runs the same subcommands for a line you type and stores read mode only. Cron starts a job with almost none of your environment, so a run that needs a credential reads it from the sign-in kept in ~/.bravebot. history lists each recorded run with its exit status, the session it recorded and the tokens that session spent. A run that ended before it recorded a session shows -.

--scheduler chooses what starts the runs: crontab (one line of your crontab, the default except on macOS), launchd (a job in ~/Library/LaunchAgents, loaded with launchctl, the default on macOS) or systemd (a timer and a service in ~/.config/systemd/user, enabled with systemctl --user). list names the one each entry uses, and remove takes the job out of that one. A launchd job or systemd timer holds each time the expression gives, so an expression that gives more than a launchd job can hold is refused for those two. Where both the day of the month and the day of the week are given, a run starts on a day that matches either, as cron does. Only Unix systems are supported: there is no Windows scheduler yet.

The expression is checked against the range of each field: minutes 0 to 59, hours 0 to 23, days of the month 1 to 31, months 1 to 12 and days of the week 0 to 7, with a step greater than zero.

--deliver-to <program> takes the absolute path of a program that exists. After each run, run-now starts it with what the run printed on its standard input, with no argument, in your home directory, without bravebot's own credentials and for at most 60 seconds, after which it and what it started are stopped. list shows delivers to <program> or delivers nowhere. A program that fails, cannot be started or is stopped is named in one line on standard error, and the run, its recorded history and the exit status are what they would be without it. A paused entry and a skipped firing deliver nothing. The program only receives: nothing is sent back to a run.

pause <id> stops an entry from running and keeps its line and its prompt. resume <id> lets it run again, and list shows paused or active for each entry. A run started for an entry stops at the first question it is asked, since nobody is there to answer, and exits with status 4 after keeping the question. pending shows it and clear <id> deletes it. A firing that finds the previous firing of the same entry still running is skipped. The behaviour is in schedule.md.

skill eval​

bravebot skill eval <name> [--model <model>] [--max-rounds <n>] [--max-tokens <n>] [--trust-workspace]

Runs the saved cases of one skill, each several times with the skill in the catalogue and as many times with it taken out, grades both, and prints the score of each (WITH and W/OUT) and their difference for each case and over all of them. The skill may be one of your own or one of a project you vouched for. The other skills, hooks, instruction files, definitions and servers are the same in both arms. How to write the cases is in Skills.

Each run is a one-shot run with nobody to ask, so a call that needs approval is refused and counted in the report, and none of the flags that let a run write is accepted. A run is stopped after --max-rounds rounds (12 where it is not given), and before the request that would follow once it has spent --max-tokens tokens (no limit where it is not given). Each takes a whole number as it does for a one-shot run. A stopped run is reported as stopped and has no score. Under each case line the report counts, for each arm, the runs, how many searched for skills, how many loaded the skill, and how many stopped, failed or were refused a call.

A name that matches no skill, including one only in a project you have not vouched for, a skill only you can load, a skill with no accepted case and a case file that is not valid are refused with status 2. A run that ended on an error other than its limit makes the command end on status 1 after the report. Stdout holds the report and nothing else.

trigger​

bravebot trigger add <name> --event <event> [--workspace <dir>] [--max-concurrent <n>] [--max-per-hour <n>] [--dangerously-skip-permissions] -- <prompt>
bravebot trigger list [--json]
bravebot trigger remove <name>
bravebot trigger pending
bravebot trigger clear <name>
bravebot trigger serve [--port <n>]

add stores the prompt under a name and an event and prints a secret once. serve listens on 127.0.0.1 (port 7471 unless --port says otherwise, and 0 lets the system choose) and, for a POST /<name> whose signature verifies, starts the stored prompt as a one-shot bravebot -p run in the trigger's directory. The body of the delivery is written to the run's standard input, where it is untrusted and private as any piped input is, and the prompt is told only that a delivery arrived. Nothing of bravebot runs between deliveries unless serve is running.

A sender signs hmac_sha256(secret, event + "\n" + body) and sends it as X-Bravebot-Signature: sha256=<lowercase hex>. The event is the one given to add, so a delivery signed for another event does not verify, and no header selects it. GitHub's X-Hub-Signature-256 signs the body alone, so a GitHub webhook cannot be pointed at serve directly.

SubcommandWhat it does
add <name>check the name, event, limits, prompt and directory, then store the entry and a secret only your account can read. A name in use is refused and keeps its secret
list [--json]print each trigger's name, event, directory, whether a run can write or reads only, and its prompt, shortened. The secret is never printed
remove <name>delete the entry, its secret and the question it kept
pendingprint the question each trigger's last run stopped at, with its numbered choices
clear <name>delete the question a trigger stopped at and keep the trigger. It takes no answer
serve [--port <n>]listen and start runs. Every refusal is the same 404 page, so a sender learns neither which names are stored nor what failed. Otherwise 202 started, 413 body over 1 MiB, 429 over the limits, 500 the run could not start

A name is lowercase letters, digits and hyphens, does not start with a hyphen and is at most 64 characters. An event is letters, digits and . _ : -, at most 64. --max-concurrent takes 1 to 4 (default 1) and --max-per-hour takes 1 to 120 (default 6); a delivery over either is answered 429 and starts nothing. A prompt that is blank, or one word starting with -, is refused. --workspace defaults to the current directory and must exist. The prompt follows --. No option selects a delivery by what its body says.

A run reads and reports. It can write only if you typed --dangerously-skip-permissions beside add, which is the only flag an entry stores and is shown by list; add refuses it where a settings layer made that mode unreachable, and every other subcommand refuses it. A run the planner asks a question stops at the first one, with or without that flag, exits with status 4 and keeps the question for pending. Entries and secrets are kept under the state directory. A run started with --sandbox off can start bravebot trigger add, and a confined one cannot.

The listener accepts a connection from any program on this machine, and nothing else. To receive a delivery from another machine, forward it to the port yourself. See Running on an event.

completion​

bravebot completion <bash|zsh|fish>

Prints a script that completes bravebot's subcommands and flags when you press Tab. It makes no request and reads nothing from ~/.bravebot, so it completes the names bravebot defines and file paths, and not session ids.

# bash: add to ~/.bashrc
eval "$(bravebot completion bash)"

# zsh: add to ~/.zshrc, after compinit
eval "$(bravebot completion zsh)"

# fish
bravebot completion fish > ~/.config/fish/completions/bravebot.fish

Then type bravebot and press Tab, or bravebot -- and Tab. The command takes exactly one shell name and exits with status 2 for anything else.

shell-init​

bravebot shell-init <bash|zsh|fish>

Prints a hook for your shell. It keeps the command lines you run in each terminal and defines @bravebot, which asks one question with the lines you ran since the last question.

# bash: add to ~/.bashrc
eval "$(bravebot shell-init bash)"

# zsh: add to ~/.zshrc
eval "$(bravebot shell-init zsh)"

# fish: add to ~/.config/fish/config.fish
bravebot shell-init fish | source

Then, in that terminal:

cargo test
@bravebot "why did that fail?"

@bravebot "question" runs bravebot -p "question" with up to the last 200 recorded lines (at most 64 KiB) as piped input, so they are quarantined like any other piped input and the planner is given a reference to them. Quote the question. The lines are emptied once sent, so the next question carries only what you ran after it.

  • Only the command line is recorded, as you submitted it. What a command printed is not.
  • Lines are written to shell/<process id of the shell> in your state directory, which is ~/.bravebot or the directory BRAVEBOT_HOME names in the shell that sourced the hook (moving the state directory). The file is readable by you alone, and it is removed when the terminal closes. A terminal that is killed leaves its file until another shell with the same process id starts.
  • A line that is @bravebot or begins with @bravebot and a space is not recorded. bash records a line when the command finishes, and a line your HISTCONTROL or HISTIGNORE drops is not recorded. Anything piped into @bravebot is ignored, and the lines are emptied when the question is sent, even if the run then fails to start.
  • With BRAVEBOT_INCOGNITO set to a non-empty value, nothing is recorded and the question runs with --incognito. It is read at each command, so export BRAVEBOT_INCOGNITO=1 stops recording from the next line.

The command prints a fixed script and reads and writes nothing under ~/.bravebot. It takes exactly one shell name and exits with status 2 for anything else.

acp​

bravebot acp [--settings <file>]

Serves an editor that speaks the Agent Client Protocol on standard input and standard output, as bravebot-acp does. The editor starts it, so you do not run it yourself; Using Brave Bot in an editor shows how to declare it in Zed. Standard output holds protocol messages and nothing else, and a notice goes to standard error.

The command refuses --dangerously-skip-permissions, --dangerously-bypass-approvals-and-sandbox, any flag that shapes a session or a task, and any word after acp, with status 2 before it reads anything. An editor is always asked.

Interactive keys​

KeyWhat it does
EnterSend
Shift-Enter, Ctrl-JNew line without sending
Ctrl-GCompose in $VISUAL or $EDITOR
Ctrl-SStash the line, or bring back the stashed one
Ctrl-VPaste, including screenshots and copied files
Ctrl-PRewrite the typed line to be more specific, and leave the rewrite in the box
Shift-TabChoose how much the session asks before it acts
Ctrl-TToggle the audit trail
Ctrl-OOpen the scroller over the transcript
Ctrl-LWatch what a delegate is doing, and read what an aside answered
Alt-LRead what a command printed, as /outputs does
Alt-APrint the whole plan, as /todos does
Alt-VWith the caret on a [Pasted text #1 +4 lines] marker, read the whole paste in the info panel. Clicking the marker does the same
Up / DownWalk back through sent prompts
Ctrl-RSearch every prompt you have sent
Wheel, PageUp / PageDownScroll the transcript
Home / EndJump to the start or the latest
EscCancel a running turn, or clear the input
Ctrl-CStop the nearest thing; leave when there is nothing left
Ctrl-DLeave
?List every key, on an empty line

Seven of these are defaults you can move: the external editor, watching a delegate, the scroller, the history search, the stash, the audit trail and paste. A keybindings block in settings.json names an action and the chord it should answer, and the key list on screen reflects what you set. Four chords are reserved and cannot be taken: Ctrl-C, Ctrl-D, Ctrl-J and Shift-Enter. See Configuration for the keybindings block.

The full behaviour is in Interactive mode, and the scroller's own keys are in Reading the transcript.

Interactive commands​

CommandWhat it does
/statusReport this session, what it may touch, and what it has spent
/costShow what each turn of this session has spent
/model [session]Choose which model to think with, for every session or, with session, for this one only
/theme [name]Choose which theme paints the interface
/effort [session | low | medium | high | xhigh | max]Choose how hard to think before answering
/configChoose how the input box edits text
/language [tag | auto]Choose the interface language for the next start, or drop the choice
/add-dir <path> | close <path>Open another directory and trust it for this session, or close one
/cd <path>Work in another directory from now on, and trust it for this session
/rename <name>Call this conversation something else
/note <note>Note something on this session's record, without putting it in the conversation
/compactSummarise the conversation so far, keeping the recent part
/btw <question>Ask something beside the work, without putting it in the conversation
/recapRecap where this session stands, without putting it in the conversation
/clearStart a new session here, keeping this one resumable
/loop [interval] <prompt>Send a prompt again and again, on your interval or at a pace each turn sets
/goal [<condition> | clear]Keep working until a condition you set is judged met
/watch [stop <n>]List the files this session is watching, and stop one by its number
/panelShow or hide the info panel beside the transcript
/sidebarTurn each section of the info panel on or off
/pr [<url> | clear]Say which pull request this session is for, show it, or clear it
/issue [<url> | clear]Say which issue this session is for, show it, or clear it
/manifest <task>Plan one task in full, show you the plan, then run it with nothing re-planned
/export [path]Export the session transcript to a markdown file
/undoRewind one turn and put back the files it wrote
/rewind [turns]List the turns a rewind could go back to, or go back that many
/exitLeave
@<path>Include a workspace file as trusted context
!<line>Run a line in your own shell

See Slash commands.

The version string​

bravebot 0.9.0 (f2a6e1a, modified)

The commit is what the binary was compiled from, and modified means the tree had uncommitted changes at that point. A build with no git available says (no git) rather than naming a commit it cannot see.

Every session record carries the same string. That matters when reading a transcript back: a session that behaved oddly is usually being read against code that has moved since.

Exit codes​

A failure exits non-zero rather than exiting successfully with an explanation on stdout, and each kind of failure has a status of its own, because "the endpoint was not there, try again", "the configuration is wrong, fail the build" and "a gate refused the write, this needs a person" are three different things to do about a failed run.

StatusIdentifierThe run
0did what it was asked
1BB1001failed for a reason none of the others name
2BB1002refused an argument, so nothing ran
3BB1003cannot use the configuration, so nothing ran
4BB1004had an effect refused by a gate
5BB1005never reached the backend
6BB1006finished, and its reply is not what --output-schema asked for
7BB1007worked towards the condition --goal gave, and it did not hold
8BB1008reached the limit --max-rounds or --max-tokens gave it, and stopped before going past it

Only the transport's own failures are status 5. A non-success answer from the service is the service answering, so a refused credential is a configuration problem rather than a connection to retry.

A status is never renumbered and never given a second meaning. A failure kind nothing here names is 1, and one worth telling apart takes the next number.

The identifier is printed in front of the message on stderr, never instead of it, and is the same whatever language the message is in. A sentence in the reader's own language is the right thing to print and the wrong thing to search for: pasted into a bug report it reaches somebody who cannot grep it.

A run whose --model was substituted by the server also exits non-zero.

Streams​

Stdout carries the reply and nothing else. Progress, errors and the audit trail go to stderr, so a one-shot run is pipeable.

Limits​

piped input10 MiB, refused rather than truncated past that
a pasted picture10 MB; a larger one is scaled down to 2048 pixels on its longest side and refused only if it will not decode or is still over
a dropped picture8 MiB sent as it is; a PNG or JPEG over that or over 2048 pixels is scaled down, up to 64 MiB read, and anything else over 8 MiB is refused
tool rounds in one turnunbounded interactively; 200 for a one-shot or manifest run, after which the planner answers with what it has; --max-rounds lowers it for a one-shot run and stops the run instead
context budgetthe window your model advertises; 24,000 prompt tokens where it advertises none