Cross-platform companion tooling for amux (mixpeek/amux): machine configuration, one view across every machine, auth recovery, and upstream fixes. macOS, Linux, Windows.
  • Shell 92.1%
  • Python 7.9%
Find a file
iblues76 9361e4e9a5 amux-remote/amux-up: forward start flags; loud stop extras; start!=attach hint; v0.2.1
- start <name> [flags...] sends extra args shlex-joined in the POST body as
  {"flags": ...} (spaces/quotes survive); zero-flag behavior unchanged (no body).
- stop (and any future simple_post verb) errors loudly on unexpected extra
  args instead of silently ignoring them.
- start prints the next step after success ('attach: amux-up <machine> <name>'),
  suppressed via AMUX_NO_HINT=1 for wrappers.
- amux-up: two-word form now WINS over a same-named local session; the remote
  lane surfaces a failed start instead of blindly attaching; --cc/--plain route
  to attach, everything else one-shot to start. claude sessions auto-resume, so
  --continue is rarely needed — but it is forwarded and honored.
- selftest: 5 new mocked regression tests (flag round trip incl. spaces, no-body
  zero-flag start, hint suppression, loud stop extras, amux-up routing).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:57:05 -06:00
bin amux-remote/amux-up: forward start flags; loud stop extras; start!=attach hint; v0.2.1 2026-07-30 10:57:05 -06:00
docs companions: harden remote control and align rename/reauth 2026-07-29 21:28:44 -06:00
lib lib: restore amux_python, removed by mistake with the dead renderer 2026-07-28 15:59:58 -06:00
patches companions: harden remote control and align rename/reauth 2026-07-29 21:28:44 -06:00
setup Fix what only running on real Linux could reveal 2026-07-28 16:28:39 -06:00
tools amux-remote/amux-up: forward start flags; loud stop extras; start!=attach hint; v0.2.1 2026-07-30 10:57:05 -06:00
.gitignore amux-nuilab: clean, cross-platform amux companion tooling 2026-07-28 15:55:51 -06:00
install.sh amux-nuilab: clean, cross-platform amux companion tooling 2026-07-28 15:55:51 -06:00
LICENSE amux-nuilab: clean, cross-platform amux companion tooling 2026-07-28 15:55:51 -06:00
README.md README: clone URL follows the repo rename to amux-nui-public 2026-07-29 21:47:58 -06:00
VERSION amux-remote/amux-up: forward start flags; loud stop extras; start!=attach hint; v0.2.1 2026-07-30 10:57:05 -06:00

amux-nuilab

Companion tooling for amux — the session manager that runs each coding agent in its own tmux session.

amux gives you start / stop / attach / ls on the machine you are sitting at. This adds the things you need once you are actually living in those sessions day to day, and especially once there is more than one computer: configuring machines, seeing every session everywhere, recovering a session over SSH, and finding the right past conversation.

Works on macOS, Linux, and Windows (WSL, MSYS2, or Git Bash — see docs/windows.md).

Quick start

git clone https://git.nuilab.org/f.ortega/amux-nui-public.git
cd amux-nui-public
./install.sh          # symlinks bin/* into ~/.local/bin
amux-doctor           # tells you what this machine can and cannot do
setup/bootstrap       # installs whatever amux-doctor says is missing

amux-doctor is the one to run first and whenever something is odd. It does not guess: it runs the actual calls amux depends on and reports what worked.

Using one computer

That is all you need. amux works locally, and amux-ls, amux-convos and check-claude-auth work right away. Skip the rest until you get a second machine.

Adding a second computer

On the machine you want to reach:

setup/serve-install

On the machine you want to drive from:

amux-config add desktop --host <address>
amux-config test --all

Details, including how to get a network path between them: docs/remote.md.

Commands

Command What it does
amux-doctor Honest report of what this machine can do — tmux calls, auth mode, every configured machine
amux-config Add, test, edit, rotate and remove the machines you drive. Tokens never touch argv or your history
amux-ls This machine's sessions, compact grid or verbose
amux-remote Drive another machine over its REST API — including secure attach, exec, and provider selection
amux-all Every machine's sessions in one view. Unreachable ones are marked, not hung on
ccjump Fuzzy-pick any session anywhere and jump straight to it
amux-up Ensure a session is started and attach to it, local or remote
amux-convos List a session's past conversations with a snippet of each, and resume the right one
amux-reauth Fix a session stuck at 401 / Please run /login, with no browser. Works over SSH
check-claude-auth Whether sessions on this machine will actually authenticate, and why not
amux-rename Rename a session everywhere at once without losing its context
amux-tabs One terminal tab per session (macOS / iTerm2)

Every command's -h is its own header comment, so the help cannot drift from the code.

Docs

  • auth.md/login vs long-lived tokens, why browser control only works with one of them, and the both-at-once trap that produces mysterious recurring 401s
  • remote.md — connecting machines: VPN, LAN, or SSH tunnel; tokens and rotation
  • windows.md — WSL vs MSYS2 vs Git Bash vs Scoop, and what each can actually do
  • troubleshooting.md — symptoms, causes, fixes

Patches

Two bugs in upstream amux that have not been fixed there, shipped as anchored edits to the copy on your machine. Nothing upstream is redistributed here.

patches/apply --check     # am I affected?
patches/apply             # fix it
patches/apply --revert    # undo
  • running-flag — a gracefully stopped session reports running forever, because the list only checks whether a tmux session exists.
  • auto-resume — when the server cannot resolve which conversation to resume it starts a blank one, wiping the session's context. The watchdog restarts sessions on its own, so this destroys work with no obvious cause, and compounds each time.

The patches are idempotent, refuse to apply if upstream has drifted, validate that the result still compiles before installing it, and back up first.

Security

The design rule throughout: a secret never reaches argv, stdout, or your shell history.

  • Tokens move over stdin or a mode-600 file. amux-config has no --token flag on purpose — a token on a command line is visible to every user on the machine via ps, and is saved to your history permanently.
  • Where a token must be shown, only a four-character prefix and a length are printed. Enough to tell two tokens apart; useless to anyone reading over your shoulder.
  • An amux server's token grants full control of every session on that machine. setup/serve-install binds to loopback plus one address you choose, never 0.0.0.0. Expose it on a private network or through an SSH tunnel — never straight onto the internet.

Requirements

  • amux (github.com/mixpeek/amux) — setup/bootstrap installs it for you: the Homebrew tap on macOS, otherwise a shallow clone into ~/.local/bin (no sudo). Note that amux is not on PyPI, so pip install amux does not work.
  • tmux, python3, and curl or wget
  • A coding agent for amux to drive, normally Claude Code

setup/bootstrap detects your platform and package manager — brew, port, apt, dnf, pacman, zypper, apk, winget, scoop, choco, or MSYS2's pacman — and uses whichever is present rather than assuming one.

License

MIT — see LICENSE.

amux itself is a separate project, licensed MIT + Commons Clause. This repository contains only original work and does not bundle any part of it.