Commands reach the app over a socket of its own,
$XDG_STATE_HOME/herdr/gpui/control.sock (default ~/.local/state/), which
only your user can open; on Windows, over a named pipe (see
Windows). An agent on an SSH host has no path to it; there,
the app's managed shim at ~/.local/state/herdr/gpui/bin/herdr-gpui offers
browser open and browser reload through Herdr workspace metadata (see
remote agents),
and every other command exits 8 for Herdr 1 callers. Remote Herdr 2 callers
use terminal labels over the existing core bridge for browser open,
browser reload, and browser feedback [--wait SECONDS] (also feedback).
Feedback requires Python 3 on the remote host, waits up to 600 seconds, and
returns exit 4 when there are no notes. The window must remain connected and
hold a driving tab for the caller. Host-qualified terminal identity isolates
same-named terminals on different machines; requests cannot select another
pane. At most eight feedback calls are pending. Replies are bounded by the
normal notes budget and acknowledged after printing; cancellation, timeout,
or disconnect returns unacknowledged notes to the queue. A lost acknowledgement
can cause a duplicate on retry. Existing labels at first connection and requests
on unshown terminals remain intentionally non-replayable. No browser server is
started remotely. Cloud and WSL use the same core reply route; cloud loopback
URLs still need a separately reachable address, while SSH uses the existing
port forward and WSL uses localhost integration.
Annotation screenshots are transferred to that caller's host before delivery,
with caller/connection revalidation and cleanup of unaccepted uploads. A failed
or unsupported transfer warns in the app and returns text without local paths.
SSH/cloud screenshot transfer requires a Linux/macOS desktop; WSL mapping is
supported by the Windows desktop.
A few commands work from files alone and need no running app; they say so below.
On Windows, sheprd.exe is a console program, so a shell waits for it and
sees its exit code; the installers put its directory on PATH. The Start menu
opens sheprd-launcher.exe instead, which starts it without a console
window.
sheprd --help # every command
sheprd COMMAND --help # one command
Options and output
For app-kept work commands from remote Herdr 2 terminals, the managed shim supports notes, mute/status, worktree dialogs/listing, setup/run scripts, checkpoint restore, Teleport, and fan-out with scoped replies and the same confirmation policy. See the remote work contract for host/window identity, bounds, cancellation, and the full-binary-only Git commands. Remote notes listings are restricted to the caller's host.
Every command accepts:
--json: print one JSON document instead of text. Errors become{"error": {"code", "message"}}on standard output.--window ID: act in that window (IDs come fromwindow list). By default a command acts in the window showing the caller's workspace (HERDR_WORKSPACE_ID, which Herdr sets in every pane). In a Herdr 2 (herdr-core) terminal the caller is that terminal (HC_TERMINAL_ID, which herdr-core sets in every terminal): the command acts in the window and workspace of the tab holding it, and pages it opens and their notes belong to it as they would to a Herdr pane. When no window shows it, as for a session the app does not show, the command exits 5 rather than act on another session's window. Outside both, it acts in the frontmost window. From a herdr-core terminal in a workspace Sheprd keeps for Herdr 2,worknotes, mutes, scripts, fan-out,checkpoint restore, andhost prtarget that workspace without requiring a Herdr 1 snapshot. Scripts and fan-out use the same host capabilities and trust/confirmation flow as its menu; dialogs refuse a caller on a host the window is not currently showing. A terminal in no workspace the window keeps cannot use these workspace commands. Teleport works from a workspace the app keeps for Herdr 2 on this computer, as its menu does.
| Exit | Meaning |
|---|---|
| 0 | Done |
| 1 | Refused or failed |
| 2 | Invalid arguments, or an address or file that cannot be shown |
| 3 | Sheprd is not running |
| 4 | Nothing yet: no notes, no event, no pull request, condition not met |
| 5 | The window, workspace, tab, host, or file is not there |
| 6 | A dialog is open in the window, or the app is busy |
| 7 | The app did not answer in time |
| 8 | Not available on this platform or in this version of the app |
Commands
App and windows
| Command | What it does |
|---|---|
status |
Whether the app runs, its version and control protocol, windows, and hosts |
app focus|hide|quit |
Bring the app forward, hide it, or quit it (Herdr keeps running) |
window [list] |
Windows with their IDs, size, workspace, and hosts |
window alerts |
The alerts the window kept, newest first, including those held back by quiet hours; run clear_all_notifications empties them |
window new [--session NAME] |
Another window, of your own Herdr session or a named local session |
window focus ID |
Bring a window forward |
window fullscreen [on|off|toggle] |
|
window size [WIDTHxHEIGHT] |
Print or set the window's size; windows cannot be moved |
window detach|reconnect |
Detach from, or reconnect to, the selected host |
ui settings [PAGE] |
Open a Settings page, such as ui settings voice for speech accounts. Omit PAGE to list pages and row IDs |
ui highlight ROW_ID |
Open Settings at that row, scroll it into view, and highlight it |
ui guide TEXT [--highlight ROW_ID] |
Update one persistent top banner (three lines maximum), optionally opening and highlighting a Settings row |
ui guide --clear |
Dismiss the banner and highlight; the person can also dismiss it |
ui sidebar|statusbar|menubar [on|off|toggle] |
For this window and session. menubar is the in-window menu bar on Linux and Windows; macOS, whose menus are the system's, exits 8 |
ui font-size +|-|reset|POINTS |
The terminal font size for this session |
ui traces [--host ID|--tag TAG|--all] |
Without options, read prepared replication status, the current filter, and indexed hosts with stable IDs and device tags. peers report waiting, syncing, ready, or failed (with error). With a filter, open Traces for that host or existing device label, or clear the source filter. Unknown hosts/tags exit 5; usual --json and --window targeting applies. Cached hosts remain filterable offline. For recent concurrency, daily peaks, and participants, use the companion’s traces overlap command. |
ui agent-group [NAME|all] |
List the agents panel's coordinator groups, marking the one shown, or show one group's sessions with its coordinator first, or all of them, for this window and session. Exits 5 for a group no coordinator names and 8 unless [sidebar] coordinator_suffix is set and the agents panel is shown |
ui panel workspaces|overview|pull-requests|issues|tasks|security|automations|ports|usage|traces |
Show an activity bar section: Workspaces with the sidebar expanded, Overview of what needs you on every host, the focused workspace's pull requests or issues across the window, Beads tasks across the window's projects, the vulnerability reports and Dependabot alerts of your repositories, every host's automation scripts and runs, every port this computer's user listens on, every host's plan usage, or local and replicated agent session history and connected-host sync status in Traces |
run COMMAND |
Any app command by its [keybindings] name, as the palette runs it. run new_tmux_terminal (tmux-enabled builds) and run new_core_terminal open a terminal on that backend regardless of the default |
commands |
The names run accepts (no app needed) |
open DIR |
Open a folder as Open Project in the palette does, starting the app if needed (below) |
open DIR checks the folder where you run it and resolves it to an absolute,
canonical path. A path that does not exist exits 5; a file, or a folder in a
device namespace (\\.\…, \\?\GLOBALROOT\…, and on Unix /dev, /proc,
/sys), exits 1. The app then opens the command palette on
its projects and opens the folder there, which focuses the workspace already
rooted in it or starts one, on the window's local Herdr, and brings the window
forward. A dialog open in the window refuses it (exit 6); the palette shows
anything that goes wrong after that, such as the folder disappearing.
When no Sheprd is running and no --window is given, open starts the app,
as a plain sheprd would, then asks again every quarter second until the
window has connected to the local Herdr and accepts the folder. It waits at
most 20 seconds after starting the app, then exits 7. Explorer's Open in
Sheprd entry, which both Windows installers add, runs this command through
sheprd-launcher.exe, so no console window appears.
The app's own tabs
| Command | What it does |
|---|---|
tab [list] |
Pages, code, reviews, and Devices tabs with IDs |
tab focus|close ID |
|
browser open|reload|feedback |
Files and web addresses open in a background tab. Use --focus to select it or --beside for a visible split. See browser tabs |
browser list |
Page tabs only |
browser navigate ID URL |
Load another address in a page tab |
browser back|forward ID |
|
browser zoom ID +|-|reset|PERCENT |
Zoom a page tab a step, back to 100%, or to 50-300%; the tab keeps it |
browser text ID |
Read the page’s text in the background |
browser screenshot ID PATH |
Capture the page without selecting the tab, at most 2000 px a side (macOS). Both screenshot and text report busy if an inactive Mac window would need to create the page |
code open FILE[:LINE] |
A read-only code tab at a line |
code edit FILE[:LINE] |
Your terminal editor, in a new pane beside yours |
devices |
The Devices overview |
machine [open [NAME]] |
The virtual Mac called NAME (default default) in a background tab, started or resumed if it is not running. Closing the tab leaves it running; quitting Sheprd saves it (Apple silicon Macs) |
machine start NAME |
Start it without a tab, resuming it if it was saved; machine agent tells when it is ready |
machine claim NAME [--wait S] |
Atomically reserve for the calling pane/terminal for 15 idle minutes; repeat to renew. Busy exits 6. --wait (1–600 seconds) retries with progress on stderr every five seconds, preserving JSON stdout |
machine release NAME |
Release your own reservation when finished; another owner gets exit 6 |
machine list |
Sheprd VM slots in use, total limit, and slots available, followed by each machine's reservation owner and idle seconds remaining (or unreserved), state, CPUs, memory, display, and disk use, which counts blocks shared with its image. Exits 4 when there are none |
machine set NAME [--cpus N] [--memory GB] [--display fit|WxH] |
What it boots with next, after it next shuts down |
machine suspend NAME |
Save it and stop it; it resumes where it was when next shown |
machine delete NAME |
Add a notice to review deletion in Settings and free its disk; the user confirms there |
machine new NAME --from IMAGE |
Make a machine from an image: an APFS clone that takes no real space until it changes, with its own identity, so several can run at once (macOS allows 2) |
machine new [NAME] |
Add a notice that the user can click to open Virtual Macs settings and confirm downloading Apple's newest macOS for this Mac (over 20 GB) and installing it on a new machine, NAME or default; it then opens with its setup guide. Exits 2 when NAME exists |
machine image [list] |
The images machines can start from. Exits 4 when there are none |
machine image save MACHINE IMAGE |
Keep a shut down machine as an image. Exits 6 while it runs or is suspended |
machine image delete IMAGE |
Add a notice to review deletion in Settings; the user confirms there. Machines made from it stay |
machine setup [NAME] |
Opens a background machine tab with its setup guide docked beside it: sign in, install Sheprd Agent, allow its two permissions, and save an image, each checked by Sheprd before the next. A machine made from an image opens with it already |
machine agent NAME |
Whether Sheprd Agent answers inside the running machine: its screen size in pixels and whether macOS lets it post input and take screenshots (see Working inside a virtual Mac). Exits 1 when it does not answer |
machine exec NAME [--timeout S] [--cwd DIR] -- COMMAND... |
Run a command as the machine's logged-in user and print its output, as cloud exec does |
machine screenshot NAME PATH |
Write a PNG of the machine's screen to PATH |
machine click NAME X Y [--right] [--double] |
Click at a point of the machine's screen, in the screenshot's pixels |
machine type NAME TEXT |
Type text in the machine as from a keyboard, at most 4096 characters at once |
machine key NAME KEY |
Press a key in the machine, with modifiers: return, escape, tab, cmd+q, cmd+shift+4 |
machine --host HOST VERB ... |
open, start, claim, release, list, suspend, agent, exec, screenshot, click, type, or key run by the Sheprd on another Mac this window reaches (a host ID or label), when both slots here are busy (see Virtual Macs on other computers). Exits 6 when the user declines, 8 when HOST has no Sheprd running, is too old, or cannot be reached |
orchestrator [--repo PATH] |
Show the Issues section narrowed to your checkout's project, or PATH's |
orchestrator restart RUN [--repo PATH] |
Open the user's confirmation to restart a loaded, owned Herdr 2 run in this project with its saved prompt/model and existing checkout; requires the running app |
orchestrator adopt RUN [--repo PATH] |
Read the current process of a loaded legacy run and prepare the user's adoption confirmation; grants no authority until confirmed and revalidated |
orchestrator items|issues|prs|tasks |
What it last synced, from its local database (no app needed); tasks is the repository's Beads tasks, with each one's assignee, priority, and blockers in --json |
review |
The review of your workspace's uncommitted changes |
px0 [open] |
Open a background px0 tab on your local workspace's checkout (macOS and Windows) |
px0 open reuses one editor tab per workspace. It discovers a local px0
workbench or starts an installed px0; config set px0.url http://127.0.0.1:7777/
selects an existing workbench, and config unset px0.url restores automatic
discovery. --json returns the opened tab ID and workspace. Exit 0 means the
tab opened; startup errors appear in that tab with Retry. Remote workspaces
and builds without embedded pages return exit 8. See px0.
Worktrees and agents
Memory is kept per Git repository on the host the repository is on, in
repositories/<id>/memory.sqlite3 under Sheprd's state directory, keyed by
the Git common directory every worktree of it shares. Each repository keeps
at most 2000 entries; pinned ones stay, and the least recently used of the
rest go first. Agents learn when to use it from the managed skill. In
sheprd-acp chats, the note sent ahead of the first prompt also explains it
and shows memory index, and each prompt after brings up to 3 entries that
share at least two of its keywords and were not shown yet in that chat.
| Command | What it does |
|---|---|
labels [list|add TAG|rename OLD NEW|remove TAG] [--worktree] [--pane ID|--workspace ID] |
Manage labels on the calling agent, or on its checkout with --worktree. An explicit pane or workspace uses the local remote-control daemon’s ID. A workspace selects the checkout directly. WSL sessions share checkout labels within the same distribution. The group of unlisted Herdr 2 terminals can span folders and supports only individual agent labels. iOS shows the combined labels on chat and terminal agent rows. Names are case-insensitive, with up to eight labels of 24 characters per target. Renaming or removing affects only the selected target. Requires Remote control on the host. |
notes [list] |
Every worktree note |
notes get|clear, notes set TEXT |
The note on your checkout (its repository and branch) |
memory [list] [--all] [--limit N] |
What agents learned about the current directory's repository: pinned entries first, then the most recently used, of the repository and the current branch (--all: every branch's). Exits 4 when there are none (no app needed) |
memory search WORDS [--all] [--limit N] |
Entries holding every word as a prefix, else any of them, best first; each found counts as used. Exits 4 when nothing matches (no app needed) |
memory index [--chars N] |
What an agent should see before it starts, within N characters (default 3000): pinned entries, the branch's own, then the most recently used, with how many more there are (no app needed) |
memory get ID |
One entry with its details (no app needed) |
memory add [--branch] [--kind KIND] [--name NAME] [--pin] [--details TEXT] TEXT |
Keep TEXT (at most 500 bytes; details up to 16 KiB) for the next agent in any worktree, tab, or chat of the repository, or with --branch for the current branch only. KIND is fact (default), gotcha, command, decision, preference, or handoff. With --name, a later add of that name updates the entry; the same text again only marks it used. Secrets, tokens, invisible characters, and prompt markup are refused (no app needed) |
memory pin|unpin ID, memory forget ID |
Pin an entry (first in every listing, never dropped; at most 50), unpin it, or remove it; exits 5 when there is none (no app needed) |
worktree [status], worktree mute|unmute |
Whether your worktree's notifications are muted; silence them or let them through again |
worktree list |
List app-kept Git workspaces on the caller's host, with host, workspace, path, branch and linked-checkout status; unopened Git checkouts are in the Existing picker |
worktree create [BRANCH], worktree open, worktree delete |
Open the caller's Herdr 2 new-worktree, existing-checkout, or deletion dialog; the user confirms in the app. Host identity follows the caller, including SSH, cloud and WSL devices |
feedback [--wait S] |
Notes the user sent your pane from pages, reviews, or terminals |
checkpoint [list] |
Checkpoints of the current directory's checkout, newest first (no app needed) |
checkpoint create [LABEL] |
Take one now (no app needed) |
checkpoint diff A [B] |
What changed between two, or since one (no app needed) |
checkpoint restore [ID] |
Open the checkpoints dialog; you confirm there |
scripts [list] |
The repository's .herdr/worktree.toml scripts (no app needed) |
scripts setup|run |
Run one in a new tab; an unseen script still asks first. Setup first copies the ignored files .worktreeinclude names from the main checkout. Archive removes the worktree, so it stays behind the app's delete dialog |
teleport --to HOST |
Open the teleport dialog for your linked worktree, reviewing HOST; you confirm there |
fan-out PROMPT [--agent KIND[:N]]... |
Open the fan-out dialog prefilled; you start it there |
chat [status] |
The sheprd-acp chat panes of the window's host, this machine or an SSH host: agent, status, model, context window use, and whether the chat view or the terminal shows |
chat convert [--pane ID] |
Move the terminal agent in your pane (or ID, else the focused one) into a sheprd-acp chat in the same pane, keeping its conversation. From a Herdr 2 pane, your pane is your terminal (HC_TERMINAL_ID), whose id in chat is core: and the terminal's (see Moving a terminal agent into a chat). Returns once the move has started; chat shows the chat when it attaches. Exits 6 while the agent works, 5 when the pane has no terminal agent, and 8 for an agent or pane that cannot move. config set chat.auto_convert true moves every new agent this way (Opening new agents as chats) |
chat shortcuts |
Your text shortcuts, the prompts every chat's composer offers (type /, or use the shortcuts button beside +), in order: each label and its text. --json adds each one's id and title, the list's updated_ms, and complete, false when the list holds more text than one answer carries. The list is the same on this computer, every connected SSH host with sheprd-remote-control, and the phones paired with them; Settings > Text Shortcuts edits it. Exits 4 when there are none |
chat favorite [on|off|toggle] [--pane ID] |
Star or unstar the agent in your pane (or ID, else the focused one; default: toggle). Favorites are listed first in the agents panel and on paired phones whatever the sort. Each host's sheprd-remote-control keeps its own agents' favorites, so every desktop and phone reaching it shows the same stars. From a Herdr 2 pane, your pane is your terminal, core: and its id. Exits 5 when the pane runs no agent the window can star |
chat unread [on|off|toggle] [--pane ID] |
Mark the agent in your pane (or ID, else the focused one) unread (on) or read (off) (default: toggle). An agent is unread while it has a reply no one read on any device: the agents panel shows a dot, paired phones a dot and a bold row, and its next reply marks it again. Each host's sheprd-remote-control keeps what was read of its own agents. Exits 5 when the pane runs no agent the window can mark |
chat pr [list] |
Run as the agent of a sheprd-acp chat: the pull requests that chat's side rail lists, oldest first, each with its repository, address, and what was done to it (created, pushed, edited, commented, reviewed, ready, merged, closed, reopened). Reaches the chat named by SHEPRD_CHAT_ENDPOINT, which the chat sets on its agent, over the chat's own socket; Sheprd need not run. Exits 4 when there are none, 2 outside a chat, and 3 when the chat cannot be reached (see Pull requests in a chat's rail) |
chat pr add URL |
List a pull request (https://github.com/OWNER/REPO/pull/N) in your chat's rail, for one you changed without gh. Exits 2 for an address that is not a GitHub pull request |
chat show|hide|toggle [--pane ID] |
Show the native chat view over your pane (or ID, else the focused one), or its terminal |
chat new [AGENT] [--pane ID] [--prompt TEXT | --prompt-file PATH] |
Open a background tab running a sheprd-acp chat with a built-in agent (antigravity, claude, codex, copilot, gemini, kimi, muse, opencode, pi) in the workspace and folder of your pane (or ID). --prompt or --prompt-file (- reads standard input) groups the delegated task on the calling turn’s iOS Live Activity and starts it with a brief, at most 96 KB, sent as its first prompt and shown as the calling agent's rather than the person's (see Starting a chat with a brief); exits 2 for an empty, binary, or longer brief, and 8 for a chat on an SSH host or another machine's Herdr 2, which cannot take one yet. Run by a chat's agent, it starts a chat like that one: AGENT left out is the chat's own agent, and the chat's own agent, named or not, starts with the chat's model, thinking level, permission mode, and auto-accepting (see Starting a chat like this one); AGENT may be left out only there. While its agent is idle, a chat on this machine can switch to another installed agent from its composer, which hands the new agent the conversation. On an SSH host the tab runs that host's sheprd-acp (see Chats on SSH hosts). A Herdr 2 caller gets a background tab in its workspace and folder (see Chats in Herdr 2 panes). Exits 8 when sheprd-acp is missing here, the host cannot be reached, or the agent is not installed on it (sheprd-acp agents lists those that are) |
Hosts
A focus asked for on a connected host the window is not showing, such as
herdr --machine Homelab agent focus NAME, switches the window to that host
when it moves the host to another tab. The daemon reports nothing when the
target is already its focused tab, or when the focus only moves between panes
of one tab, so a script that must end up on the host runs sheprd host select
as well. A focus waits until you stop typing or composing, so keys meant for
one host do not reach another, and choosing a host yourself in the meantime
cancels it. It leaves the host restored at the next launch as it was.
It does not take the window while a dialog is open, or from another window
already showing the host. A tab or workspace opening on a background host does
not take it either.
| Command | What it does |
|---|---|
host [list], host select ID |
The window's hosts, with their tags and, for an SSH or cloud host whose own Sheprd offers a newer release, that release (update in --json); show another one |
host mute|unmute [HOST] |
Silence a host's notifications as a whole, or let them through again, by ID or label; absent, your host. Works while it is offline |
host pause|resume HOST |
Pause a saved SSH or cloud host by ID or label, as its menu's Pause device does: it stays listed, greyed, but Sheprd disconnects from it until it is resumed; its own Herdr and terminals keep running. host list shows it as disabled. Exits 8 for this computer or a WSL distribution |
host tag ID [TAG...] |
Replace the tags that group a host in the sidebar and on paired phones; with no tags, clear them. Each computer's daemon keeps its own tags, so a host away gets the edit once it is back |
host update [HOST] |
Ask in the app to update the Sheprd app running on an SSH or cloud host, by ID or label (default: your workspace's host), as its header's Update pill does; the user confirms there (see Updating Sheprd on other machines). Exits 4 with the reason when it offers no newer release, 5 when no connected host has that name, 6 while a dialog is open, 8 for this computer, which update covers |
pr [status]|checks|comments|open |
Your branch's pull request, on the window's selected host. comments needs your workspace focused. status also says where it sits in a GitHub stack and what merging there would do (stack in --json: its layers bottom first with a status word each, a verdict of merged, ready, blocked, or unread when a layer below it was not read, and for blocked the lowest layer read in the way and why), and its place in the merge queue (queue: position, state, eta_seconds); both are null when it is in none |
pr create |
Open the Git popup on Create pull request for your focused local checkout. A core terminal must itself be the focused pane, not just share its workspace. The user confirms with a click; Enter cannot submit a command-opened popup, and changing checkouts cancels it. Only then does the existing native action push the branch and create the pull request using Sheprd's GitHub sign-in, with the latest commit's subject as its title. No gh login or exported token is needed. The command returns when the popup opens, not when a pull request is created; follow with pr status after confirmation. Exits 1 when signed out, not focused, already open, or still checking the checkout, 6 while another menu, dialog, or Git operation is open, 8 for unsupported remote/non-Git checkouts |
pr merge |
Open the Git popup's merge dialog for your branch's pull request, which must be your focused workspace's. On a GitHub stack it lands the open pull requests below it too, bottom first, through GitHub's asynchronous merge API. Only the dialog opens: the user picks the method and confirms with a click, since Enter is ignored in a dialog a command opened, so a keystroke meant for a terminal cannot confirm it. Exits 1 with the reason when it is not open, a draft, already queued, or its stack is blocked (The stack cannot merge yet: #1362 is checks failed), 6 while a menu or dialog is open |
pr queue add|remove |
Open the confirmation that adds your branch's pull request (with the open layers of its stack below it) to its base branch's merge queue, or takes it out; the user confirms there. Exits 1 when the branch has no merge queue, or the pull request is already in it or not in it |
pr quota |
Last reported GraphQL points used, limit, and remaining, plus rate-limit retry delays for the window's GitHub accounts. --json returns records merged by login: known observations are preferred, then the latest reset window and greatest usage within it; retry delays retain the longest pause. Usage is never summed across credentials. Unavailable quotas are null. No network request is made. |
ports [list] |
Ports your workspace listens on, and forwards |
ports forward|unforward PORT |
Forward a port of the SSH host to this machine |
ports open PORT |
localhost:PORT in a tab, forwarded first when remote |
ports all |
Every TCP port this computer's user listens on, as the Ports section lists them, whoever started it: bind address, a clear name (a macOS app's name, or what an interpreter runs, such as vite or manage.py runserver), process, pid, command line, project and working directory, CPU and resident memory, uptime, whether it is paused or a system listener, and the Herdr workspace that started it. Keeps the section's scan running for a minute and waits up to 20 seconds for its first listing. macOS and Linux only (exit 8 elsewhere); exits 4 when nothing listens |
ports stop|pause PORT |
Ask in the app to stop (SIGTERM, then SIGKILL a few seconds later) or pause (SIGSTOP) the processes listening on PORT of this computer. Nothing is signalled until the user confirms there; exits 5 when nothing of yours listens on it, 6 while a dialog is open |
ports resume PORT |
Resume (SIGCONT) the paused processes listening on PORT of this computer; exits 5 when none is paused |
usage, system |
Plan usage and load of the selected host: CPU, memory, disk, uptime, and its GPU and video memory when it has one and show_gpu_load or show_sidebar_gpu_load is on |
usage pick |
The agent the tab strip's Agent button would start a chat with now: the one last started or picked, unless its plan is spent or close to its limit and another installed agent's is not, with the reason when it would start another. Lists each installed agent's room (ample, unknown, tight, spent) with its use, reset, and when it runs out at its pace, as the status bar last read them; reads nothing itself. Exits 4 when no agent can start (see Choosing the agent) |
security |
Private vulnerability reports in triage (titles and metadata only, never their descriptions) and open Dependabot alerts of the github.com repositories the window's workspaces hold, most severe first, as the Security section last read them. Exits 4 when there are none |
security open REPOSITORY ALERT|GHSA |
Show alert ALERT (its number) or private report GHSA (its GHSA ID) of REPOSITORY (owner/name) in the Security section, beside its list: the fix, the advisory, and the dependency for an alert; the report, its advisory draft, and its conversation for a report. Only items the section lists open; nothing on GitHub changes |
automation approve FILE [--host ID] |
Open the approval of the automation script FILE in the app: its plan, caps, and content hash, for the user to approve or cancel. The command approves nothing. FILE is the script's path on the host as sheprd-automate status lists it, resolved here when it exists; --host names the host by ID or label (default: your workspace's host). Exits 5 when the host does not list the script, 6 while a dialog is open or the host was not read yet |
cloud [list] |
Saved cloud machines (no app needed) |
cloud add |
Open the settings that add one |
cloud images [list] |
Sandbox images built from projects' recipes (no app needed) |
cloud images build [PROVIDER] |
Build the current repository's sandbox images ahead of a dispatch |
cloud setup ID |
Run the [cloud] setup script on a saved machine again, in a new tab once the window shows it. ID is the machine ID from cloud list, its host ID, or its label |
cloud create PROVIDER [--count N] [--template T] [--preset P] [--sandbox] [--no-install] [--no-setup] |
Ask in the window to create up to 16 machines; the user confirms there, once for all of them. Prints the batch to follow (below) |
cloud exec ID [--timeout S] [--cwd DIR] -- COMMAND... |
Run a command on a saved machine through the app's connection to it, and print its output (below) |
cloud destroy ID... | --batch BATCH |
Ask in the window to delete saved machines at their providers and forget them; the user confirms there, once for all of them. Prints the batch to follow (below) |
cloud wait BATCH [--timeout S] |
Each machine of a batch once all are settled, or after S seconds (default 60, at most 600) |
cloud batches |
The batches the app keeps, newest last; the oldest are left out when they would not fit in one answer |
processes [--pane ID | --terminal ID] |
The processes under a Herdr pane or a herdr-core terminal, with CPU and memory; by default the caller's own (HC_TERMINAL_ID, else HERDR_PANE_ID). No app needed |
search symbol|file QUERY |
Go to Symbol or Go to File over the current checkout (no app needed) |
Settings and services
| Command | What it does |
|---|---|
config [path] |
The settings files (no app needed) |
config get|set|unset KEY [VALUE] |
Read or change config-gpui.local.toml, keeping its comments. A value that would not load, or an unknown key, is refused and nothing is written; the app applies the rest at once (no app needed) |
config check |
Report invalid settings, exit 1 if any |
config get|set|unset link_handlers [ARRAY] |
Read or configure explicit Herdr 2 link-handler adapters; execution still requires a terminal link click |
config get|set|unset link_plugins [ARRAY] |
Opt in to installed plugin directories on exact hosts; read only link actions with manifest platform filtering, never startup/build/event hooks |
config reload |
Reread Herdr's config and this app's |
theme [list], theme set NAME |
The app theme. A device's terminal theme is config set devices.ID.theme NAME, with the ID from host list minus its ssh: prefix |
font [list], font set NAME, font reset |
|
language [status], language list, language set system|TAG |
The language set and the locale Sheprd shows, the languages available for direct selection plus pseudo-locales, or save the language setting (a BCP 47 tag; en-XA and en-XB are pseudo-locales). system also uses Simplified Chinese when it matches the OS's preferred languages. Only status asks the app, and without it reports what it would show |
keybinds [list], keybinds check |
Shortcuts; custom Herdr commands this client cannot reach |
caffeine [status], caffeine on|off|toggle [--for 30m] |
Keep the machine awake |
sound [list], sound play [done|request], bell |
Sounds play at sound.volume percent (config set sound.volume 30) |
update [status], update check |
Never downloads or installs. --json adds the running app's current version |
update install [--confirmed] |
Open the app's update dialog; the user installs there. --confirmed is how another Sheprd that reaches this machine over SSH hands over an update its user approved there: the app downloads, verifies, installs, and restarts as for a paired phone. It is refused from this app's own panes and terminals |
integrations [list] |
What Herdr offers the selected host |
integrations install-skill |
Install the agent skill (no app needed) |
logs [--lines N] [--path] |
The app's log (no app needed) |
diagnostics bundle PATH |
A redacted report for a bug, with the newest crash reports (no app needed) |
Boat's sandbox lifetime uses the existing config commands:
sheprd config set boat.auto_stop never
sheprd config set boat.auto_stop '"7200"' # seconds, stored as a string
sheprd config get boat.auto_stop --json
sheprd cloud add # open Cloud devices, then choose Boat
never is the default: billing continues until the sandbox is stopped in Boat.
Numeric deadlines are fixed, even during active SSH work; trials require at
most 7200 seconds. The setting applies on create and resume. In Boat settings,
Finish setup extends a running sandbox from now or disables its deadline.
Recover creation retries a persisted creation request with its original options and key; forgetting an unresolved request requires confirmation there.
What a new cloud machine installs and runs when it first connects is set the
same way, and cloud setup runs it again on one already saved:
sheprd config set cloud.agents '["claude", "opencode"]'
sheprd config set cloud.setup '"git config --global pull.rebase true"'
sheprd config set cloud.coder.agents '[]' # nothing extra on Coder
sheprd cloud setup herdr-tidy-lark-aa
An agent that needs machines of its own asks for them with cloud create,
then follows the batch with cloud wait until each is ready:
sheprd cloud create coder --count 10 --template dev --json
sheprd cloud wait 3 --timeout 600 --json # again while it exits 4
The window asks once, saying how many machines of which provider, how they
are made, and that the provider bills each until it is destroyed. Once
confirmed, each machine is made on its own, saved as a device, given Herdr
when it lacks it (unless --no-install), and has the [cloud] setup script
run on it in a login shell from its home directory, without a terminal
(unless --no-setup). Only then is it ready; cloud wait shows each
machine's step meanwhile, and its device ID once saved. A failed setup script
fails the machine with the end of its output, but the machine stays saved;
destroy it like any other. Coder takes --template and --preset by name
(without them, the deployment's only template and its default preset);
Azure makes a Container Apps sandbox with --sandbox. Boat and Railway make
their machines one at a time. Providers are named by key or name: azure,
boat, boxd, coder, container, daytona, opensandbox, railway, sprites. The device
list keeps at most 64 cloud devices, counting those being made.
cloud exec runs one command on a saved cloud machine, named as for
cloud setup, through the same authenticated command the app connects with
(coder ssh, a provider's SSH gateway, and so on), so the agent needs no
credentials of its own. Everything after -- is the command, word for word;
it gets no input. --cwd runs it in a directory, ~/ being the machine's
home. --timeout (default 120 seconds, at most 600) counts everything,
including waiting for a stopped machine to start; past it the command is
stopped. Its stdout comes back on stdout and its stderr on stderr, each cut
to its last 64 or 32 KiB and with terminal controls removed; --json gives
{"device", "status", "stdout", "stderr", "truncated"}. It exits 0 when the
command exited 0, and 1 otherwise. It asks nothing: like the agent's own
shell, it acts on the user's machine at once. Git pushes from a machine need
credentials there, such as Coder's external auth or a gh auth login in the
[cloud] setup script.
sheprd cloud exec herdr-tidy-lark-aa --cwd ~/code -- git clone https://github.com/me/app
sheprd cloud exec herdr-tidy-lark-aa --cwd ~/code/app -- sh -c 'git switch -c fix && make test'
An agent that worked on cloud machines removes them with cloud destroy,
naming each by its machine ID, host ID, or label (a label two machines share
is refused), or with --batch every machine a batch named. The window asks
once, listing each machine and what happens to it: Azure, Boat, boxd, Coder,
Container, Daytona, OpenSandbox, and Sprites delete the machine with what
goes with it and then forget it here;
Railway VMs cannot be deleted from this app, so they are only forgotten and
expire on their own. A dialog already open refuses the request (exit 6).
sheprd cloud destroy coder:5d1c… herdr-tidy-lark-aa --json
sheprd cloud wait 3 --timeout 600 --json
cloud wait exits 0 once every machine went as asked, 1 once the batch
settled otherwise (a machine failed, with why, or the user said no), and 4
while it is still waiting for the user or running. A batch keeps going if the
command or the window that asked goes away; the app keeps the last 32.
Focus-on-hover between split terminal panes is on by default. Disable it with
sheprd config set focus_follows_mouse false.
The change applies live; config get focus_follows_mouse reads it back.
An unnamed tab shows its number. To show its agent's terminal title instead,
run sheprd config set tab_labels.agent_title true.
Working inside a virtual Mac
machine list --json includes capacity: {"in_use": 2, "limit": 2, "available": 0, "others": 0}
when all VM slots are occupied. Starting and saving VMs, and a live macOS installer, count until they
stop. macOS allows two VMs whoever runs them, so in_use also counts the VMs of other
programs, such as Tart's CI runners, and others says how many of those there are. Reservations and
running slots are separate: an unreserved running VM can be claimed and reused
while slots are full, but an unreserved stopped VM cannot start. machine open,
setup, and claim return busy (exit 6) with “No VM slots available: 2 of 2 in
use” when a new slot is needed. claim --wait retries capacity as well as ownership.
An existing reservation can be renewed even when VM slots are full. This keeps
ownership during preparation; starting the VM still requires a free slot.
Releasing a reservation does not stop its VM or free a running slot.
Reserve a shared VM with machine claim NAME before opening or using it,
and release it with machine release NAME after stopping your guest jobs.
Claims are shared across windows, expire after 15 idle minutes, and clear
when Sheprd quits. Guest commands renew the holder's claim and refuse other
panes while it is held. These coordinate this app's callers, not external
SSH/VM tools. After expiry or restart, reserve again. machine list --json
includes an optional reservation string identifying the owner. When both
VMs are busy, tell the user you are waiting, try machine claim NAME --wait 60,
and report when acquired. This does not boot the machine or promise guest
readiness. No FIFO queue is promised.
Virtual Macs on other computers
When both slots here are busy, machine --host HOST borrows a virtual Mac
on another Mac this window reaches, by its host ID or label. This app runs
the request there with sheprd machine lend over its connection to that
host, so that Mac's own Sheprd runs the machine and keeps its claims, which
name this computer and the pane that asked. Nothing is copied: the other
Mac makes machines from its own images.
Opening, starting, or claiming a machine there adds a notice in this window.
Click it to review the request and choose Use once, Always use HOST (kept in [machine] borrow_from),
or Wait for a slot here. Waiting or closing the dialog exits 6. open
starts the machine there and adds a background tab here drawn from its frames,
which come a few times a second and shrink on a slow link; clicks and keys
in that tab reach the machine unless an agent holds it. A screenshot's
PATH is on this computer.
A Mac lends unless [machine] lend = false, and never while it keeps Tart
VMs or runs VMs of other programs, which share its two slots: machine
list --json there names why in lending. Exits 8 when the host has no
Sheprd running, has one too old to lend, or cannot be reached.
Sheprd Agent
machine agent, exec, screenshot, click, type, and key work
inside a running virtual Mac through Sheprd Agent, a small app in the guest
that answers the app over the machine's vsock device: no network, and
nothing outside the machine can reach it. A new machine's tab shows a
setup guide beside it that walks through what follows and checks each
step through the agent; machine setup NAME or Settings > Virtual Macs >
Set up for agents shows it again. Every machine boots with a
read-only disk from the app, Sheprd Agent, which shows on its desktop.
Install the agent once by double-clicking Install Sheprd Agent.pkg there:
it puts Sheprd Agent.app in /Applications and starts it at each login.
Allow it when macOS asks about Accessibility (for input), and switch it on
in the Screen & System Audio Recording pane the installer opens (for
screenshots: macOS shows no prompt for it), then shut the machine down and
keep it as an image, so every machine made from it has the agent and its
permissions. It needs the user logged in, so turn on automatic login before
saving the image. The disk comes with builds made by just bundle; release
builds do not carry it yet.
machine exec runs a command as that user, with a Terminal's PATH, in
--cwd when given (~/ being their home). Its output comes back as
cloud exec's does, and it exits 0 when the command did. At its --timeout, the agent stops the command and everything it started, and the command exits 7. Points for
machine click are in the screenshot's pixels, top-left first, so an agent
reads machine screenshot and clicks what it sees. Like cloud exec, none
of these asks first: they act only inside a machine the user made, as the
agent's own shell does on this one. macOS ignores synthetic input in
password fields and some of its own prompts, and signing in to an Apple
Account still needs the user.
sheprd machine exec test-1 -- xcodebuild -scheme App test
sheprd machine screenshot test-1 /tmp/screen.png
sheprd machine click test-1 1280 812
sheprd machine type test-1 "hello"
sheprd machine key test-1 cmd+s
Remote control
| Command | What it does |
|---|---|
remote [status] |
Whether remote control is on and its daemon runs: its port, version, the addresses it serves with network labels and daemon-host interface names, its certificate authority fingerprint, paired and connected devices, and each relay it listens on with its name, description, and tags, whether it is listening, and its round trip ([remote] relays, and relays Sheprd on another computer shared with it). JSON includes optional status.address_details keyed by origin, and status.relays keyed by relay with a state of connecting, listening (with its round trip rtt_ms once measured), or failed (with its error), and the name, description, and tags its [remote] relays entry gives it, if any; older daemons omit them. Each relay's token is whether the daemon listens there with a private relay's listen token (text says with a listen token); it is false from older daemons |
remote devices |
The paired devices with their IDs, when each was last seen, whether it gets notifications, and the other machines it was paired with from here or is being paired with. JSON includes each device's optional via (the computer that vouched for it) and hosts, each with a state of offered, allowed, asking, pending, paired, or failed. Exits 4 when there are none |
remote push-status |
How the daemon sends iPhone pushes: off (push relay off) or push_relay (through the Sheprd push relay, push.sheprd.org, the only way a computer sends them; a daemon from before this may say own_key, shown as a mode this Sheprd does not know), and how the last alert and Live Activity push went since the daemon started (delivered, gone, limited, refused with its status, unreachable, or unsent) and when, then each linked SSH or cloud host's own, asked over SSH by running its sheprd-remote-control push-status (nothing is installed to ask; a host without a daemon, or too old to know the verb, shows as unknown). Read-only: the push relay is turned on in Settings > Remote control, after its explanation. JSON has enabled, push_relay (the setting), error, status with mode, alert, and live_activity (each at_ms and outcome, absent until one went out), and hosts (at most 32, each name with its status or error, absent when no host is linked); it names no token, handle, or device. A daemon that is down or too old to answer leaves status null with an error; that alone does not say which, so remote status tells whether it runs |
remote test-push |
Sends each paired iPhone registered for alerts one sealed test alert now, through the push relay, as the phone's own Settings > Send Test Push does, and prints one line per phone with what came of it (delivered means Apple took it). It only notifies the user's own phones. Exits 4 when nothing was sent (the push relay is off on the daemon, or no phone has registered for alerts) and 1 when a push failed. JSON has mode and pushes, each device (its name as paired) and outcome (refused adds status); it names no token or handle. Settings > Remote control has the same button while the push relay is on |
remote pair [--address HTTPS_ORIGIN] |
Open the pairing dialog, preferring Tailscale by default. Choose an address in the dialog, or pass an exact origin from remote status (for example https://100.101.102.103:7443). The QR and its token show only there, and the user approves the phone there. An unavailable address is reported in the dialog |
remote add-link |
Open Add Device > Nearby Sheprd with another computer's pairing link filled in, read from standard input (at most 8 KiB; white space a chat inserted is dropped). The link comes from that computer's Remote control > Pair device > Copy link and lets this computer pair with it through its relays from any network, without Bluetooth. It is never an argument, a terminal on standard input is refused so it is not shown, and it is never printed or logged. Nothing is claimed until the user clicks Pair there, and the other computer's user still compares the code and clicks Allow. Works whether or not remote control is on here. Exits 2 for text that is not a pairing link |
remote relays token ENDPOINT [--clear] |
Keep this computer's listen token for a private relay, read from standard input (at most 1 KiB, trimmed; 16 to 255 printable characters without spaces), or with --clear forget it. The token is never an argument, a terminal on standard input is refused so it is not shown, and it is never printed or logged. ENDPOINT is a relay address such as relay.example.org. Works whether or not the relay is in [remote] relays and whether remote control is on; a running daemon reconnects with it, and Sheprd offers it again to your other machines. Exits 2 for a bad address or token, or empty standard input |
remote restart |
Restart the daemon from the binary beside the app, as after a rebuild or update; phones reconnect on their own. Exits 6 while the service is already changing |
remote revoke DEVICE |
Ask in the window to revoke a paired device, named by its ID from remote devices or its name (a name two devices share is refused); the user confirms there |
remote shares |
Active read-only shared sessions on this computer (share ID, pane, history scope, tool flag, active grants count, and relay; never link secrets). Exits 4 when there are none |
remote share [--pane ID] |
Open the Share this session dialog in Sheprd for ID (default: the caller's or open chat pane), where the owner previews guest-visible content and confirms creating or stopping a read-only link |
Remote control is turned on in Settings > Remote control, or with
config set remote.enabled true; the app then installs the sheprd-remote-control
daemon as a user service and keeps it in line with the [remote] settings.
While it is off, remote status says so and exits 0; pair, devices,
shares, revoke, and restart exit 1. A dialog already open in the window refuses pair, share, and
revoke (exit 6). --json gives {"enabled", "running", "status", "error"}
for status, where status is the daemon's own report, {"devices": [...]} for devices, {"shares": [...]} for shares, and {"relay", "token"} for
relays token: the relay as normalized and whether a token is now kept.
Phones never need a listen token; only computers that listen on a private
relay do.
Standalone phone PR/check/log reads are opt-in per computer. After signing in
with gh auth login on that host, set [remote] github_cli = true and restart
its remote-control service. The foreground daemon accepts
sheprd-remote-control serve --state-dir DIR --github-cli. This permits paired
phones to read the listed workspaces using that host's GitHub CLI credential.
Separately, the iPhone app may borrow a GitHub sign-in to read GitHub itself,
only while the phone's Share GitHub sign-in switch is on (each device in
devices --json has share_github); the switch is set in the pairing dialog
and in Settings, never from this command. See the
scope, cache and access policy.
sheprd remote status --json
sheprd remote revoke d_6f1c
sheprd remote relays token relay.example.org < ~/relay-token.txt
sheprd remote relays token relay.example.org --clear
Phone
Agents bring the person to a screen of the Sheprd phone app, or put a note in front of them there. A phone is driven only while the app is open on it and its person left Let agents open screens on for this computer (that computer's page in the app's Settings; on by default). It refuses while its app is locked, and shows which computer's agent opened a screen. Nothing pairs, approves, or changes a setting from here. Remote control must be on.
| Command | What it does |
|---|---|
phone [list] |
The phones connected that let agents open screens, by name and device ID, the one used last first. Exits 4 when there are none |
phone state |
The screen in front: home, workspaces, pull_requests, settings, new_workspace, or one of this computer's chat, term, workspace, or changes with its pane or workspace; none for another computer's screen or a form. Says when the app is locked |
phone open [PANE] |
Show a pane of this computer: its chat, else its terminal. Without PANE, your own pane (HERDR_PANE_ID); from a Herdr 2 terminal, name it |
phone open home|workspaces|prs|settings|new-workspace |
Show a tab, or the form starting a workspace on this computer |
phone open chat PANE, phone open term PANE |
Show a chat or a terminal |
phone open workspace|changes [WORKSPACE] |
Show a workspace, or its changes; default your workspace (HERDR_WORKSPACE_ID) |
phone targets |
List Settings page names and highlight targets, without contacting a phone |
phone open settings [PAGE] |
Open Settings or a named page, including nested delivery, desk-hold, and text-shortcuts pages |
phone highlight TARGET |
Open the target's page, scroll to it, and highlight the control |
phone guide TEXT [--highlight TARGET] |
Replace the persistent top banner, optionally highlighting a control; maximum three lines including the source |
phone guide --clear |
Clear this computer's banner and highlight; tapping the banner also dismisses both and opens the caller's chat, and its close button only dismisses |
phone show TEXT |
A note on the phone, from this computer's agent (at most 500 characters); tapping it opens the caller's chat |
phone luau DIR [--screen NAME] [--watch] |
Lay a Luau screen's .luau files (a folder named as the app's, such as ios/Luau/pull-requests) over the ones the app bundles; it reloads keeping its state, and the answer lists what loading found: problems (exits 1), warnings, the last logs. --watch pushes again on every save until stopped, prints each answer (one JSON object a line with --json), and pushes again every 3 seconds a save the phone did not take, as while it is locked. A debug build of the app only; a TestFlight or App Store build refuses |
phone luau DIR --reset |
Back to the bundled Luau of that screen |
phone snapshot [--out FILE] |
A JPEG of what the app shows, written to FILE or printed as a path; the person sees a note that it was taken. Refused while it shows another computer's chat or terminal, or a tab while another computer is paired. A debug build only |
Every phone command takes --device ID|NAME; without it, the phone with
the most recent connection traffic is selected. This is not proof of user
attention. Each native phone chat prompt carries the authenticated device
ID in its Sheprd note. Agents should pass that ID explicitly, including
when two phones are connected, and follow the latest message when the user
switches devices. The note is appended to the new turn; earlier messages
and the stable instructions are not rewritten, preserving their cacheable
prefix. Desktop or unidentified prompts do not inherit an earlier phone.
phone targets --json lists stable Settings page and highlight names. For
example, phone guide "This controls push delivery" --highlight push-relay
--device ID opens Notifications and highlights the push-relay switch. Guides
remain until cleared or dismissed, or the phone backgrounds, locks, or revokes
that computer's permission. Repeating guide updates the existing banner.
Run from a Herdr pane, show, guide, and highlight name the caller's pane
(HERDR_PANE_ID), so a tap on the note brings the person back to that agent's
chat, or its terminal; from outside a pane, or for a pane the phone does not
list, the tap only dismisses it. Opening, highlighting, and guiding do not
change settings. Keep notes short;
long text is clipped to the three-line banner. ui settings --json discovers
the desktop's available Settings pages and row IDs; ui guide and ui highlight
use those row IDs. Desktop guidance is scoped to the caller's main window and
shared with its Settings window.
Exits 1 when the phone refuses (locked, or agents turned off for this
computer) or a name is two phones', 2 for a blank or overlong note, 5 for
a pane or workspace not on this computer, and 7 when the phone does not
answer within a few seconds, as when it went to the background. --json
gives the daemon's answer: {"answer": "phones", "phones": [{"device",
"name", "active_ms"}]}, {"answer": "no_phone"}, or {"answer": "driven",
"phone", "outcome"}, where outcome is {"outcome": "done", "state":
{"screen", "locked"}} or {"outcome": "refused", "reason"} with a reason
of locked, not_found, off, or other.
sheprd phone open
sheprd phone open changes
sheprd phone show "Tests pass; the PR is ready for review"
sheprd phone luau ios/Luau/pull-requests --watch
sheprd phone snapshot --out /tmp/phone.jpg
sheprd phone state --json
Fleet
Your computers and phones as one fleet (docs/relay-plan.md, Fleet): a
host added on one is reached from every other, each with its own keys.
Every change is confirmed in Settings > Fleet; nothing is signed from the
command line.
| Command | What it does |
|---|---|
fleet [status] |
The fleet as this computer's daemon keeps it: its id, the members (computers and phones, who admitted each, which is this computer), the hosts (who added each, how many computers may reach each, and the ssh target this computer reaches it by when it may), members cut off by a removal whose history has not arrived, and members that signed in two places. Exits 4 when this computer is in no fleet, and 1, with the reason, when its daemon cannot be read |
fleet members, fleet hosts |
One of those lists. JSON is {"members": [...]} or {"hosts": [...]} |
fleet open |
Show Settings > Fleet, where a fleet is created or, from a computer in none, joined through a member this Sheprd reaches; computers this Sheprd reaches are invited, one by one or all at once; and hosts are shared with the computers ticked |
fleet remove MEMBER |
Ask in Settings > Fleet to remove a member, named by its ID from fleet status or its name (a name two members share is refused). The user picks why there: a compromised member takes the members and hosts it added with it |
fleet remove-host HOST |
Ask in Settings > Fleet to remove a host everywhere, by its ID or name; the user confirms there |
fleet scrub MACHINE |
Ask in Settings > Fleet to remove every way a fleet reaches a machine this Sheprd connects to, named by its device ID or name: sheprd-remote-control fleet scrub and sheprd-relay-agent fleet scrub over SSH, each when installed, remove its sheprd-fleet: lines and the agent's entries. The last resort for a host no member can reach or a fleet that is gone; nothing is signed, and the user confirms there |
fleet invite MACHINE, fleet invite --all |
Ask in Settings > Fleet to invite a computer this Sheprd reaches over SSH that is in no fleet, named by its device ID or name, or, with --all, offer to invite every such computer at once; the user confirms there. Refused when this computer is no member |
fleet join [MACHINE] |
Offer in Settings > Fleet to join the fleet a computer this Sheprd reaches over SSH is a member of, while this computer is in none; MACHINE, by device ID or name, must be one. The member admits it over SSH once the user clicks Join there. Refused when this computer is in a fleet already |
--json for status gives the daemon's view: fleet, me, members,
hosts (each with grants and an optional target), removed,
suspended, equivocating, pending, and heads. remove,
remove-host, scrub, invite, and join exit 5 when nothing of that
name is there, and invite --all and join when there is nothing to
invite or join.
sheprd fleet status --json
sheprd fleet remove "old laptop"
sheprd fleet invite --all
sheprd fleet join studio
Mods
| Command | What it does |
|---|---|
mod [list] |
The mods the window runs: where each draws, its palette commands, and its last error. Exits 4 when there are none |
mod reload NAME |
Read a mod's files again now, starting it over. Exits 5 when no mod of that name runs |
mod open NAME |
Show a mod's activity bar app in the window's body. Exits 5 when no running mod of that name has one, 8 while the activity bar is off |
mod panel [show|hide|toggle] |
The panel of mod sections on the window's right: whether it shows and which mods have a section, or show, hide, or toggle it (also the toggle_mod_panel command) |
mod logs NAME [--lines N] |
The last lines (default 50, at most 200) the mod wrote with herdr.log. Exits 4 when there are none |
mod check DIR |
Load a mod folder, run its init and view once against an empty state, and report what it draws. Runs here; Sheprd need not run. Exits 1 with the error and its line when the mod is invalid |
Mods are folders of sandboxed Luau in <config>/herdr/gpui-mods/ that add
status bar items, sidebar sections, and palette commands; saving a file
reloads its mod. See Mods. --json gives {"dir", "mods": [...]}
for list, each with name, places, commands, drawn, and error, and
{"name", "valid", "elements", "places", "hash", "log"} for check.
sheprd mod check ~/.config/herdr/gpui-mods/agents
sheprd mod logs agents --lines 20
MCP
| Command | What it does |
|---|---|
mcp [serve] |
Speak the Model Context Protocol on standard input and output, for an MCP client that starts it. Lists no tools while MCP server is off |
mcp config [--client claude-code|claude-desktop|codex|cursor] |
What to paste into a client, or every client's, so it starts this executable's server. Runs here; Sheprd need not run |
Sheprd's MCP server lets an MCP client, such as Claude Desktop, Claude Code,
Codex, or Cursor, use what the commands on this page reach. It is off by
default: turn on MCP server in Settings > General ([features] mcp =
true). Settings > General also copies the mcpServers setting Claude Desktop
and Cursor read. Builds without the mcp Cargo feature, which release builds
include, have neither the command nor the switch.
sheprd mcp config --client claude-code # prints: claude mcp add sheprd -- /path/to/sheprd mcp
sheprd mcp config --client codex --json
Each tool is the sheprd command it is named after, run with --json: the
same targeting (the caller's pane from HERDR_PANE_ID and the other Herdr
variables when the client runs in a Herdr pane, else the frontmost window),
the same bounds, and an optional window argument as --window. A tool's
answer carries the command's text and its JSON as structuredContent (a list
comes as {"result": [...]}). A failure is a tool error starting with the
exit code's name below (not_running, not_found, busy, timeout,
unsupported, refused), followed by the message. Memory and checkpoint tools
act on the repository of the directory the client starts sheprd mcp in.
| Reads | Changes or opens a dialog |
|---|---|
status, window_list, window_alerts, tab_list |
browser_open, browser_navigate, browser_reload |
browser_list, browser_text, browser_feedback |
code_open |
worktree_list, chat_status, notes_get, notes_list |
notes_set |
memory_index, memory_list, memory_search, memory_get |
memory_add, memory_pin, memory_forget |
checkpoint_list, checkpoint_diff |
checkpoint_create, checkpoint_restore (dialog) |
pr_status, pr_checks, pr_comments |
ports_open, ports_forward |
ports_list, usage, system, security_list |
worktree_create, fan_out, teleport (dialogs) |
wait |
Requests sheprd mcp sends are marked as relayed for the client, by the name
it gave (control protocol 16). The app refuses them while the switch is off,
and when one opens a dialog the window says which client asked. Restoring a
checkpoint, creating a worktree, fanning out, and teleporting happen only once
the user confirms in that dialog. Like the sheprd commands, the other tools
act at once: memory_add, memory_pin, memory_forget (which removes an
entry), notes_set, checkpoint_create, and opening pages, files, and
ports. Quitting
the app, running any palette command, stopping processes on ports, cloud
exec, settings changes, pairing, updates, and mods have no tool. The plan and
its later steps are in MCP plan.
Events
events prints what happened in the app: windows opening, closing, and
gaining focus; the app's tabs opening and closing; notes kept for a pane;
worktree notes changing; host status changes; and cloud batches moving on
(cloud_batch, with the batch and its phase: confirming, running,
done, or cancelled). Each event has a sequence
number; pass back the INSTANCE:SEQ cursor a call prints with --after to
get only newer events. A cursor from an earlier run of the app gets every
event the new run has kept, so a restart never hides events.
sheprd events --follow --kind tab_closed
sheprd wait tab-closed 12 --timeout 600
sheprd wait window # also waits for the app to start
Persistent modals & agent interactions
modal triggers persistent in-window modals, always-on-top global HUD alerts (such as YubiKey touch prompts), secret-safe vault injection (0600 .env file or private vault without entering chat history or LLM context), the floating Dynamic Progress Pill, shared human + agent runbooks, drop-zones, focused mini-diffs, spotlights, and semantic audio + Edge Light cues. Every subcommand accepts --json and --window.
sheprd modal [list]
sheprd modal show|urgent --title TITLE [--scope window|all] [--choices 'A|B'] [--quick-reply] [--cue CUE] [BODY...]
sheprd modal countdown --title TITLE [--seconds N] [--scope window|all] [BODY...]
sheprd modal otp [--title TITLE] [BODY...]
sheprd modal oauth --url URL [--code CODE] [--title TITLE] [BODY...]
sheprd modal secret --key NAME --dest env-file:PATH|keychain:NAME [--title TITLE] [--reason TEXT] [--save-keychain]
sheprd modal progress --title TITLE [--percent 0..100] [--step TEXT] [--done]
sheprd modal runbook --title TITLE 'agent: Step 1 | you: Tap YubiKey'
sheprd modal drop [--title TITLE] [--accept '.png,.ips'] [--scope all|window]
sheprd modal diff [--title TITLE] [--file PATH] DIFF...
sheprd modal spotlight --title TITLE --target TARGET [--step '1/2'] [BODY...]
sheprd modal cue yubikey|decision|secret|countdown|done
sheprd modal clear [--id ID | --all]
Updating Sheprd on other machines
When a machine you reach over SSH (or a cloud device) runs its own Sheprd app,
this app reads that app's update state every 30 minutes by running
sheprd update status --json there, through the same connection the
Automations section uses. It looks for sheprd or herdr-gpui on the
machine's PATH (Homebrew's, ~/.local/bin, packages), then in
/Applications/Sheprd.app and ~/Applications/Sheprd.app. A machine without
Sheprd is looked at again every six hours, and one whose app is not running
shows nothing.
When that app offers a newer release, the host's sidebar header shows an
Update pill. Clicking it, or sheprd host update HOST, opens a
confirmation naming the machine and both versions. HOST accepts any enabled
saved profile's ID or label from host list; profiles for different sessions on
the same SSH machine share its update state. Confirming runs
sheprd update install --confirmed --json there. The remote app's own
updater then downloads the release, checks it against the key that build
embeds, installs it, and restarts, as it does for a paired phone. Its
daemons, terminals, and agents keep running. The pill shows Updating…
until the machine reports the new version, and Update failed, with the
reason and a retry, if it reports an error or takes longer than 20
minutes. Temporary terminal disconnects preserve the confirmed update and its
deadline; removing or disabling the machine stops tracking it. If a later read
shows the new running version, an earlier failure clears automatically. A machine
whose Sheprd predates update install says so; update it there once.
The remote app refuses --confirmed from callers that report a Herdr pane
or terminal, so an agent there cannot pass for the user. That identity is
whatever the caller reports, so it is a guard, not a security boundary.
Anything that can run commands as that user on the machine could start the
update anyway, but only a release signed by the app's update key is ever
installed.
What stays in the app
Commands never bypass a confirmation. Restoring a checkpoint, teleporting a
worktree, fanning out a prompt, running a worktree script the app has not
seen, creating or destroying cloud machines, adding a cloud machine, pairing
a phone for remote control, and revoking one open the app's own dialog
(archiving a worktree and approving a phone have no command at all), already
pointed at your checkout, the machines, or the device named, and the user
confirms there.
cloud exec asks nothing because it confirms nothing: it is the agent's own
work, run on a machine the user saved. Launching the app or requesting a new
terminal can start the appropriate local daemon: installed Herdr 1, or a
user-installed/bundled herdr-core. Existing Herdr 1 sessions are not migrated,
and no command upgrades a personal daemon. update never installs the app
without the user: update install opens its dialog, and --confirmed comes
only from another Sheprd whose user approved it in that app's dialog;
cloud create installs Herdr only on the machines the user confirmed, as
creating them in Settings does.
Adding an SSH or local network device, or a nearby Sheprd over Bluetooth,
has no command: the Add Device dialog runs it, and the other computer opens
remote pair. On macOS and Linux, SSH setup stays in Add Device with native
progress, confirmation buttons, and masked password responses. Its private
terminal belongs to the app (see the Native Shell README's "Local Network
access"); it creates no workspace or terminal tab.
Herdr 1 scrollback search is not repeated here: herdr pane read covers it. Moving a
window and capturing a whole window have no command because the app cannot
do them.
Links
sheprd URL, with a herdr-gpui:// link as the only argument, hands the
link to the running app, or starts the app and follows it once it is
connected. On Windows the installer registers the scheme, so the shell runs
this for jump list entries, notification clicks, and links in other apps.
| Link | What the app does |
|---|---|
herdr-gpui://open?path=PATH |
Focus the workspace showing the Git checkout or worktree at PATH, or ask in the window before opening one there |
herdr-gpui://device?id=ID |
Show the device host list names ID |
herdr-gpui://notification?tag=TAG |
Open the pane of a notification this app posted |
herdr-gpui://relay?endpoint=ENDPOINT&token=TOKEN |
Open Settings > Remote control offering the private relay ENDPOINT and its listen token, as sheprd.org/relay links a relay it deployed; nothing is saved until the user clicks Add |
A link is untrusted input, checked by the command and again by the app: only
those shapes, each parameter once, bounded lengths, no control characters, and
an absolute local path without .. (on Windows a drive path, never a UNC or
\\?\ one), and for a relay an address [remote] relays takes and a token
a relay would. A link only ever shows something; it never runs a command. A
refused link exits 2, an unknown device or notification 5, as for commands.
The request is {"method": "link", "caller", "op": {"url"}}.
The protocol
One JSON request line, one JSON response line, then the socket closes. A
request is {"method", "caller", "op"}, where caller carries the pane,
workspace, daemon socket, and window, and op is tagged with "op". Browser
requests keep their original flat form (browser.open, browser.reload,
browser.feedback, notes.send). A request sheprd mcp relays also carries
"via": {"mcp": {"client": NAME}}, in its caller or, for
browser.feedback, beside pane_id. status reports the protocol version,
currently 16. Requests and responses are bounded to 256 KiB, a request that
waits says for how long (at most 600 seconds), and the app answers at most a
few requests at a time.
Windows
On Windows the same lines travel over a named pipe,
\\.\pipe\herdr-gpui-control-SID, where SID is your Windows user's
security identifier. When XDG_STATE_HOME is set, a hash of the state
directory is appended, so a test or side-by-side install gets a pipe of its
own; without it, every shell of yours reaches the same app whatever HOME it
has. Pipe names are shared by all users of the machine, so:
- The app creates the pipe owned by you, with a DACL that grants only your SID and inherits nothing, so no other user can connect or add an instance.
- It creates it as the first instance and rejects remote clients
(
PIPE_REJECT_REMOTE_CLIENTS), so it never joins a pipe someone else made and nothing off this machine can reach it. If another user made the name first, the app does not listen, and logs why. sheprd COMMANDopens the pipe at identification level, so the server can learn who called but cannot act as you, and checks that the pipe's owner is you before it sends anything. A pipe someone else owns is refused with exit 1.
A pipe has no receive or send timeout. Reads poll with PeekNamedPipe, as
the daemon client does; writes have no deadline, so the app's out buffer
holds a whole answer and the connection bound limits what a stalled caller
can hold.
Pull requests in a chat's rail
A sheprd-acp chat lists the pull requests its agent worked on in the
Pull requests section of its side rail, beside the plan and the changed
files, on every client attached to it. The chat program reads them from the
agent's finished commands: gh pr create, edit, merge, comment,
review, ready, close, and reopen, gh api writes to
repos/OWNER/REPO/pulls/N, and git push output that links to a pull
request. Commands that only read, such as gh pr view, list nothing. Only
https://github.com/OWNER/REPO/pull/N addresses are kept, at most 64 a chat.
For a pull request changed another way, the agent runs
sheprd chat pr add URL; the note sent ahead of the first prompt tells it
so when a sheprd command is beside the chat program.
Each row shows the number and title, colored as the pull request's badge is when Sheprd has looked it up for a workspace or lists it in the Pull requests section; a click opens it there, else its page on GitHub.
Recovering a kept Herdr 2 chat
At the shell prompt core restored after unexpected chat loss, run
sheprd-acp restore "$HERDR_ACP_ENDPOINT" (PowerShell:
sheprd-acp restore $env:HERDR_ACP_ENDPOINT). This is the companion program's
command, independent of the desktop control socket. It checks the original
terminal/socket/endpoint/folder, claims the endpoint for the process lifetime,
and resumes only the recorded agent session. Run it on the terminal's host;
it never falls back to a local or Herdr 1 session. See
Herdr 2 recovery for supported launches,
automatic new-terminal recovery and its remaining limits.
Chats on SSH hosts
Native chat views are on by default: turn off ACP chats in Settings >
General (acp_chats = false under [features]) to go without them. While it
is off, chat panes show their terminal and chat new exits 8.
Set the reading width with sheprd config set chat.max_width 1200, or use
0 for the full available width. Bounded widths range from 320 to 4000 logical
pixels; the default is 800. Settings > Chat offers the same width slider and
Full-width chat switch. Turn off desktop message effects with
sheprd config set chat.message_effects false or Settings > Chat > Message effects.
A chat on an SSH host shows in the native chat view like a local one. Sheprd
runs sheprd-acp connect ID on the host over the same SSH connection it uses
for Herdr, and the program there sees an ordinary client on its own socket.
Starting a chat there (chat new, or the workspace menu) runs the host's own
sheprd-acp, looked for in ~/.herdr/bin, ~/.cargo/bin, ~/.local/bin, and
then the remote PATH. Install it on the host with:
cargo install --locked --git https://github.com/sheprd-labs/sheprd sheprd-acp --root ~/.herdr
The workspace menu offers only the agents whose own ACP command is installed
on the host, as sheprd-acp agents lists them; an agent npx would have to
download first is left out.
Files dropped on a remote chat are copied to the host first, into private
temporary files under its ${TMPDIR:-/tmp}, and the copies are attached.
While they copy, each file's chip in the composer fills as its bytes go
out, the footer shows the bytes sent of the total, and a chip's × cancels
the whole drop, removing what already reached the host. Files dropped on a
Herdr 2 terminal on another host show the same chips along the pane's foot
until their paths are pasted; × or Escape cancels the copy there.
Herdr 2 chats also use saved cloud connectors and, on Windows, the selected WSL distribution. ACP installed for phone pairing by this release is reused before searching user bins, app bundles and PATH. An empty app-kept workspace opens a new core chat tab rather than falling back to Herdr 1.
chat status --json returns opaque pane keys. Local core keys remain
core:TERMINAL; remote core keys include their host scope. Pass the returned
key unchanged to chat new --pane, chat convert --pane, or
chat show|hide|toggle --pane. An explicit unknown core key is refused rather
than targeting a Herdr 1 pane. chat new --pane splits the named core pane,
even when another pane in that tab is active. See
remote core chat acceptance for platform prerequisites
and pending runtime checks.
Existing agent rendering
Set chat.render_existing = true, with features.acp_chats left on, to
render existing Linux Codex/Claude conversations automatically. The original
terminal input remains interactive in the same pane. chat status --json
reports input_mode (chat, terminal, or read_only) and session_id;
blocked status means the running agent needs input. chat show/hide/toggle
still switches the pane presentation, without starting or stopping its agent.