Herdr Core
Reach the terminals behind the Herdr desktop app from your phone: spaces, tabs, agent status and Chat View, through moshi-hook.
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
- Run the Herdr desktop app, or an
hccore, on the host. - Install moshi-hook on the same host and pair it.
- Reconnect. The picker lists your Herdr Core spaces.
| You want | moshi-hook | Moshi on iOS |
|---|---|---|
| Spaces and the terminal view | 0.4.45 | 4.2.5 |
| Spaces while the Herdr window is closed | 0.4.46 | 4.2.5 |
| Named cores | 0.4.47 | 4.3.0 |
| Windows hosts | 0.4.47 | 4.5.1 |
| New worktree from a space | 0.4.60 | A current version |
To check what the picker will see:
$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.
Sidebar
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:
$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-hookis on the non-interactivePATHwithssh <host> 'command -v moshi-hook', then checkmoshi-hook mux ls --jsonon the host. Ifhcis missing or empty whilehc lsshows terminals, runmoshi-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
hcterminal started from a Herdr TUI pane needs moshi-hook 0.4.61 or newer.
Related docs
- Herdr — the TUI.
- Multiplexers — the support matrix.
- Move between multiplexers — bring workspaces and agents to or from Herdr Core.
- Debugging the session picker — when sessions are missing.