Get Moshi
multiplexer

Herdr Core

Reach the terminals behind the Herdr desktop app from your phone: spaces, tabs, agent status and Chat View, through moshi-hook.

updated 4 days ago4 min readpage 12 / 59

Herdr Core (hc) is the runtime behind the Herdr desktop app. It keeps terminals running but draws nothing itself; spaces and tabs belong to the app. It is separate from the Herdr TUI. Not sure which you have? See Herdr TUI, app or core.

How it fits together

Herdr Core's own hc attach shows one terminal, so Moshi connects through moshi-hook. It lists the running cores and their spaces, and shows the selected terminal in Moshi. Rex works the same way. Without moshi-hook, the picker shows only Recent and the card says No multiplexer, even when hc ls lists terminals.

Set it up

  1. Run the Herdr desktop app, or an hc core, on the host.
  2. Install moshi-hook on the same host and pair it.
  3. Reconnect. The picker lists your Herdr Core spaces.
You wantmoshi-hookMoshi on iOS
Spaces and the terminal view0.4.454.2.5
Spaces while the Herdr window is closed0.4.464.2.5
Named cores0.4.474.3.0
Windows hosts0.4.474.5.1
New worktree from a space0.4.60A current version

To check what the picker will see:

host
$moshi-hook mux ls --json

Look at the hc section.

What the terminal shows

  • Herdr window open: the view follows the terminal selected in the window. It starts as a watch-only viewer, so switching tabs on the Mac doesn't resize anything. It takes your phone's size when you type or your screen size changes.
  • Herdr window closed, or a headless host: the view follows what you select in Moshi's Sidebar.
  • Selecting in Moshi's Sidebar moves the view, and the Herdr window if it is open, and fits your phone at once.

All cards of one core follow the same selection.

The Sidebar lists spaces, their tabs and terminals, with agent status. You can create, rename, move and close spaces and tabs, split and close terminals, and do so with the window closed; Herdr picks the changes up when it next opens. Terminals themselves have no names to change.

  • Terminals an agent starts are listed after it, indented as sub-agents.
  • Spaces on a linked git worktree nest under their repository. New worktree creates one as its own space.
  • Only this machine's spaces are listed. A machine you added to Herdr lists its own through its own moshi-hook.

Agents

Chat View, notifications and the Inbox work as with other multiplexers. Opening an event from the Inbox attaches the core and goes to that agent's terminal.

Status comes from the agent's own report (OSC 7501), not from reading the screen. An agent that doesn't report still runs, but can have no status in the Sidebar. If one is missing, update the agent.

Named cores

A core started with HC_SESSION is a separate server:

host
$HC_SESSION=work hc run --bg --name web bun dev

With several cores running, the picker lists the cores instead of one core's spaces; the default one is called Herdr. A named core has no Herdr window, so its view follows the Sidebar.

Windows

On a native Windows host, moshi-hook reaches the core over its named pipe. OpenSSH's default shell must be PowerShell; see Native Windows hosts.

Limits

  • No scrollback over mosh. Use SSH when you need history.
  • No pane sizes, so the pane minimap shows order rather than layout.
  • No session deep links (moshi://).

Troubleshooting

  • No spaces in the picker. Check that moshi-hook is on the non-interactive PATH with ssh <host> 'command -v moshi-hook', then check moshi-hook mux ls --json on the host. If hc is missing or empty while hc ls shows terminals, run moshi-hook doctor.
  • Agents appear under tmux instead. On macOS, a core inherits the environment it was first started from. One started inside tmux passes that on to every terminal. Stop the core and start it from the Herdr app or a plain shell.
  • Chat View shows the outer Herdr pane. An hc terminal started from a Herdr TUI pane needs moshi-hook 0.4.61 or newer.