Skip to content

Installation

The desktop app and standalone server both include the btmux command. Release builds support Apple Silicon macOS, x86-64 and ARM64 Linux, and x64 and ARM64 Windows.

Terminal window
brew install --cask btmux-dev/tap/btmux

The app is signed and notarized. Intel Macs are not supported. To add btmux to your shell’s PATH, choose btmux → Install Command-Line Tool… or install the Homebrew formula.

Open btmux to connect to its own server or choose an existing one. Continue with First steps. See Desktop app for server options.

Install the standalone server for browser access on a local, remote, or headless machine.

Terminal window
brew install btmux-dev/tap/btmux

Or use the install script, as on Linux.

Then start it and sign in:

  1. Run btmux. It opens http://127.0.0.1:8004 and prints the path of its access token file.

  2. Read the token:

    Terminal window
    cat "${XDG_STATE_HOME:-$HOME/.local/state}/btmux/state.token"

    On Windows, in PowerShell:

    Terminal window
    Get-Content "$env:LOCALAPPDATA\btmux\state.token"
  3. Sign in with the username btmux and the token as the password.

The token stays the same across restarts. To reach the server from a phone or another machine, see Remote access. Access tokens covers rotating the token and reverse proxies.

On macOS and Linux, btmux can install itself as a per-user service (launchd or systemd) that starts at login and restarts after a crash:

Terminal window
btmux install # install and start on 127.0.0.1:8004
btmux --port 8005 install # bake command-line options into the service
btmux install --print # print the unit without installing it
btmux restart # restart the service, ending its shells
btmux uninstall # stop and remove the service

The --host, --port, --profile, --shell, --public-url, and --tailscale flags, along with your shell’s PATH, are captured when the service is installed. Run btmux install again after changing them.

The desktop app finds a running service and offers to connect to it.

Update the installed binary, then run btmux upgrade to move the running server to it. For Homebrew, run:

Terminal window
brew update && brew upgrade btmux # or run the install script again
btmux upgrade

btmux upgrade keeps running shells and their scrollback (how). If it can’t, btmux restart ends them and restores the layout. Windows has no in-place upgrade: quit btmux, replace the binary, and start it again.

For the desktop app, quit it, then run brew upgrade --cask btmux or the new installer.

The repository’s flake exposes packages.<system>.default (the server and CLI) and packages.<system>.desktop (the desktop app), for Apple Silicon macOS and x86-64/ARM64 Linux.

It also has a Home Manager module, which installs btmux with its shell completions, writes config.toml, and runs the service:

{
inputs.btmux.url = "github:btmux-dev/btmux";
imports = [ inputs.btmux.homeManagerModules.default ];
programs.btmux = {
enable = true;
settings = {
prefix = "C-b";
terminal.font-size = 16;
};
service.port = 8004;
};
}

settings takes anything config.toml does. To change it, choose settings in the Settings dialog, turn on Show TOML, switch it to Home Manager, and replace your settings with what it shows: it has all of config.toml, including settings the dialog doesn’t. Other options:

  • desktop.enable = true: install the desktop app too. It runs its own server, so you can set service.enable = false unless you also want btmux in a browser.
  • service.enable = false: install and configure btmux without starting it.
  • service.host, service.shell, service.tailscale: the service’s --host, --shell, and --tailscale.
  • package, desktop.package: use another build. package = null, with the service disabled, only writes the configuration.
  • enableFishIntegration = false: skip the fish integration, installed when programs.fish.enable is set. fishPickMenus = true uses btmux pick menus for Tab, Ctrl+R, and cdh.

If you installed the service with btmux install, run btmux uninstall before enabling the Home Manager service. When only the package changes, activation runs btmux upgrade to keep shells running. If the upgrade is refused, for example because Neovim has unsaved buffers, activation warns and you can run btmux upgrade later.

See Development.