Install mbm2
| Platform | Install command | Installs to |
|---|---|---|
| Linux, macOS | curl -fsSL https://tui.mbm.mn/install | bash |
~/.mbm2/bin/mbm2, runtime in ~/.mbm2/runtime/ |
| Linux, macOS, one version | curl -fsSL https://tui.mbm.mn/install | bash -s -- --version <version> |
the same |
| Windows (PowerShell) | irm https://tui.mbm.mn/install.ps1 | iex |
%USERPROFILE%\.mbm2\bin\mbm2.exe, runtime in %USERPROFILE%\.mbm2\runtime\ |
The installer asks for the install password you were given (Enter password:). Only its
SHA-256 digest is sent, as the X-Mbm-Password header; a wrong password stops with
wrong password and installs nothing. In a script without a terminal, set MBM2_PASSWORD.
mbm2 is the v2 terminal client. It installs beside v1 and does not replace it: the installer
never touches v1's mbm binary or the ~/.mbm directory, and mbm2 is never installed under
the name mbm (ADR 0019). The runtime that hosts your sessions is installed with it, beside bin/
and off PATH, so mbm2 works right after the install; see Connect to a runtime.
What You See
$ curl -fsSL https://tui.mbm.mn/install | bash
____
_ __ ___ | __ ) _ __ ___
| '_ ` _ \| _ \| '_ ` _ \
| | | | | | |_) | | | | | |
|_| |_| |_|____/|_| |_| |_|
Enter password:
✓ Download mbm2 v2.17.0 (linux/x64)
✓ Verify checksum
✓ Unpack
✓ Runtime ~/.mbm2/runtime
✓ Add to PATH linked in ~/.local/bin
mbm2 v2.17.0 installed — run mbm2
v1's mBm logo comes first: when the terminal has colour, its m's in v1's orange and the B in a blue
that reads on dark and light terminals alike (#3d7eff). Each step shows a spinner while it runs and
✓ when it is done, or ✗ with the reason, for example
✗ Download wrong password; nothing was installed then. In a pipe or a CI log there is no
spinner and no colour, one line a step; NO_COLOR=1 turns colour off on a terminal too. With
--no-runtime there is no Unpack and no Runtime line. When mbm v1 left something mbm2 does not
have yet, its import comes before the last line (below).
What The Installer Does
| Step | Detail |
|---|---|
| 1. Detect | OS linux, darwin or windows; architecture x64 or arm64. An x64 shell under Rosetta on Apple silicon gets the arm64 build |
| 2. Pick the version | --version <v>, else the name served at https://tui.mbm.mn/download/latest |
| 3. Download | https://tui.mbm.mn/download/<version>/mbm2-<os>-<arch> (.exe on Windows), the runtime archive mbm2-runtime-<os>-<arch>.tar.gz (Linux) or .zip (macOS, Windows), and SHA256SUMS, each with the password digest |
| 4. Verify | Computes the SHA-256 of the download and compares it with the SHA256SUMS line for that file. A missing line or a mismatch stops the install; nothing is written |
| 5. Install | Moves the verified binary to the install directory as mbm2 (mbm2.exe on Windows) and unpacks the verified runtime into runtime/ beside it, replacing an older one |
| 6. PATH | Makes mbm2 work in this terminal at once (PATH); nothing with --no-modify-path |
| 7. mbm v1 | Runs the new mbm2 migrate-v1 --check. When mbm v1 left something on this computer that mbm2 does not have yet (the licence, API keys, sessions), prints its short plan (a row each for the keys, the licence and the sessions) and asks Import from mbm v1 (licence, keys, sessions)? [Y/n]; yes runs mbm2 migrate-v1 --yes, no is remembered (migrate-v1 --decline). Without a terminal it skips with a hint unless you opted in. Only v1's files are read; no v1 program runs (Moving from v1) |
A release is mbm2 and its runtime, both built from v2's own source: the runtime archive holds the
Go engine mbm-runtime (mbm-runtime.exe on Windows) and two RAG git hook scripts, and carries
the same version as mbm2. No release ships or needs any part of v1 (ADR 0277).
Options
| Option (Linux/macOS script) | Effect |
|---|---|
--version <v>, -v <v> |
Install that version instead of the latest |
--no-modify-path |
Do not put mbm2 on PATH: no link and no shell startup file edit |
NO_COLOR=1 (environment) |
Plain output: no colour (the spinner stays on a terminal) |
--no-runtime |
Install only the client, for --attach to a runtime elsewhere |
--import-v1-license |
Import from mbm v1 (licence, keys, sessions) without asking: runs mbm2 migrate-v1 --yes when there is something to import (for a script or a server without a terminal) |
MBM2_IMPORT_V1_LICENSE=1 or =0 (environment) |
1 is --import-v1-license; 0 skips the v1 import offer |
MBM2_PASSWORD=<password> (environment) |
Use this install password instead of the prompt |
--help, -h |
Print the installer's usage and exit |
MBM2_INSTALL_DIR=<dir> (environment) |
Install into <dir> instead of ~/.mbm2/bin |
MBM2_DOWNLOAD_BASE=<url> (environment) |
Testing only: download from <url> instead of https://tui.mbm.mn/download, for a release staged before it is published |
Pass options after bash -s --, for example
curl -fsSL https://tui.mbm.mn/install | bash -s -- --version <version> --no-modify-path.
The PowerShell installer takes no arguments when piped to iex. Set environment variables first:
| Variable (Windows) | Effect |
|---|---|
$env:MBM2_VERSION = "<version>" |
Install that version instead of the latest |
$env:MBM2_INSTALL_DIR = "<dir>" |
Install into <dir> instead of %USERPROFILE%\.mbm2\bin |
$env:MBM2_PASSWORD = "<password>" |
Use this install password instead of the prompt |
$env:MBM2_NO_RUNTIME = "1" |
Install only the client |
$env:MBM2_IMPORT_V1_LICENSE = "1" (or "0") |
Import from mbm v1 (licence, keys, sessions) without asking ("0": skip the offer) |
$env:MBM2_DOWNLOAD_BASE = "<url>" |
Testing only: download from <url> instead of https://tui.mbm.mn/download |
The Windows installer always adds the directory to your user PATH when it is missing, and to
the PATH of the PowerShell window that ran it, so mbm2 runs there at once; it has no
--no-modify-path equivalent. It draws the same logo and steps ($env:NO_COLOR turns colour off).
Worked Examples
| Goal | Command |
|---|---|
| Laptop, everything | curl -fsSL https://tui.mbm.mn/install | bash |
Only the client, to --attach to a team runtime |
curl -fsSL https://tui.mbm.mn/install | bash -s -- --no-runtime |
| A pinned version in a container or CI job, no prompt, no shell file edits | curl -fsSL https://tui.mbm.mn/install | MBM2_PASSWORD="$MBM2_PASSWORD" bash -s -- --version <version> --no-modify-path |
Into a directory you already have on PATH |
curl -fsSL https://tui.mbm.mn/install | MBM2_INSTALL_DIR=$HOME/bin bash; the runtime goes beside it, in $HOME/runtime, where mbm2 looks for it |
| Windows, client only | $env:MBM2_NO_RUNTIME = "1"; irm https://tui.mbm.mn/install.ps1 | iex |
| A server where v1 is licensed and has sessions, no prompt | curl -fsSL https://tui.mbm.mn/install | MBM2_PASSWORD="$MBM2_PASSWORD" bash -s -- --import-v1-license |
In the CI example the password comes from the job's secret store; never write it into a script.
After --no-modify-path, call ~/.mbm2/bin/mbm2 by its full path or add it to PATH yourself.
PATH Changes
A program cannot change the PATH of the shell that started it, and curl … | bash runs the
installer as such a program. So the installer does not wait for a new shell: it puts a link to
~/.mbm2/bin/mbm2 in a directory that is already on your PATH, where the shell you typed the
command in finds it at once.
| Case, in this order | What the installer does | mbm2 works |
|---|---|---|
The install directory is already on PATH |
Nothing (✓ Add to PATH ~/.mbm2/bin is on PATH) |
At once |
~/.local/bin is on PATH |
Links ~/.local/bin/mbm2 to the installed binary (linked in ~/.local/bin) |
At once |
/usr/local/bin is on PATH and writable (an install as root) |
Links /usr/local/bin/mbm2 |
At once |
| Neither | Appends the line below to your shell's startup file and prints one line, Run: export PATH="$HOME/.mbm2/bin:$PATH" (or open a new terminal) |
After that line, or in a new terminal |
--no-modify-path |
Nothing; prints Run: export PATH="$HOME/.mbm2/bin:$PATH" |
After that line |
| Windows | Appends the directory to the user Path and to this PowerShell window's $env:Path |
At once in this window; new terminals read the user Path |
A file at ~/.local/bin/mbm2 that is not a link is not replaced; the installer goes on to the next case.
| Shell | File the installer appends to | Line added |
|---|---|---|
| zsh | ${ZDOTDIR:-$HOME}/.zshrc |
export PATH="<dir>:$PATH" |
| bash on Linux | ~/.bashrc |
export PATH="<dir>:$PATH" |
| bash on macOS | ~/.bash_profile |
export PATH="<dir>:$PATH" |
| fish | ~/.config/fish/config.fish |
fish_add_path <dir> |
| other | ~/.profile |
export PATH="<dir>:$PATH" |
| Windows | User Path environment variable |
<dir> appended |
On Linux and macOS the added line is preceded by a # mbm2 comment. Only in this case run the
export line the installer prints, or open a new terminal, before typing mbm2.
Verify An Install
-
Check that the command resolves to the installed file:
command -v mbm2 # ~/.mbm2/bin/mbm2, or the link in ~/.local/bin or /usr/local/bin mbm2 --version -
Check that v1 is untouched:
command -v mbmstill names v1's binary, if you had one. -
Check the runtime:
ls ~/.mbm2/runtime/lists, on Linux and macOS, v2's Go enginembm-runtimeandscript/(the RAG git hooks), with no v1mbm(ADR 0277); on Windowsdir %USERPROFILE%\.mbm2\runtimelistsmbm-runtime.exeandscript(Connect). -
Bring what v1 left over once:
mbm2 migrate-v1copies the API keys, imports the licence v1 applied on this computer and every project's sessions (mbm2 migrate-v1 --checkshows what it would do first); on a computer without v1,mbm2 license apply <key>(Moving from v1). If the installer skipped the offer, the firstmbm2start asks once, in a dialog inside the interface. -
Sign this computer in to your tui.mbm.mn account:
mbm2 loginprints a code andhttps://tui.mbm.mn/account/device, opens the browser, and finishes when you approve the code there./rcand mbm code use this sign-in, and the computer is listed under Devices attui.mbm.mn/account/devices(Remote control). For CI and headless runs, an mBm API key stays:MBM_API_KEY, ormbm2 auth mbmto store one.
Verify A Download Manually
Use this when you download a binary yourself instead of running the installer.
version=$(curl -fsSL https://tui.mbm.mn/download/latest)
curl -fLO "https://tui.mbm.mn/download/$version/mbm2-linux-x64"
curl -fLO "https://tui.mbm.mn/download/$version/SHA256SUMS"
sha256sum -c --ignore-missing SHA256SUMS # Linux
grep ' mbm2-darwin-arm64$' SHA256SUMS | shasum -a 256 -c # macOS
| Result | Meaning |
|---|---|
mbm2-linux-x64: OK |
The file matches the published checksum; chmod +x it and move it onto your PATH |
FAILED |
Do not run the file. Delete it and download again |
Replace mbm2-linux-x64 with the file for your system: mbm2-darwin-arm64, mbm2-darwin-x64,
mbm2-linux-arm64, mbm2-windows-x64.exe or mbm2-windows-arm64.exe. On Windows compare
(Get-FileHash -Algorithm SHA256 .\mbm2-windows-x64.exe).Hash with the matching SHA256SUMS line.
Unverified: which of the six <os>-<arch> names are published for a given version; the
installer reports download failed when a name is missing.
Upgrade
| Goal | Command |
|---|---|
| Latest version | mbm2 upgrade |
| A specific version (also a downgrade) | mbm2 upgrade <version> |
| The client only, keeping the runtime | mbm2 upgrade --no-runtime |
| Reinstall from scratch | Run the install command again |
$ mbm2 upgrade
<v1's mBm logo>
✓ Download mbm2 v2.17.0
✓ Verify checksum
✓ Unpack
✓ Runtime
✓ Switch
mbm2 v2.17.0 installed — run mbm2
$ mbm2 upgrade
<v1's mBm logo>
mbm2 v2.17.0 is already installed
The steps are the installer's: a spinner while each runs on a terminal, ✓ when done, or ✗ and the
reason (✗ Download wrong password), after which nothing is replaced. Switch puts the new
client and runtime in place. With --no-runtime there is no Unpack and no Runtime line.
When the upgrade cannot be done in place, it does not end with a bare error but says so, with the
install command for your platform (irm https://tui.mbm.mn/install.ps1 | iex on Windows):
✗ Runtime the runtime archive holds no mbm-runtime
┃ Found release v2.18.0's runtime archive holds no mbm-runtime
┃ Why this mbm2 cannot install that release's runtime; the installer of that release can
┃ Install mbm2 again; your sessions, settings and licence are kept:
┃
┃ curl -fsSL https://tui.mbm.mn/install | bash
| Found | Why an upgrade in place is not possible |
|---|---|
mbm2 at <path>, not in an install's bin/ |
mbm2 upgrade replaces only an install the installer made (<dir>/bin/mbm2 with runtime/ beside it) |
release <v>'s runtime archive holds no mbm-runtime |
This mbm2 cannot install that release's runtime; the installer of that release can |
no write access to <dir> |
mbm2 upgrade cannot write where mbm2 is installed |
release <v> has no <file>, release <v>'s SHA256SUMS lists no build for this computer, no mbm2 build for <os>/<arch> |
This computer needs another build than the one this mbm2 asks for |
<dir>/.install-password holds no password digest |
The install password is needed and none can be asked for (no terminal, no MBM2_PASSWORD) |
/upgrade and the update dialog show the same three lines, with Copy to copy the command.
A wrong password or a checksum mismatch is not one of these: it is shown as it is, and nothing is replaced.
From v2.15.07 or earlier, mbm2 upgrade cannot reach v2.15.65 or later. It stops with
the runtime archive holds no mbm, because those clients expect v1's runtime binary, which releases no longer carry.
Run the install command once instead. From then on mbm2 upgrade works.
mbm2 upgrade downloads the release, checks it against SHA256SUMS, and replaces the client and
the runtime the way the installer does. It uses the password digest the installer saved in
~/.mbm2/.install-password, MBM2_PASSWORD when set, or asks. mbm2 upgrade with the version
already installed changes nothing. MBM2_DOWNLOAD_BASE points it, like the installer, at another
downloads root; it exists to test a staged release and is not for everyday use. The installer and the
upgrade replace the binary in place and do not add a second PATH line. The client and the runtime
always move together to the same version; there is no separate runtime version to pick. Your
configuration files, preferences and sessions are not part of the install and are kept.
While mbm2 runs
You can run mbm2 upgrade in another terminal while mbm2 windows are open and working. Nothing
running is stopped.
Team writes after an upgrade: Run /restart in any mbm2 window still on the old engine before
retrying a team write, even if no notice appeared. For example, with engine v2.20.01, the refusal is:
this window's engine (v2.20.01) predates team identity: run /restart in the window, then `mbm2 team head claim <seat>` for a head seat
The refused command writes nothing. This is not a saved hand-off whose recipient did not wake. After restarting, an external head runner whose binding is gone must claim its seat again and have the person approve it. Engine-managed member tabs use their assigned identity; they do not claim a head seat.
After a successful upgrade, team writes need a window /restart after this upgrade appears only if the
client confirms that a running engine has a numeric release older than the one just installed. If the
client cannot confirm that, it prints no notice. Updated installer scripts check with the newly installed
client. mbm2 upgrade checks with the client that started the upgrade, so the first upgrade from a
client without this check is silent. The notice does not restart the window, grant identity, or confirm
that a hand-off was delivered.
$ mbm2 upgrade
<v1's mBm logo and the five steps>
2 mbm2 windows are open; they keep working and switch on /restart
The running engine (v2.16.0, pid 4182) finishes its 1 running turn, stops after the last of those windows has restarted or quit, and the next mbm2 starts v2.17.0
mbm2 v2.17.0 installed — run mbm2
| What | What happens |
|---|---|
| Open windows | Keep working on the old version. Within a few seconds each shows the toast v2.17.0 installed — /restart to switch, and the line under the prompt keeps v2.17.0 installed /restart |
/restart |
Starts the installed version in the same window and directory, with the same tabs, the session each tab showed, the focused tab and any prompt you had typed but not sent. A running turn is not stopped |
| The engine | The old engine finishes the turns and background jobs that run, keeps serving the old windows, and stops when the last of them has restarted or quit. It does not start new turns for a window of the new version |
| A new window meanwhile | Opens at once. On an old engine of the same release line (for example v2.17.06 under v2.17.09) it shows that engine's sessions: you can read them and type, and a new turn waits for the switch (your text stays in the prompt). A dialog in the middle of the window says what the old engine still runs and offers [Wait] and [Switch now] (below) |
| The old windows, asked | The new window asks the old windows, through the old engine, to restart themselves: a window with nothing running restarts at once, as /restart does; one running a turn shows mbm2 v2.17.0 is starting: this window restarts into it when its running turn ends and restarts when the turn ends. The dialog shows one line per old window (below) |
| [Wait] (the default) | When the turns and jobs have finished and the old windows have restarted, the window switches to the new engine by itself, with the same tabs, sessions and drafts, and the footer status goes |
| [Switch now] | The old engine stops at once. The dialog names the turn this stops (Switch now stops the turn in "Fix the parser"); background jobs are recorded as lost and offered again on the new engine. The session whose turn was stopped shows This turn was stopped by the update — [Continue]: press enter on its empty prompt (or click [Continue]) and the agent carries on from where it was |
New version installed esc
v2.16.0 → v2.17.0
Wait switches by itself once these end:
"Fix the parser" — turn running
window 5120: restarts when its running turn ends
window 5233 in /home/you/src/api: restarting
Switch now stops the turn in "Fix the parser"
Wait Switch now
The dialog opens with [Wait] chosen. enter, esc, a click outside it (or simply typing) closes
it and the window is yours; ←/→ choose and a click presses a button. It lists at most four lines
of work, the last +N more, and shortens a line rather than wrapping it: a narrow window drops a
window's directory, cuts a long session title, and writes the versions without their builds
(v2.17.09 → v2.17.31).
Once the dialog is closed, the line under the prompt starts with a short status — ↻ switching after 1 turn while the old engine finishes, ↻ switching… once it is asked to stop, ↻ switch failed if
the switch fails. Click it, or press ctrl+o, to open the dialog again; the status goes when the
window has switched. If the switch fails (the old engine does not answer, does not stop, or is still
busy after MBM2_ENGINE_WAIT) the dialog opens by itself, says why and offers [Retry].
An old engine of another release line, which this version cannot show, gets the dialog alone over an
empty window — Your sessions open here once v2.18.0's engine runs — with the same buttons; the
window opens your sessions when the old engine has stopped. ctrl+c quits there.
| Window line | Meaning |
|---|---|
asked to restart |
The ask went out; the window has not answered yet |
restarts when its running turn ends |
The window waits for its turn, then restarts |
restarting |
The window is restarting into the new version |
too old to restart when asked: /restart it there or quit it |
The window is from a release before this one and does not act on the ask: type /restart in it, or quit it |
its engine is too old to pass the ask on: /restart it there or quit it |
The old engine is from a release before this one and cannot pass the ask on: the same |
Windows and engines from v2.16.97 and earlier cannot be asked, so the first upgrade from such a
release still needs /restart (or quitting) in each old window; later upgrades restart them by
themselves.
A CLI command (mbm2 run, mbm2 sessions …) started while an old engine drains prints one plain
line — mbm2 v2.17.0: waiting for the running engine (v2.16.0, pid 4182) to finish 1 turn — and
runs on the new engine once the old one has stopped. Waiting gives up after 10 minutes
(MBM2_ENGINE_WAIT, for example MBM2_ENGINE_WAIT=30m). On Windows the running mbm2.exe and
mbm-runtime.exe are renamed to *.old.exe during the upgrade and removed the next time mbm2
starts.
From the TUI
/upgrade (or Upgrade mbm2 in the command palette) upgrades without leaving the window:
┃ Upgrade mbm2 esc
┃
┃ A new release is available: v2.17.0 → v2.18.0
┃
┃ <the release notes, when the site publishes them>
┃
┃ Install it and restart mbm2 with the same tabs, sessions and drafts?
┃
┃ Cancel Install
| Step | What happens |
|---|---|
| Check | The dialog reads the published latest. Already on it: mbm2 v2.17.0 is up to date. The site does not publish release notes yet, so the offer shows the two versions |
Install |
Installing v2.17.0 → v2.18.0...: the same download, SHA256SUMS check and client and runtime swap as mbm2 upgrade. esc does not interrupt it |
| Password | MBM2_PASSWORD when set, else the digest the installer saved. With neither, or when the site refuses it, the dialog asks: The install password for v2.17.0 → v2.18.0: in a masked field (••••). A refused one says Wrong password: the site refused it. Type the install password again. The password is sent only as its SHA-256 and saved that way once it works |
| Switch | The window restarts on the new version as /restart does (While mbm2 runs): the same tabs, the session each showed, the focused tab and unsent prompts. A running turn finishes on the old engine, which then stops; the next start runs the new one |
| Failure | Update Failed with the reason, for example read the latest version: HTTP 503 or a checksum mismatch; nothing is replaced |
/upgrade check only reports: the up-to-date line, or the new version with Run /upgrade to install it.
From the update dialog
When a newer release is published, the client opens Update Available. The two buttons:
| Choice | What happens |
|---|---|
Confirm |
The same install as /upgrade's Install, in its dialog: the password asked when needed, the reason shown on failure, then the restart in place. A client that cannot restart itself shows the toast Updating to v<version>... and then Update Complete (Successfully updated to mbm2 v<version>. Please restart the application.); closing it exits mbm2 |
Skip |
Nothing is installed, and this version and every older one are not offered again |
esc |
The dialog closes; the next start offers the release again |
Uninstall
| Platform | Steps |
|---|---|
| Linux, macOS | rm -rf ~/.mbm2, rm -f ~/.local/bin/mbm2 (or /usr/local/bin/mbm2) if the installer linked it, then delete the # mbm2 comment and the PATH line under it from the shell file in PATH Changes |
| Windows | Delete %USERPROFILE%\.mbm2, then remove that bin directory from your user Path (System Properties → Environment Variables) |
Uninstalling mbm2 leaves v1, tui.json, mbm2.json[c], kv.json, the logs and v2's data
directory ~/.local/share/mbm/mbm2/ (provider credentials, and the Go engine's data under engine/) in place;
see Configuration for their locations if you want to remove them too.
If It Fails
| Message | Cause and fix |
|---|---|
curl is required |
Install curl, then rerun |
unsupported operating system / unsupported architecture |
No build exists for this system; nothing was installed |
could not read the latest version |
tui.mbm.mn is unreachable from this machine; check the network or pass --version |
download failed: … |
That version has no build for your OS/arch, or the network dropped; check the version name |
… is not listed in SHA256SUMS / checksum mismatch |
The download is not the published file. Nothing was installed; retry, and report it if it repeats |
mbm2: command not found after install |
The installer edited your shell file because no directory on PATH could take a link: run the Run: export PATH=… line it printed, or open a new terminal |
✗ <step> <reason> |
That step failed and the install stopped there; the reason is the message in this table |
Published from revision f88fc66f 2026-11-30