# Shepherd One dark, borderless window that shows every terminal and agent of every space as a single dense list, like a flock seen from a hill. A pixel-art shepherd and four colored counts (agents, working, paused, done) sit at the top, the list fills the middle, and a command line at the bottom sends text to the selected agent or starts new ones. You never see tabs or panes. A double click (or Enter on an empty line) opens an agent's live terminal over the list. The UI is English by default and German with `/language de`. ![Shepherd](preview.png) ## What you see The whole window is one fixed look, background `#0c0f1e`, in `Geist Mono` at 15px. Sizes come from a 23px mock-up scaled by 15/23, so a row is 20.5px tall and one character column (CH) is 9.1px wide. The theme picker has no effect. 1. **Summary**, 155px tall, padded 13px top and 10px left. - The pixel shepherd (`mods/shepherd/shepherd.svg`, 126×196 art drawn at 82×128px): crook `#c4651f`/`#9a4a14`, hat `#f5f1e6`, face `#f1c27d`, hair `#e7a93a`, coat `#7b7fe0`/`#5c60c4`. - To its right (27px gap, 43px down) are four count rows, each 20.5px tall. Each has a 36px colored box with the number right-aligned in `#111318`, then a label in `#b4b4bc`: `agents` on `#f4f4f4`, `working` on `#f3ef8e`, `paused` (the blocked count) on `#f0315c`, `done` on `#19d27c`. Only agents count, shells don't. 2. **List**, which fills the rest. For each space, top to bottom: - A header row: the space name in its color (cycling through `#ff5c8a #c4b5fd #cfc8ff #f0f0f4 #34d399 #7dd3fc #fbbf24 #f9a8d4`, semibold), then ` · ` in `#a3a3ad`. A space on another machine reads `machine/space`. - One row per terminal in that space's tabs: starred rows first, then by terminal number. The columns, 15px from the left edge, are: - the number (right-aligned in 2 CH), then a 3.5 CH gap - the status mark (1 CH) - the name (30 CH, truncated). An agent's name is drawn in its status color. A shell's name is `$ `. - `+N` for the agent's live sub-terminals (3 CH) - the machine, `local` for this one (10 CH) - time since the last status change (4 CH, right-aligned, `12s`/`5m`/`2h`, agents only) - age of the terminal (5 CH, right-aligned) - the program (9 CH) in its color: `claude #ff9f43`, `codex #7dd3fc`, `gemini #8ab4f8`, `opencode #c4b5fd`, `pi #f9a8d4`, `grok #e5e7eb`, `terminal #2ecc8f`, any other agent `#a6e3b8` - the title (the agent's status message, or the shell's foreground program), truncated - The selected row has a `#1b2140` background. A 5px `#232842` scroll thumb shows on the right once the rows overflow. 3. **Footer**, with a 1px `#232842` top border, padded 10px top, 15px sides and 14px bottom. - Suggestions appear while a `/` command is typed: up to 7 rows of 14px text, 26px tall, the highlighted one on `#1b2140`. A 12px `#6f7388` hint follows (`↑↓ select · Tab fill in · Enter set|fill in · i/n`). - Otherwise a one-line message shows, green `#19d27c` for ok and `#f0315c` for errors or confirmations. - The command line: a semibold `›` (`#ff5c8a` while typing, otherwise `#6f7388`) and the input. The placeholder reads `Click to type`, or while typing `Task for …` or `New in …`. - Two 13px key/value lines, keys in `#6f7388`: - `machine` · `where` (`#c4b5fd`, plus `·sel` when following the selection) · `who` (program color) · `model` · `effort` - `ctx` (used/size of the selected Claude session's context window, with a percentage) · `cache` (`Nm left`, `<1m left` or `expired`) · `5h` and `7d` quota percentages with reset times (`↻ 03:30`, or `↻ Sat 17:00` on another day). Percentages are green below 60, `#f4e97a` from 60 and red from 80. At the far right of this line sits a 16px gear (`mods/shepherd/settings.svg`, tinted `#6f7388`, `#ececf0` on `#1b2140` on hover) that runs `app.settings`. ## How it behaves - **Statuses.** Each one's mark and name use the same color: - working: a braille spinner `⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏` at 90ms per frame, `#f3ef8e` - blocked: `‖`, `#f0315c` (counted as "paused") - done: `✔`, `#19d27c` - idle: `●`, `#b4b4bc` - shell: `▸`, `#ff4d6d` - A starred agent shows `★` in its status color. - **Selecting.** ↑/↓ moves the selection over terminal rows only, skipping headers, and keeps a space's header visible at its first row. PageUp/PageDown move 15 rows. Clicking a row selects it. Clicking a header selects its first terminal. The mouse wheel scrolls whole rows. The selection survives restarts. - **Peek.** A double click or Enter on an empty line opens a centered dialog (80%×80%): the shipped `peek` bar (30px) over the live terminal, which gets focus, plus a 0px block with a guard copy of the mod. While it is open the keyboard stays in it: if the command line takes focus, it hands it straight back with `pane.focus`. Escape closes it, selects that agent's row and gives the keyboard back to the list, so ↑/↓ go on from there. ⌘↩ closes it too and puts the keyboard on the command line (`Typing for `), as it does without a peek. - **Typing.** Plain text plus Enter is sent to the selected terminal (`hc send -- `, so text starting with `-` stays text) and the line shows `→ `. For a shell row it asks first in `#f4e97a` ("Shell … runs this as a command: “…” – send?"), since a shell runs what it gets: Enter on the empty line sends, Escape or typing cancels. - **Commands.** Each one autocompletes as you type. ↑/↓ pick a suggestion, Tab fills it in, and Enter applies it. - `/who` sets the agent for new agents: installed agents, otherwise `claude`/`codex`; other names are refused. `argvFor` checks who, model and effort again, since `state.json` may hold anything. - `/where` sets the target space by name; `.` or `-` means "the selected row's space". - `/model` lists the `/who` agent's models: Claude's from `~/.shepherdr/cli-models.json` (shown with id and default effort), Codex/pi/grok's from their config and the models their latest sessions used (`MODELS_SEEN`, read once at start). Free text works too, if it passes `SAFE_VALUE` (no leading `-`, no quotes), as it goes into the start command. - `/effort` lists the levels the agent takes: Claude's per model from cli-models.json, else `codex: minimal low medium high xhigh`, `pi: off minimal low medium high xhigh`, `grok: low medium high`. Picking a model or agent that doesn't take the current level resets it to the model's default, else `medium`. - Any command with values opens their list when Enter comes without one. - `/new ` opens a tab in `/where` running the `/who` agent with that first message. Typing on a header row needs `/new`. - `/space [name]` creates a space whose first tab runs the agent, and makes it the new `/where`. The folder is autocompleted from the folders under the typed path. - `/space gh:owner/repo` lists your GitHub repos (most recently pushed first) and reuses an existing clone under `~/dev`. Otherwise it clones into `~/dev/`, or `~/dev/-` if that name is taken. Only `owner/repo` in `A-Z a-z 0-9 . _ -`, no part starting with `-` and no `.`/`..` part, is taken. - `/machine` picks the computer for `/space` (`local`, or a saved herdr machine). - `/star`, or a right click on a row, toggles the star. - `/language en|de` switches every UI text (messages, questions, placeholders, hints, command descriptions, weekdays) between English (default) and German. All texts live in one `TEXT` table in `main.js`; the choice is kept in `cfg.lang`. Command and option keywords stay English in both (`/close selected`, `gewählt` is accepted too). - `/close` asks before closing anything. It closes the selection (also on ⌘⌫ with an empty line), `done` closes all finished agents, `shells` all shells, `space [name]` a whole space. The question names how many agents are still working, and whether the last tab of a space goes too. Enter confirms, Escape cancels, and typing anything also cancels. - **Escape**, in order: cancels a pending confirmation, else closes the peek (selecting its row), else clears the line, else the `/find` filter, else the marks. - **Marks.** ⌘-click toggles a row's mark, Shift+↑/↓ marks the rows it passes. A marked row has a 4px `#ff5c8a` bar at its left edge. Text, `/close` (without a word), `/yes`, `/no` and `/answer` go to every marked row instead of the selected one; text for a mark set with a shell in it asks first, as for one shell. - **Blocked agents.** `/yes` presses Enter (`hc keys enter`), which takes the highlighted, usually approving, choice; `/no` presses Esc; `/answer ` runs `hc send --force -- `. Each acts only on targets whose status is `blocked`, and says so otherwise. `/yes` and `/answer` for more than one target first show every agent's question and ask (Enter/Esc). Right before the keys go out, `agents()` is read again and only still-blocked targets get them. - **Filter.** `/find ` keeps the rows whose name, title, program or space contains it (case-insensitive); `working`, `blocked`, `done`, `idle` pick by status and `agents`/`shells` by kind. Spaces without a match lose their header. A dim line above the command line reads `filter “…” · N shown · /find or Esc clears`. - **Preview.** Under the list, above the footer border, the selected terminal's last 8 output lines (`hc read --json`) in 12px `#6f7388`, 17px per line (unscaled, not `px()`), read with every selection refresh. Only the output: the input box (the last `❯`/`›` prompt line, from the rule above it) and everything under it, the spinner or "Worked for" line and what follows it, right-aligned notices, rule lines and trailing blank lines are dropped. `/preview off` hides it (kept in `cfg.preview`). - **Cost.** Claude Code's from `cost.total_cost_usd` in the statusline cache, pi's as the sum of every answer's `usage.cost.total`, grok's as the sum of `costUsdTicks` / 1e10; Codex has none. The footer shows the selected session's (`$4.12`), and a fifth `cost` box (`#c4b5fd`) under the counts adds up the rows shown when any is known. All boxes widen together by 14 (scaled) per character past two, so `$14.9` fits. - **Quota** follows the selected agent when its kind has quota (Claude Code, Codex), else the `/who` agent. - **Starting pi and grok.** Their `run` from programs.json plus `--model --thinking ` (pi) or `-m --effort ` (grok). - **Names.** Each Claude session's first real request (4+ words, not a command) is named by `claude -p --model haiku` into a 1–3 word kebab-case name, e.g. `stand-abfragen`, kept per session id. In front goes a three-letter code of the session's repo (`origin`'s name, else the git folder, else the working folder): initials of three or more words, the first letter and next consonant of the first word plus the second's initial for two, the first letter and next two consonants for one; up to three letters stay as they are (`invoicing` → `inv`, `landing-page` → `lnp`). The result, e.g. `wbs-fix-login-bug`, replaces the session or tab name in the list. A name from `/rename` (kept per session id, or per address for shells) comes before all of that. - **Codex.** A row is Codex when its status app starts with `codex` or its foreground argv has `codex`/`codex.js`. Its rollout is the `rollout-*.jsonl` the process or a child holds open (`lsof`), else the one under `${CODEX_HOME:-~/.codex}/sessions` with the same `cwd` in its `session_meta` that started closest to the process (`ps -o etime=`). It is looked up again when the pid changes. From it come the first request (`event_msg`/`user_message`, or in newer Codex a `response_item` message with role `user`) for the name, `ctx` (the last `token_count`'s `last_token_usage.total_tokens` of `model_context_window`), model and effort (`turn_context`) and quota (`rate_limits` `primary`/`secondary`, labelled by `window_minutes`, resets from `resets_at` or `resets_in_seconds`). Codex keeps no cache time, so `cache` shows `—`. The quota line also reads the newest rollout on every refresh. - **pi and grok** work the same way (one script, `AGENT_FIND`/`AGENT_READ`, takes the kind), detected by status app or argv `pi`/`grok`: - pi: `${PI_CODING_AGENT_DIR:-~/.pi/agent}/sessions/----/