Configuration Cookbook
| File | Path (Linux and macOS defaults) | Shared with v1 | Recipes |
|---|---|---|---|
tui.json |
~/.config/mbm/tui.json, or tui.json / .mbm/tui.json in the project |
Yes | Theme, keys, mouse, scrolling, diffs |
mbm2.json |
~/.config/mbm/mbm2.json, or .mbm/mbm2.json in the project |
No | Workspace keys, copy, team auto mode and budget, aliases, relay |
workers.json |
<project>/.mbm/workers.json |
No | Workers and pipelines |
mbm.json |
The runtime's configuration | Yes (runtime) | Permissions, sharing, MCP servers |
Every file also has a .jsonc spelling that allows comments; in one directory .jsonc wins. Most
recipes can be done from inside the client too: /config opens the settings hub and writes these
files for you, keeping comments and refusing an invalid result. tui.json and mbm2.json are read
at start, so restart mbm2 after a hand edit; workers.json is followed while mbm2 runs. Full key
reference: Configuration.
Settings From Inside The Client
Find your way round /config
Settings
Workers 2 configured
Providers connect or reconnect
…
Team auto off (default)
Team auto budget 500 messages (default)
…
Workers file (raw) /home/you/src/shop-api/.mbm/workers.json
tui.json (raw) /home/you/.config/mbm/tui.json
/config, move to Workers,return: the workers page opens over the hub.- Add or pick something; the page redraws with the change.
escgoes back to Settings (a page with a page under it showsback escon its last row).escon Settings closes it.
Edit a raw file with no $EDITOR
With neither $VISUAL nor $EDITOR set, Workers file (raw) and tui.json (raw) open the
built-in editor instead of a toast:
/config→ tui.json (raw). The file opens with line numbers; the status row showsLn 1, Col 1.- Type
{ "theme": "nord" }, thenctrl+s. - A mistake (for example a missing
}) shows asline:column messageon the status row and nothing is written; fix it andctrl+sagain. Success toastsSaved <path>. esccloses; unsaved changes first askDiscard changes? y discard · n keep editing.
To use your own editor instead: export EDITOR=nvim (or nano, code --wait) before mbm2.
Word Aliases
/alias <word>=<alias> makes a word you type stand for another. It is meant for typing on the wrong
keyboard layout, and for short names of commands. Aliases are saved in mbm2.json[c] and work in
every tab at once.
A Mongolian Cyrillic layout
Typing exit with the Mongolian layout still active produces учшэ; continue produces ёүиэшигу.
/alias exit=учшэ → учшэ now means exit (/home/you/.config/mbm/mbm2.json)
/alias continue=ёүиэшигу → ёүиэшигу now means continue (/home/you/.config/mbm/mbm2.json)
| You then type | Happens |
|---|---|
учшэ |
mbm2 quits, as exit does |
ЁҮИЭШИГУ |
Sent to the agent as continue (case does not matter) |
/учшэ |
The slash list offers /exit |
учшэ now |
Sent as typed: only a whole prompt is an alias |
The file then holds:
{ "aliases": { "учшэ": "exit", "ёүиэшигу": "continue" } }
Short command names
/alias config=cfg → /cfg opens /config
/alias review=rv → /rv HEAD~1 runs /review HEAD~1
| Manage | Do |
|---|---|
| List | /alias → Aliases (alias · target); with none: No aliases · /alias <word>=<alias> adds one |
| Remove | /alias -учшэ → Removed alias учшэ, or ctrl+d on its row in Aliases |
| Refused | Both sides of = need a word: /alias <word>=<alias>; /<alias> is already a command; <alias> would lead back to itself |
A prompt with pasted text or attached files is never rewritten. For keys rather than words, a
Cyrillic ctrl key already matches its US-layout binding
(Keybindings).
Add An MCP Server
/mcps (or /config → MCP servers) opens MCPs. Its last row is + Add server; return
there opens Add MCP server with two ways: Form and Paste JSON. The server is written to the
mcp key of the runtime's mbm.json (comments kept), started at once, and the toast says
MCP server "<name>" added to <path>.
A local server with the form
-
/mcps→+ Add server→Form. -
Fill the rows;
tabmoves to the next one,←/→choose,entersaves,esccancels. The hint under the form is the question for the focused row:Row Answer Location Current project(asked only in a git project) orGlobalName filesType LocalCommand npx -y @modelcontextprotocol/server-filesystem /home/you/src(split on spaces)Environment LOG_LEVEL=info(pairs separated by commas; may be empty)Enabled Yes -
enter. A problem (an empty name, a name that exists —A server named "files" already exists) shows under the rows and nothing is written.
A remote server by pasting JSON
-
/mcps→+ Add server→Paste JSON. -
Paste one of these shapes (
shift+enteradds a new line):{ "docs": { "type": "remote", "url": "https://mcp.example.com/mcp", "headers": { "Authorization": "Bearer <token>" } } }A server object without a name (
{"type": "remote", "url": …}) asksEnter MCP server nameafterenter; a whole{"mcp": {…}}block names its own servers. -
entervalidates and saves.
The same server with the form: Type Remote, URL https://mcp.example.com/mcp, Headers
Authorization=Bearer <token>, OAuth No (or Yes with an optional Client ID and secret; an
empty Client ID means dynamic client registration).
Edit or remove one
In MCPs: ctrl+e opens the highlighted server in the form (or in the JSON box when the form
cannot show it exactly); ctrl+d asks to remove it. space still turns a server on or off for this
run. A server defined in another config file is refused with a toast naming both paths.
Look And Feel
Pick a theme
{ "theme": "tokyonight" }
In ~/.config/mbm/tui.json. Built-in names include mbm (default), catppuccin, dracula,
gruvbox, nord, one-dark, rosepine, solarized and tokyonight. In the client: /themes
(<leader>t) previews as you move. Your own themes go in ~/.config/mbm/themes/<name>.json and are
listed by name.
Force light or dark
{ "theme": "github", "theme_mode": "light" }
theme_mode is "dark", "light" or "auto" (default). In the client: palette Switch to light
mode / Switch to dark mode, and Lock theme mode to keep it.
Show diffs stacked instead of side by side
{ "diff_style": "stacked" }
Slower, fixed-step scrolling
{ "scroll_acceleration": { "enabled": false }, "scroll_speed": 3 }
scroll_speed is used when acceleration is off; it must be at least 0.001.
Colours look flat in a true-colour terminal
{ "force_truecolor": true }
Use it when your terminal supports 24-bit colour but does not announce it (for example over SSH or inside a multiplexer).
Keys
Use ctrl+o as the leader
{ "keybinds": { "leader": "ctrl+o" } }
Every <leader> sequence follows it, the workspace chords included: ctrl+o then w opens a
worker. Pick a key your terminal and shell do not use.
Give the leader more time
{ "leader_timeout": 3500 }
Milliseconds, a positive whole number; the default is 2000.
Bind fork, add a second copy key, remove the tips key
{
"keybinds": {
"session_fork": "<leader>o",
"messages_copy": ["<leader>y", "ctrl+y"],
"tips_toggle": "none"
}
}
"none" (or false) removes a default; the action stays in the palette. Names are v1's binding
names (Keybindings). In the client: /config → tui.json settings →
Keybindings. An unknown name is ignored by mbm2 with a warning but makes v1 reject the whole
file, so check the spelling if you also run v1.
Move the workspace chords
// ~/.config/mbm/mbm2.json
{
"keybinds": {
"workspace_board": "<leader>p",
"workspace_tab_next": "<leader>.",
"workspace_overview": "<leader>v"
}
}
Each value is <leader> and one key; two actions on one key reject the file. In the client:
/config → Workspace keys, choose the action, press the new key. The toast says, for example,
Task board is now <leader>p; applies on the next start.
Mouse And Copy
Do not capture the mouse
{ "mouse": false }
In tui.json. For one run: MBM_DISABLE_MOUSE=1 mbm2. Your terminal's own selection then works.
Copy only when you ask
{ "copy_on_select": false }
In mbm2.json (not tui.json). With false, a drag leaves the selection highlighted, and a right
mouse-down or ctrl+c copies it (Copied to clipboard); esc clears it. In the client: /config →
Copy on select (applies on the next start). The default is on, except on Windows. For one run:
MBM_EXPERIMENTAL_DISABLE_COPY_ON_SELECT=1 mbm2.
Copy over SSH or inside tmux
Every copy writes the terminal's OSC 52 clipboard sequence and also runs a local clipboard tool when one exists. Over SSH only OSC 52 can reach your own computer, so use a terminal that accepts it (most modern terminals do; xterm refuses it by default). Inside tmux add:
set -g allow-passthrough on
The log line clipboard names the copy paths used. Unverified: which terminals accept OSC 52 by
default.
Workers
Claude Code, a builder and the tests
// <project>/.mbm/workers.jsonc
{
"workers": [
{ "name": "builder", "kind": "session", "agent": "build", "open_on_start": true },
{ "name": "tests", "kind": "terminal", "command": "go", "args": ["test", "./..."] },
{ "name": "claude", "kind": "terminal", "command": "claude" }
]
}
Without editing: /worker → Add build, /claude. A .jsonc file with comments must be edited by
hand; /worker and /claude refuse to rewrite it.
A monorepo with two dev servers
{
"workers": [
{ "name": "web", "kind": "terminal", "command": "npm", "args": ["run", "dev"], "cwd": "web" },
{ "name": "api", "kind": "terminal", "command": "go", "args": ["run", "./cmd/api"], "cwd": "api",
"env": { "APP_ENV": "dev", "PORT": "8081" } }
]
}
cwd is relative to the project root; env values are strings.
A reviewer on a different model, chosen by an environment variable
{
"workers": [
{ "name": "reviewer", "kind": "session", "agent": "plan", "model": "{env:MBM_REVIEW_MODEL}" }
]
}
Start with MBM_REVIEW_MODEL=anthropic/claude-sonnet-4-5 mbm2. An unset variable becomes empty,
and an empty model rejects the whole workers file (expected "provider/model"), so set it before
starting.
Plan, then build, as a pipeline
{
"workers": [
{ "name": "planner", "kind": "session", "agent": "plan" },
{ "name": "builder", "kind": "session", "agent": "build" }
],
"pipelines": [ { "name": "plan-then-build", "steps": ["planner", "builder"] } ]
}
<leader>j starts it (Teamwork).
Let team messages flow without approval
{ "team_auto": true, "team_auto_budget": 50 }
In mbm2.json. Auto mode delivers up to team_auto_budget messages (default 500, 1 to 1000)
between two of your own actions; then /team asks Continue (+N), Set limit… (saves a new
budget) or Stop. In the client: a in /team or /config → Team auto toggles the mode, and
/config → Team auto budget sets the number. Both write the file that decides the key — the
project's mbm2.json when it sets it, else the global one — and apply at once
(Teamwork).
Submit team messages into a terminal worker
{ "name": "claude", "kind": "terminal", "command": "claude", "team_submit": true }
Without it messages are only pasted. Turn it on after you have answered the program's first-run dialogs.
Per Project And Per Run
Settings only for one project
Put the same keys in the project: .mbm/tui.json and .mbm/mbm2.json. The project's file wins key
by key over the global one, and among nested folders the closest .mbm/ wins: a subfolder's
.mbm/tui.json overrides its parent folder's, and every project layer overrides ~/.mbm/tui.json
(Configuration). v1 let the farther folder win.
Ignore project settings
MBM_DISABLE_PROJECT_CONFIG=1 mbm2
Skips the project's tui.json, mbm2.json[c] and workers.json[c]; useful in an untrusted checkout.
Try a configuration without touching yours
MBM_CONFIG_DIR=/tmp/mbm-try mbm2 # a separate config directory
MBM_TUI_CONFIG=./demo-tui.json mbm2 # one extra tui.json on top of yours
Read a value from a file
{ "theme": "{file:~/.config/mbm/current-theme}" }
{file:path} is replaced by the file's contents (empty when missing); ~/ is your home and a
relative path is relative to the config file. {env:NAME} works the same way for variables.
Keep a log of one run
MBM_TUI_LOG=/tmp/mbm2.log mbm2 --debug
Runtime Settings
These belong to the runtime, not to mbm2. Set them in its mbm.json, or ask the operator of a
remote runtime.
Ask before every shell command, whatever the agent
{ "permission": { "bash": "ask" } }
Values are "allow", "ask" or "deny", or an object of patterns such as
{ "*": "allow", "*.env": "ask" }. What each agent asks by default:
Permissions and questions.
Share sessions automatically
{ "share": "auto" }
"manual" (default), "auto" or "disabled". In the client: palette Sharing settings.
Always serve on the network
In the global ~/.config/mbm/mbm.json (a project's file does not set it):
{ "server": { "port": 4096, "hostname": "0.0.0.0", "cors": ["https://app.example.com"] } }
mbm2 serve and mbm2 web then listen on 0.0.0.0:4096 with that origin allowed; --port 9000
on the command line still wins, and --cors adds to the list. Details:
Server defaults.
Commit after every reply
{ "auto_commit": true }
Each reply ends with git add -A and a commit auto: session closed in the session's folder, as
v1 does. Outside a git repository nothing happens; nothing is ever pushed. Use a branch of its own.
Format what the agent writes
{ "formatter": true }
The built-in formatters run on each file the agent edits or writes: gofmt for .go, prettier
when package.json lists it, ruff when the project uses it, rustfmt, shfmt and the rest, each
only when its program is installed. Turn one off or add your own:
{ "formatter": { "prettier": { "disabled": true },
"mdfmt": { "command": ["mdfmt", "-w", "$FILE"], "extensions": [".md"] } } }
/status lists the formatters that run here.
Keep tool output short
{ "tool_output": { "max_lines": 500, "max_bytes": 20000 } }
The model reads at most this much of one tool's output; the rest is saved to a file it can search.
Team rules from a URL
{ "instructions": ["https://example.com/team-rules.md"] }
Fetched at each message and added to the agent's instructions. A URL that fails is shown once
(Instructions not loaded from …) and skipped. A private AGENTS.local.md or CLAUDE.local.md
next to AGENTS.md is read without any setting.
A provider with a time limit and only some models
{ "provider": { "openrouter": { "options": { "apiKey": "…", "timeout": 120000, "chunkTimeout": 30000 },
"whitelist": ["openai/gpt-5"] } } }
All provider keys: Configuration.
A provider mbm2 cannot call (Anthropic, Google, Bedrock) is shown as Provider not loaded: ….
Unverified: the runtime's own search order for mbm.json; the bundled runtime reads it from its
config directory and from the project's .mbm/ directory.
Check What You Did
| After | Check |
|---|---|
| A hand edit of any client file | Start mbm2; a rejected file is logged as tui config, mbm2 config or workers config with the path and the first problem (Troubleshooting) |
A raw edit from /config in your editor |
The toast says <file> is valid; changes apply on the next start, or names the first problem |
| A save in the built-in editor | Saved <path>, or line:column message on its status row |
| A workers file edit | The toast workers.json: … lists the tabs renamed, opened and closed |
| An alias | /alias lists it |
| A key binding | /config → tui.json settings → Keybindings shows the value in force |
Published from revision f88fc66f 2026-11-30