How to Use the Moshcode CLI

buffer_overlord1 pts0 comments

How to use the moshcode CLI — Chovy's Blog

How to use the moshcode CLI

2026-08-14, by Anthony “chovy” Ettinger.

How this was written: drafted with an AI assistant from my notes and from the<br>CLI's own help output, then checked against a real install. Commands below were run against<br>moshcode 0.56.0.

What moshcode actually is

moshcode calls itself &ldquo;a metal wrapper for coding engines.&rdquo; That is the honest<br>description. It is not another coding agent competing with the ones you already use — it<br>installs and drives them. opencode, Claude Code, codex, gemini, kimi, qwen, deepseek,<br>aider and a few more all sit behind one command surface, so you stop memorising five different<br>CLIs with five different flag conventions.

On top of that it adds the things you actually need around an agent: sessions that survive a<br>closed terminal, an account you can sync settings to, and a namespace where you can park what you<br>build. Home page is moshcode.sh.

Installing it

curl -fsSL https://moshcoding.com/install.sh | sh

Yes, the site is moshcode.sh and the installer is served from<br>moshcoding.com. They are two different properties and that trips people up. The<br>install script is the one above.

It is zero-dependency ESM, so the only requirement is Node.js 18 or newer. The same script<br>handles the other two lifecycle jobs:

curl -fsSL https://moshcoding.com/install.sh | sh -s -- update<br>curl -fsSL https://moshcoding.com/install.sh | sh -s -- remove

Do not put sudo in front of that. moshcode escalates on its own<br>for the steps that genuinely need root. If you run the installer or an update as root, it installs<br>into root's home directory instead of yours, and then you have two copies and a confusing<br>afternoon. Run it as you.

Finding your way around

Run it with no command at all and it opens the mosh pit — the interactive view. When you<br>want the map instead:

moshcode help # the groups<br>moshcode help # flags and examples for one<br>moshcode help --all # the whole wall<br>moshcode help --json # the same thing, for a script

The commands are grouped, which is the fastest way to understand the tool: engines<br>(agents, install, upgrade), runtime (herd, ps, attach, kill, restore),<br>tools (stocks, crypto, news, rss, trade), extend (mcp, skill,<br>plugin), script (prd, commands, run), account (login, whoami,<br>save, load), and hosting (dns, doh, site, template). There is also an arcade with<br>twenty-two games in it, because of course there is.

That --json flag is not decoration. Nearly every command takes it, which is what<br>makes moshcode scriptable rather than merely interactive.

Driving an engine

moshcode engines # what exists, and what's installed here<br>moshcode install claude # put one on this machine<br>moshcode agents # engines and their status<br>moshcode agents claude # open that engine's agent view

One warning, straight from the CLI's own help text: autonomous modes bypass approval<br>prompts. Use them in a container or a workspace you trust, and not in the checkout you care<br>about. That is not me being cautious for the sake of it — an agent that never asks is exactly<br>as dangerous as it sounds.

The herd: sessions that outlive the terminal

This is the feature I use most and the one that is hardest to appreciate until you have it. A<br>herd session keeps running when you close the window.

moshcode herd start # start a session, hand the prompt back<br>moshcode herd ps # the roster and every session's state<br>moshcode attach # get back into one<br>moshcode herd tile # every member on screen at once<br>moshcode herd ui # sidebar of members, selected one beside it<br>moshcode kill # stop one<br>moshcode restore # bring sessions back

Once you are running three or four agents at once, herd tile and the roster stop<br>being conveniences and start being the only way you keep track of anything.

Logging in

An account lives at app.moshcode.sh and the CLI<br>authenticates against it:

moshcode login # browser flow<br>moshcode login --device # device-code flow, for a headless box<br>moshcode whoami # who am I currently<br>moshcode whoami --json # same, for a script<br>moshcode logout

The device flow is the one you want over SSH; moshcode picks it automatically when stdin is not<br>a TTY, but you can force it. Once you are signed in, your settings become portable:

moshcode save --dry-run # what would go up<br>moshcode save # push aliases + herd rules to your account<br>moshcode load # pull them onto another machine

That is the whole reason to bother logging in: set a box up once, then moshcode load<br>on the next one instead of doing it all again.

Joining the Pit network

The Pit, at app.moshcode.sh/pit, is the part people<br>find strangest, so here is the plain version. It is a namespace that lives outside the<br>traditional DNS root. You claim an ending — the moral equivalent of a TLD, something<br>like .eggs — on a first-come, first-served basis, and then you mint as many names<br>under it as you like. Sign in with the same moshcode account the CLI uses, and claim one.

Because these names are...

moshcode herd install help account script

Related Articles