For AI agents
Command line
The muxin command: everything the app does, for your terminal, your scripts and agents without MCP.
The muxin command does what the app does, from a terminal. It’s the same program: run with no arguments, it opens the window. Use it for quick looks, in scripts, and for AI agents that run shell commands but don’t speak MCP.
Install the command
- macOS: Settings › General › Command line installs it in
/usr/local/bin. With Homebrew, it’s already in your PATH. - Windows: the installer offers to add it to your PATH.
- Linux: the
.deb,.rpmand Arch packages, the AUR and Homebrew put it in your PATH, and so doesinstall.shfrom the.tar.gz. With the AppImage,muxin shell-command installputs it in~/.local/bin.
muxin shell-command remove takes it out again. muxen, its name before 0.5.1, runs it too. muxin --help, and --help after any command, lists the options.
JSON and exit codes
--json, on every command: print JSON only on stdout, the same shapes the MCP tools return. Errors print as{"error": {...}}with acodeand often ahint. Progress goes to stderr.
| Exit code | Means |
|---|---|
0 | Success. |
1 | The operation failed. |
2 | Bad input, or the thing wasn’t found. |
Commands that start long work wait until it’s done and print its log as it goes: installing runners, copying files, making a VM, a cloud machine or a box. The command does the work itself, so stopping it stops the work. To get your prompt back, run it in your shell’s background. muxin install and muxin runner take --timeout <seconds> to give up sooner, with exit code 1.
muxin ws exec is the exception: it exits with the command’s own exit code (124 if it timed out), so it composes like running the command locally.
Machines are named by their id, a slug of their name such as mac-studio; the name works too. The app, the CLI and MCP servers can all run at once and see each other’s changes.
Machines
muxin status [--refresh] # overview and what needs attention
muxin machines
muxin machine beacon # everything about one machine
muxin check # check every machine now and print a report
muxin recipe check beacon [claude] # which tools it has (git, docker, node, claude, ...)
muxin recipe apply beacon gh claude # install the missing ones, what they need first
muxin recipe apply beacon claude --update # and update the agent CLIs that are behind
muxin ssh-hosts # your ssh config, your tailnet, this network
muxin add-machine --name Beacon --host you@beacon.local # connects directly once it answers
muxin add-machine --name Old --host old.local --ssh-only # keeps it on ssh
muxin rename-machine beacon "Beacon server" # the id stays the same
muxin remove-machine beacon # nothing on the machine changes
muxin disconnect beacon # stop connecting; its sessions go on there
muxin connect beacon
muxin ignore beacon low-disk [--undo] # stop showing a warning it's meant to have
muxin connection beacon [--direct on|off]
muxin wake beacon # a sleeping Mac through its agent, else Wake on LAN
muxin power win-test off # a VM or a cloud machine
See Machines, Recipes and Connections.
Agent sessions
muxin session ls # with each one's branch and pull request
muxin session start beacon claude --cwd ~/code/api --prompt "Fix the failing test"
muxin session read beacon/claude-3f9a
muxin session wait beacon/claude-3f9a # until it's done or needs you [--timeout 600]
muxin session question beacon/claude-3f9a # what it's asking, and the options
muxin session answer beacon/claude-3f9a 1
muxin session send beacon/claude-3f9a "Also update the README"
muxin session do beacon/claude-3f9a review # or commit, pull_request, fix_comments, …
muxin session attach beacon/claude-3f9a # use it in this terminal
muxin session rename beacon/claude-3f9a "API tests"
muxin session handoff beacon/claude-3f9a codex [--on orbit] [--keep] # another agent takes over
muxin session restart beacon/claude-3f9a
muxin session stop beacon/claude-3f9a
Agents are claude, codex, opencode, gemini, agy, amp, pi, or shell for a plain shell. The actions are commit, commit_push, pull_request, review, fix_comments, conflicts and recap. From inside a session, muxin session start codex --prompt "…" (no machine) starts a helper beside it, and --keep lets it go on after that session ends. See Agent sessions.
Boxes
muxin box new acme/api "Fix the flaky webhook test, and open a pull request"
muxin box new ~/code/app "Finish this refactor" --on beacon --agent codex
muxin box ls
muxin box send box-7k2m9q "Also update the docs"
muxin box attach box-7k2m9q
muxin box shell box-7k2m9q
muxin box pause box-7k2m9q
muxin box rm box-7k2m9q
See Boxes.
Workspaces
muxin ws create --platform linux --repo acme/api --ref main
muxin ws create --docker --image node:22 --repo acme/web # in a fresh container
muxin ws create --machine beacon --worktree-of ~/code/api --branch fix-login # a worktree of a checkout there
muxin ws ls # with each one's branch and pull request
muxin ws exec ws-7f3a2c -- cargo test
muxin ws exec ws-7f3a2c --background -- npm run dev
muxin ws cat ws-7f3a2c .muxen/logs/1.log
echo 'hello' | muxin ws write ws-7f3a2c notes.txt
muxin ws files ws-7f3a2c src --depth 1
muxin ws changes ws-7f3a2c # git status and the diff
muxin ws sync ws-7f3a2c ~/code/api --push # or --pull; --delete mirrors deletions
muxin ws shell ws-7f3a2c # a shell there, for you
muxin ws rm ws-7f3a2c [--keep-files]
muxin ws allow nas --off # no workspaces on this machine
ws is short for workspace. Leave out the machine and Muxin picks the least-loaded one that matches --platform.
Files and editors
muxin files beacon:~/build # what's in a folder (alias: ls)
muxin cp beacon:~/build/app.tar.gz mac-studio:~/Downloads
muxin edit beacon:~/code/api [--editor zed] [--print]
edit opens the folder over ssh in Zed, Cursor or VS Code; --print shows the command instead. See Files.
Running things
muxin run --on beacon,mac-studio -- df -h / # one command on several machines
muxin run --all -- uptime # every machine that's online
muxin snippet ls # your saved commands (add, rm, run --on a,b)
muxin ps beacon [-n 20] # busiest processes and GPUs
muxin kill beacon 4242 [--force]
muxin ports beacon # what's listening
muxin forward beacon 3000 # its port 3000 at localhost:3000, until Ctrl-C
run exits 1 when any machine failed. See Run on machines and Servers.
Logs and services
muxin logs beacon --list # what there is to read
muxin logs beacon # the system log
muxin logs beacon --unit nginx -n 500 --grep error
muxin logs beacon --container postgres --follow
muxin logs beacon --file /var/log/syslog
muxin services beacon # services and containers, failed first
muxin services beacon restart nginx
muxin services beacon stop postgres --container
See Logs and services.
Desktops
muxin desktop shot beacon [-o screen.jpg]
muxin desktop input beacon '[{"type":"click","x":640,"y":400},{"type":"text","text":"hello"}]'
muxin desktop displays beacon # its monitors, with their ids
muxin desktop windows beacon # its apps' windows, with their ids
muxin desktop add beacon --size 2560x1440 --name Side
muxin desktop set beacon <display> --size 3840x2160 --scale 2
muxin desktop fit studio 2560x1440 # a Mac's screen, the size of a view
muxin desktop remove beacon <display>
shot and input take --display for one monitor, or --display window:<id> for one app’s window. Input coordinates are in the screenshot’s pixels. See Desktops.
VMs and schedules
muxin vm options
muxin vm create win-test --system windows-11 --on beacon
muxin vm create dev --system ubuntu-24.04 --install claude,codex
muxin vm destroy win-test
muxin schedule ls [--on beacon]
muxin schedule add beacon --name Tests --every day --at 09:00 --command "make test"
muxin schedule add beacon --name Triage --every weekdays --at 08:30 --agent claude --prompt "Triage new issues" --folder ~/code/api
muxin schedule run beacon <id>
muxin schedule log beacon <id>
muxin schedule rm beacon <id>
--every takes 15m, 2h, day, weekdays or days like mon,thu. See VMs and Schedules.
Cloud machines
muxin cloud login --browser # or --token TOKEN, or --doctl
muxin cloud options # regions, sizes, prices
muxin cloud create build-box --region nyc3 --size s-2vcpu-4gb
muxin cloud usage
muxin cloud power build-box off # still billed while off
muxin cloud destroy build-box
muxin cloud logout
A cloud machine costs money every hour it exists. See Cloud machines.
GitHub, git and runners
muxin github inbox
muxin github repos
muxin github repo acme/api
muxin github issue acme/api#632
muxin github accounts
muxin github use work-login
muxin checkouts --repo acme/api
muxin git status beacon
muxin git setup beacon --identity --credentials
muxin watch acme # or acme/api; unwatch to stop
muxin runners [--machine beacon] [--state offline]
muxin jobs
muxin install beacon --count 2 [--label gpu] [--mode auto|service|background|docker]
muxin runner restart beacon/beacon-01 # start, stop, restart, logs, remove, update
muxin cancel-run 123456789
github is also gh. See GitHub and Runners.
Usage, settings and files
muxin usage [--days 30] [--machine beacon] # tokens and cost at API prices
muxin settings # show them
muxin settings --poll 20 --check-interval 15 # GitHub every 20 s, machines every 15 min
muxin paths # where Muxin keeps its files
muxin updates # whether a newer Muxin is out, and how to update
muxin init # write a starter config.toml
muxin mcp # the MCP server, for agents
muxin skill install # teach your agents this CLI
muxin skill show # the guide your agents read
muxin quit # quit the running app
Muxin keeps its files in ~/.config/muxin (%APPDATA%\muxin on Windows). Set MUXIN_HOME, or pass --config-dir, to use another folder; a separate one is handy for trying things without touching your real setup.