Docs / Reference / amux cheat sheet

Reference

amux cheat sheet

Every command you need day to day — amux sessions, the amux-run / amux-attach scripts, tmux keys, and the hcom bus — in one place.

Updated Jul 30, 2026

A quick lookup for the commands in the guides . For what they mean and how to install the pieces, follow the links.

Sessions (amux )

CommandDoes
amux register NAME --dir DIR [agent flags]Define a session (no start).
amux start NAMEStart it, or attach if already running.
amux exec NAME --dir DIR [agent flags]Register and start in one step.
amux attach NAMEAttach. Detach with Ctrl-b then d.
amux lsList sessions; * = running.
amux ls -cCompact one-screen grid. (amux ls | less -R pages the full list.)
amux peek NAME [lines]Recent output, without attaching.
amux send NAME "text"Send a line of input.
amux stop NAME / amux rm NAMEStop / remove.
amux-rename OLD NEWRename a session everywhere — files, live tmux session, dashboard — keeping its history. -n = dry run.
amux serve PORT --bind 127.0.0.1,IPDashboard (private bind only).

Anything after the name on register / exec goes straight to the coding agent — use its full flag names, for example --model opus, --continue, --append-system-prompt "…".

Providers (amux )

A session runs one of four agents: claude, codex, gemini, or opencode (the local-model lane — amux refuses to point it at a hosted API).

CommandDoes
amux register NAME --dir DIR --provider PPersist the provider with the session (exec too).
amux provider NAMEShow a session’s provider.
amux provider NAME PChange it (session must be stopped).
amux start NAME --provider POne-shot override, not persisted.
amux-remote BOX exec NAME --provider PSame, on another machine.
amux-remote BOX provider NAME [P]Show / change on another machine.

Conversations (guide )

A session accumulates several past conversations. Pick the right one to resume instead of guessing with --continue (which grabs the newest).

CommandDoes
amux-convos NAMEList the session’s past conversations, newest first, each with a snippet of the last thing you said.
amux-convos NAME -n NOnly the top N. --less pages; --full shows the whole snippet.
amux-convos NAME --resume NStop the session and restart it on the Nth listed conversation.
amux-convos NAME --cmd NJust print the amux start NAME --resume UUID line (don’t run it).
amux start NAME --resume UUIDStart a session on a specific conversation by id.

Auth recovery (guide )

CommandDoes
check-claude-authRead-only: is auth on this machine healthy, and if not, why?
amux-reauth NAMEFix a session stuck at a real 401 — probes the token directly, clears a shadowing stored login, restarts. No browser.
amux-reauth --allSame, for every session parked at a real 401.
claude auth logoutRemove a stored browser-login that shadows the durable token.

amux-convos, amux-reauth, check-claude-auth and friends are in the amux-nui-public repo (opens in new tab) (./install.sh links them onto your PATH) — see amux-tools .

The two scripts (guide )

CommandDoes
amux-run NAME [agent flags]Start NAME in the current directory, detached. Re-run to restart with new flags.
amux-attach NAMEAttach to NAME.
cd ~/code/myapp
amux-run myapp --model opus --continue    # start (or restart), detached, resuming last conversation
amux-attach myapp                          # look in; Ctrl-b d to step out

tmux keys

amux sessions are tmux sessions, so the usual keys work after the Ctrl-b prefix:

KeysDoes
Ctrl-b dDetach (leaves the session running).
Ctrl-b [Scroll / copy mode (q to exit).
Ctrl-b ?List all key bindings.

Cross-machine bus (hcom )

CommandDoes
hcom relay new --broker mqtt://HOST:1883 --password '…'Create the group; prints a connect token.
hcom relay connect TOKEN --password '…'Join the group on another machine.
hcom relay onTurn syncing on.
hcom relay daemon startStart the background daemon.
hcom relayShow status and the group key.
hcom relay tokenReprint the connect command for adding machines.

Machines (amux-config )

One mode-600 config file per machine you drive; amux-config writes and maintains them.

CommandDoes
amux-config add BOX --host HAdd a machine. Token arrives via --from-ssh (default, read over SSH) or --token-stdin — never on the command line.
amux-config list / show BOXList boxes / show one box’s settings (the token is never printed).
amux-config test BOX / --allProve a box answers and the token works.
amux-config edit BOXOpen its config in $EDITOR.
amux-config rename OLD NEW / remove BOXRename / delete a box’s config.
amux-config token BOXRe-fetch just the token, e.g. after a rotation.
amux-doctorIs this machine set up correctly? Runs the real operations, not version checks.

Remote control (guide )

CommandDoes
amux-remoteList the configured boxes (a box is always named first).
amux-remote BOX lsList that box’s sessions, under a header naming it (host, URL, running counts).
amux-remote BOX ls -cCompact grid, same shape as amux ls -c. (--bare drops the header, for embedding.)
amux-remote BOX peek NAMERecent output from a session on BOX.
amux-remote BOX start NAME [flags...]Start it on that box, forwarding one-shot launch flags (e.g. --provider opencode) — and, when run from a terminal, attach right away (--no-attach or piping skips that and prints the attach command instead). For claude, resume is automatic, so --continue is rarely needed.
amux-remote BOX stop NAMEStop it. Takes no flags — extras error loudly.
amux-remote BOX attach NAMEAttach to a session on BOX over SSH.
amux-up BOX NAME [flags]Start it on that box (flags forwarded) and attach — one command, same word order as amux-remote. amux-up BOX:NAME still works.
amux-allEvery machine at once — compact grid per box (local first), -v for verbose.
ccjumpFuzzy picker → jump to any active session, local or remote.

Gotchas

You doWhat happens
amux-remote BOX start NAME from a script and expect it to attachInteractive runs attach; non-TTY runs (scripts, cron, pipes) start only and print the attach hint. Force the old behavior with --no-attach.
amux start NAME --continue on an already-running sessionstart short-circuits to attach and silently drops --continue.
See Please run /login · 401 after attaching/resumingIt may be replayed transcript history from an earlier auth outage, not a live failure. Send a message — if it replies, auth is fine. Details .
A new message 401s in every session at onceAn expired stored browser-login is shadowing your durable token. claude auth logout, restart sessions (amux-reauth --all). Details .
Validate auth with claude -p and it says OK, but sessions still 401claude -p silently falls back between credential stores. Use check-claude-auth (direct probe) or an end-to-end message instead.

Source: content/reference/amux-cheatsheet.md · maintained in the nuilab-agenticai repository.