docs: move public references to website docs

This commit is contained in:
Ogulcan Celik
2026-05-19 05:08:00 +03:00
parent c5e1a20ad3
commit ee6a8f9411
18 changed files with 57 additions and 3799 deletions
+10 -10
View File
@@ -61,26 +61,26 @@ Process:
- Preserve the existing changelog style and sections: `Added`, `Changed`, `Fixed`, `Removed`, and `Breaking Changes` when applicable.
7. Audit next-release public docs.
- Treat root `README.md`, `CONFIGURATION.md`, `INTEGRATIONS.md`, and `SOCKET_API.md` as the latest released public docs.
- Treat `docs/next/README.md`, `docs/next/CONFIGURATION.md`, `docs/next/INTEGRATIONS.md`, and `docs/next/SOCKET_API.md` as the next-release versions.
- Compare meaningful user-facing changes in the range against `docs/next/` first.
- Flag missing next-release docs for new or changed features, commands, config keys, protocol behavior, integrations, defaults, and compatibility notes.
- Compare `docs/next/` against the root docs. Flag each difference as intended to ship in this release, stale, or needing user decision.
- Also audit `website/` and example config snippets for release readiness, but keep them aligned with the latest published release unless the user explicitly asks for prerelease docs.
- Treat root `README.md` and `website/src/content/docs/` as the latest released public docs.
- Treat `docs/next/README.md` as the next-release root README.
- Compare meaningful user-facing changes in the range against root README and website docs.
- Flag missing release docs for new or changed features, commands, config keys, protocol behavior, integrations, defaults, and compatibility notes.
- Compare `docs/next/README.md` against root `README.md`. Flag each difference as intended to ship in this release, stale, or needing user decision.
- Also audit website docs and example config snippets for release readiness.
8. Verify finalization state.
- Before `just release`, approved `docs/next/*` files must be copied to their root counterparts.
- Before `just release`, approved `docs/next/README.md` must be copied to root `README.md`, approved website doc changes must be present under `website/src/content/docs/`, and the deleted root doc files must stay deleted.
- Run or recommend:
```bash
just release-docs-check
```
- This check must include `README.md`, `CONFIGURATION.md`, `INTEGRATIONS.md`, `SOCKET_API.md`, and `CHANGELOG.md`.
- This check must include root `README.md`, root `CHANGELOG.md`, the removed root doc files, and the required website docs.
- Do not run `just release` unless the working tree is clean and the docs check passes.
9. Apply changes only when asked.
- Do not edit files during the audit unless the user explicitly asks you to apply fixes.
- When asked to apply audit fixes, update `docs/next/CHANGELOG.md` and any relevant `docs/next/` files first.
- When asked to finalize release docs, copy approved `docs/next/` files into the matching root files and run `just release-docs-check`.
- When asked to apply audit fixes, update `docs/next/CHANGELOG.md`, `docs/next/README.md`, and any required website docs.
- When asked to finalize release docs, copy approved next-release README and changelog into root, update the matching website docs, then run `just release-docs-check`.
Output format:
+5 -6
View File
@@ -51,11 +51,10 @@ Unit tests live next to the code (`#[cfg(test)] mod tests`). If you add behavior
## Conventions
- Conventional commits, lowercase, no emojis.
- Do not edit root `CHANGELOG.md` during normal feature or fix work. Maintainers prepare `docs/next/CHANGELOG.md` during release review unless explicitly asked to update it earlier.
- Treat the root public docs as the latest released docs. Do not document unreleased behavior in root `README.md`, `CONFIGURATION.md`, `INTEGRATIONS.md`, `SOCKET_API.md`, or `CHANGELOG.md` during normal feature or fix work.
- Treat `docs/next/README.md`, `docs/next/CONFIGURATION.md`, `docs/next/INTEGRATIONS.md`, `docs/next/SOCKET_API.md`, and `docs/next/CHANGELOG.md` as the next-release versions of those public docs. When unreleased work needs public documentation, update the matching file under `docs/next/` instead of the root file.
- Before release, copy the approved `docs/next/` versions into the root public docs. `just release` blocks until each root public doc and `CHANGELOG.md` are identical to their `docs/next/` counterparts.
- Keep website copy and config examples aligned with the latest published release unless the user explicitly asks for prerelease docs.
- Do not edit root `README.md` or `CHANGELOG.md` during normal feature or fix work unless explicitly asked. Maintainers prepare `docs/next/README.md` and `docs/next/CHANGELOG.md` during release review.
- Treat website docs under `website/src/content/docs/` as the latest released public docs. Do not document unreleased behavior there during normal feature or fix work.
- Treat `docs/next/README.md` and `docs/next/CHANGELOG.md` as next-release staging for the root README and changelog.
- Before release, copy approved next-release docs into their released locations: `docs/next/README.md` to `README.md`, `docs/next/CHANGELOG.md` to `CHANGELOG.md`, and approved website doc changes to `website/src/content/docs/`. `just release-docs-check` verifies README/changelog sync, the website docs are present, and the removed root docs stay removed.
- Put local PRDs, planning notes, and exploratory specs under `.prd/`; that directory is ignored and locally controlled.
- When a normal feature or fix commit relates to a GitHub issue, add a commit body line `refs #<issue-number>` after the subject. Use this shape:
```text
@@ -70,7 +69,7 @@ Unit tests live next to the code (`#[cfg(test)] mod tests`). If you add behavior
## Releases
Before cutting a release, run `/pre-release-audit` to compare commits since the last tag against `docs/next/CHANGELOG.md` and `docs/next/`, then copy the approved next-release docs and changelog into the root public docs. The release script promotes the root changelog's `## Unreleased` section into the versioned entry and copies the prepared changelog back to `docs/next/CHANGELOG.md` so the next cycle starts clean.
Before cutting a release, run `/pre-release-audit` to compare commits since the last tag against `docs/next/CHANGELOG.md` and `docs/next/`, then copy approved next-release docs into `README.md`, `CHANGELOG.md`, and the matching website docs. The release script promotes the root changelog's `## Unreleased` section into the versioned entry and copies the prepared changelog back to `docs/next/CHANGELOG.md` so the next cycle starts clean.
Default release flow:
+3 -3
View File
@@ -143,7 +143,7 @@
## [0.5.1] - 2026-04-25
### Added
- Toast notifications can now be delivered through the outer terminal as desktop notifications. Configure this with `ui.toast.delivery = "terminal"`; see `CONFIGURATION.md` for details.
- Toast notifications can now be delivered through the outer terminal as desktop notifications. Configure this with `ui.toast.delivery = "terminal"`; see the [configuration docs](https://herdr.dev/docs/configuration/) for details.
- Herdr now writes separate capped support logs for app, client, and server modes, making persistent-session issue reports easier to diagnose without unbounded log growth.
- The bundled opencode plugin now reports question prompts as blocked while waiting for user input, then returns to working or idle when answered or dismissed. Question prompts are also detected by the default terminal-screen heuristics. (#51, thanks @mspiegel31)
@@ -420,7 +420,7 @@
### Added
- Added first-run onboarding flow that lets you choose notification preferences (sound and toast) on startup.
- Added optional visual toast notifications in the top-right corner for background workspace events (completion and attention-needed alerts).
- Added configurable keybindings for all navigate mode actions: new workspace, rename workspace, close workspace, resize mode, and toggle sidebar. See `CONFIGURATION.md` for the full key reference.
- Added configurable keybindings for all navigate mode actions: new workspace, rename workspace, close workspace, resize mode, and toggle sidebar. See the [configuration docs](https://herdr.dev/docs/configuration/) for the full key reference.
- Added configuration validation with startup diagnostics. Invalid key combinations or duplicate bindings now fall back to safe defaults with a visible warning.
### Changed
@@ -431,7 +431,7 @@
- Keybinding parser now accepts special keys (`enter`, `esc`, `tab`, `backspace`, `space`) and function keys (`f1``f12`).
### Documentation
- Split configuration reference into a dedicated `CONFIGURATION.md` file with full keybinding documentation and config diagnostics explanation.
- Split configuration reference into dedicated configuration docs with full keybinding documentation and config diagnostics explanation.
## [0.1.1] - 2026-03-28
-486
View File
@@ -1,486 +0,0 @@
# configuration
herdr reads config from:
```text
~/.config/herdr/config.toml
```
Named sessions share this config file. Sessions are runtime/socket namespaces, not workspace replacements; per-session sockets and persistent runtime state are separate:
```text
~/.config/herdr/session.json
~/.config/herdr/sessions/<name>/session.json
```
Use `herdr session list`, `herdr session attach <name>`, `herdr session stop <name>`, and `herdr session delete <name>` to inspect and manage named session namespaces. Add `--json` to session commands when scripts need machine-readable output.
In default persistence mode, quitting the UI detaches the current client. Use `herdr server stop` to stop the shared background server.
print the full default config with:
```bash
herdr --default-config
```
if a config value is invalid, or two navigate actions use the same keybinding, herdr falls back to a safe default and shows a startup warning in the UI.
## live reload
After editing `config.toml`, reload the running app without restarting the persistent server:
```bash
herdr server reload-config
```
You can also use the global menu inside herdr and choose `reload config`.
Reload is server-owned. In persistent mode the CLI sends a request to the running server, and the server reads, parses, validates, and applies `config.toml`.
Reloadable now:
- keybindings and prefix
- theme, custom theme colors, and legacy `ui.accent`
- `ui.confirm_close`
- `ui.agent_panel_scope`
- `ui.toast.delivery`
- server-side `ui.sound` policy; attached thin clients refresh local sound config after a successful sound-policy change
- `experimental.kitty_graphics`
- `advanced.scrollback_limit_bytes` for panes created after reload
- `ui.sidebar_width` as the default width; current width updates only while it is still config-owned
Startup-only or special-case:
- `onboarding` does not reopen onboarding during reload
- `experimental.allow_nested` is checked before launch and needs a restart
- existing pane scrollback buffers are not resized during reload
- terminal notifications and sounds are client-local side effects and are sent to the foreground attached client
If the TOML cannot be read or parsed, reload applies nothing and keeps the current running state. If keybindings are invalid, herdr keeps the current keybindings while applying other valid reloadable settings where possible.
## onboarding
```toml
onboarding = true
```
| option | default | description |
|--------|---------|-------------|
| `onboarding` | unset | show first-run notification setup; set `false` after choosing |
notes:
- missing `onboarding` currently behaves like `true`
- set `onboarding = true` to force the setup screen again for testing
- continuing from onboarding writes `onboarding = false` and opens the normal settings UI
## keybindings
keybindings live under `[keys]`.
supported syntax:
- plain keys: `n`, `x`, `-`, `` ` ``
- modifiers: `ctrl+b`, `shift+n`, `alt+x`, `cmd+x`, `super+x`
- special keys: `enter`, `esc`, `tab`, `backspace`, `left`, `right`, `up`, `down`
- function keys: `f1`, `f12`
- uppercase letters also imply shift: `D` works like `shift+d`
notes:
- most reliable bindings are plain keys, `ctrl+letter`, `esc`/`tab`/`enter`, and function keys
- `alt+...`, `cmd`/`super`, and punctuation-with-modifiers may vary depending on terminal/tmux setup
- bindings marked `unset` in the key reference are supported actions with no default key assigned
- for navigate-mode actions, duplicate keybindings are treated as config errors; later conflicting bindings fall back to defaults
example:
```toml
[keys]
prefix = "ctrl+b"
new_workspace = "n"
rename_workspace = "shift+n"
close_workspace = "X"
reload_config = "" # optional, unset by default
open_notification_target = "" # optional, unset by default
new_tab = "c"
split_vertical = "d"
split_horizontal = "D"
close_pane = "x"
rename_pane = "" # optional, unset by default
edit_scrollback = "" # optional, opens focused pane scrollback in $EDITOR
zoom = "f" # legacy alias: fullscreen
resize_mode = "r"
toggle_sidebar = "b"
previous_workspace = "ctrl+alt+["
next_workspace = "ctrl+alt+]"
previous_agent = "ctrl+["
next_agent = "ctrl+]"
previous_tab = "alt+["
next_tab = "alt+]"
focus_pane_left = "alt+h"
focus_pane_down = "alt+j"
focus_pane_up = "alt+k"
focus_pane_right = "alt+l"
[keys.indexed]
tabs = "" # optional; e.g. "ctrl" makes ctrl+1..9 switch tabs
workspaces = "" # optional; e.g. "ctrl+shift" makes ctrl+shift+1..9 switch workspaces
agents = "" # optional; follows visible agent panel order
```
### key reference
| key | default | action |
|-----|---------|--------|
| `prefix` | `ctrl+b` | enter or leave navigate mode |
| `new_workspace` | `n` | create a new workspace |
| `rename_workspace` | `shift+n` | rename selected workspace |
| `close_workspace` | `shift+d` | close selected workspace |
| `detach` | unset | optional explicit detach shortcut in the persistent session |
| `reload_config` | unset | reload `config.toml` in the running app/server |
| `open_notification_target` | unset | jump to the currently visible notification target |
| `previous_workspace` | unset | switch to the previous workspace directly from terminal mode |
| `next_workspace` | unset | switch to the next workspace directly from terminal mode |
| `previous_agent` | unset | focus the previous agent shown in the sidebar agent list |
| `next_agent` | unset | focus the next agent shown in the sidebar agent list |
| `new_tab` | `c` | create a new tab |
| `rename_tab` | unset | rename the active tab |
| `previous_tab` | unset | switch to the previous tab directly from terminal mode |
| `next_tab` | unset | switch to the next tab directly from terminal mode |
| `close_tab` | unset | close the active tab |
| `focus_pane_left` | unset | focus the pane to the left directly from terminal mode |
| `focus_pane_down` | unset | focus the pane below directly from terminal mode |
| `focus_pane_up` | unset | focus the pane above directly from terminal mode |
| `focus_pane_right` | unset | focus the pane to the right directly from terminal mode |
| `split_vertical` | `v` | split pane vertically (side by side) |
| `split_horizontal` | `-` | split pane horizontally (stacked) |
| `close_pane` | `x` | close focused pane |
| `rename_pane` | unset | rename the focused pane |
| `edit_scrollback` | unset | open the focused pane's retained scrollback in `$EDITOR` inside a temporary zoomed pane |
| `zoom` | `f` | zoom focused pane; legacy alias: `fullscreen` |
| `resize_mode` | `r` | enter or leave resize mode |
| `toggle_sidebar` | `b` | collapse or expand the sidebar |
`edit_scrollback` writes the focused pane's retained plain-text scrollback to a temporary file, opens `${EDITOR:-vi}` on that file in a temporary zoomed pane, then removes the file when the editor exits.
### indexed keybindings
Use `[keys.indexed]` to bind number keys `1` through `9` as positional shortcuts. Each value is a modifier combo only. Empty values disable that shortcut family.
```toml
[keys.indexed]
tabs = ""
workspaces = ""
agents = ""
```
| key | default | action |
|-----|---------|--------|
| `tabs` | unset | switch to tab 1-9 in the active workspace, left to right |
| `workspaces` | unset | switch to workspace 1-9 in sidebar order, top to bottom |
| `agents` | unset | focus agent row 1-9 in the visible agent panel order |
### custom command keybindings
Use `[[keys.command]]` to bind a prefix-mode key to a command. Press the prefix key, then the configured key.
```toml
[[keys.command]]
key = "g"
type = "pane"
command = "lazygit"
```
`type` is optional and defaults to `shell`.
| type | behavior |
|------|----------|
| `shell` | run the command detached in the background |
| `pane` | open a temporary zoomed pane, run the command there, then close the pane when the command exits |
Commands run through `/bin/sh -lc`. Herdr sets the command working directory to the active pane cwd when available and provides context through environment variables:
| variable | value |
|----------|-------|
| `HERDR_SOCKET_PATH` | active herdr socket path |
| `HERDR_BIN_PATH` | current herdr binary path |
| `HERDR_ACTIVE_WORKSPACE_ID` | active workspace id |
| `HERDR_ACTIVE_TAB_ID` | active tab id |
| `HERDR_ACTIVE_PANE_ID` | focused pane id |
| `HERDR_ACTIVE_PANE_CWD` | focused pane cwd |
Example detached helper:
```toml
[[keys.command]]
key = "shift+g"
type = "shell"
command = "notify-send herdr 'custom command ran'"
```
## theme
herdr ships with 17 built-in color themes. set one in config:
```toml
[theme]
name = "tokyo-night"
```
### built-in themes
| name | description |
|------|-------------|
| `catppuccin` | soft pastel mocha palette (default) |
| `catppuccin-latte` | light catppuccin palette |
| `tokyo-night` | blue-purple aesthetic |
| `tokyo-night-day` | light tokyo night palette |
| `dracula` | purple/pink/green classic |
| `nord` | frosty scandinavian blues |
| `gruvbox` | warm retro browns/oranges |
| `gruvbox-light` | light gruvbox palette |
| `one-dark` | atom's beloved dark palette |
| `one-light` | atom's light palette |
| `solarized` | ethan schoonover's classic dark palette |
| `solarized-light` | ethan schoonover's classic light palette |
| `kanagawa` | hokusai-inspired |
| `kanagawa-lotus` | light kanagawa palette |
| `rose-pine` | muted, elegant |
| `rose-pine-dawn` | light rosé pine palette |
| `vesper` | high-contrast monochrome with peach and mint accents |
theme names are flexible: `tokyo-night`, `tokyonight`, and `tokyo_night` all work.
### custom overrides
override individual color tokens on top of any base theme:
```toml
[theme]
name = "dracula"
[theme.custom]
panel_bg = "reset"
accent = "#f5c2e7"
red = "rgb(255, 85, 85)"
green = "#a6e3a1"
```
all tokens are optional — only set what you want to change.
### available tokens
| token | used for |
|-------|----------|
| `accent` | highlights, active borders, navigation UI |
| `panel_bg` | floating panel, tab bar, and overlay background |
| `surface0` | selected item background |
| `surface1` | hover/active backgrounds |
| `surface_dim` | active workspace background, separators |
| `overlay0` | muted text, secondary info |
| `overlay1` | slightly brighter secondary text |
| `text` | primary text |
| `subtext0` | workspace names, dimmed labels |
| `mauve` | git branch names, special labels |
| `green` | idle/done states |
| `yellow` | busy/running states |
| `red` | waiting/needs attention states |
| `blue` | unseen notifications |
| `teal` | done notification accents |
| `peach` | interrupted/warning states |
tokens accept the same color formats as `accent`: hex (`#rrggbb`), named colors, or `rgb(r,g,b)`.
for `panel_bg`, you can also use `reset`, `default`, `none`, or `transparent` to stop herdr from painting an opaque panel background and instead use the host terminal's default background.
## ui
```toml
[ui]
sidebar_width = 26
mouse_capture = true
confirm_close = true
prompt_new_tab_name = true
show_agent_labels_on_pane_borders = false
agent_panel_scope = "all"
accent = "cyan"
```
### options
| option | default | description |
|--------|---------|-------------|
| `sidebar_width` | `26` | base sidebar width before auto-scaling |
| `mouse_capture` | `true` | capture mouse input for Herdr's mouse UI; set false to let the terminal handle normal clicks while still forwarding mouse to pane apps that request it |
| `confirm_close` | `true` | ask before closing a workspace |
| `prompt_new_tab_name` | `true` | ask for a tab name before creating a new tab; set false to create tabs immediately with generated names |
| `show_agent_labels_on_pane_borders` | `false` | show detected/reported agent labels in split pane borders when no manual pane name is set |
| `agent_panel_scope` | `all` | sidebar agent list scope: `current` or `all` |
| `accent` | `cyan` | highlight and border color |
Changing the agent panel scope from the sidebar writes `agent_panel_scope` to config so it survives session resets and upgrades.
`accent` accepts:
- named colors like `cyan`, `blue`, `magenta`
- hex like `#89b4fa`
- rgb like `rgb(137,180,250)`
## toast notifications
```toml
[ui.toast]
delivery = "off"
```
### options
| option | default | description |
|--------|---------|-------------|
| `ui.toast.delivery` | `off` | where background popup notifications should appear |
available values:
- `off` — disable popup notifications
- `herdr` — show top-right in-app toasts
- `terminal` — ask the outer terminal to show a desktop notification. some terminals suppress foreground notifications, including ghostty on macos.
- `system` — ask the os notification service directly. on macos, herdr uses `terminal-notifier` when available and falls back to built-in `osascript`. on linux, `system` requires `notify-send`.
### macos system notifications
for best macos support, install `terminal-notifier`:
```sh
brew install terminal-notifier
```
when `terminal-notifier` is installed, herdr tries to focus the hosting terminal when a notification is clicked. click-to-return is supported for detected ghostty, iterm2, wezterm, kitty, alacritty, and terminal.app sessions.
without `terminal-notifier`, herdr falls back to built-in `osascript`. this still shows a macos notification, but clicking the notification may focus the apple script runner instead of returning to your terminal.
compatibility note:
- older configs may still use `ui.toast.enabled = true|false`
- herdr still reads that legacy key for compatibility
- if you save toast settings from inside herdr, it rewrites the setting to `ui.toast.delivery`
current behavior:
- informational only
- one notification event at a time
- shown for background agent events like `needs attention` and `finished`
- suppression is tab-aware: the active tab stays quiet, but background tabs in the same workspace can still notify
- `terminal` delivery is best-effort and depends on terminal support
- `system` delivery is best-effort and depends on the os helper being available
- macos `system` delivery prefers `terminal-notifier` when present and falls back to `osascript`
- currently targets terminals such as ghostty, kitty, iterm2, and wezterm
- inside tmux, herdr wraps notification escapes with tmux passthrough
## sound
```toml
[ui.sound]
enabled = true
[ui.sound.agents]
claude = "default"
droid = "off"
```
### options
| option | default | description |
|--------|---------|-------------|
| `ui.sound.enabled` | `true` | enable background agent sounds |
per-agent values:
- `default`
- `on`
- `off`
available agent keys:
- `pi`
- `claude`
- `codex`
- `gemini`
- `cursor`
- `cline`
- `open_code`
- `github_copilot`
- `kimi`
- `droid`
- `amp`
- `grok`
## experimental
```toml
[experimental]
allow_nested = false
kitty_graphics = false
```
### options
| option | default | description |
|--------|---------|-------------|
| `experimental.allow_nested` | `false` | allow launching herdr from inside a herdr-managed pane |
| `experimental.kitty_graphics` | `false` | enable experimental local Kitty graphics rendering for attached clients |
### nested launches
By default, herdr blocks nested launches when `HERDR_ENV=1` is already present.
Set `allow_nested = true` only for debugging or intentionally nested setups.
### Kitty graphics
`kitty_graphics` enables experimental local Kitty graphics rendering for attached clients.
It requires a Kitty graphics-compatible outer terminal.
Known limitation: resizing the terminal window or changing the terminal font while images are visible can leave existing images misplaced or stale. Restart the pane app or clear and redraw the image output after changing size or font. Please report any findings so this experimental path can improve.
## advanced
```toml
[advanced]
scrollback_limit_bytes = 10000000
```
### options
| option | default | description |
|--------|---------|-------------|
| `advanced.scrollback_limit_bytes` | `10000000` | maximum scrollback buffer size in bytes retained per pane terminal |
### scrollback
`scrollback_limit_bytes` limits retained terminal scrollback per pane.
The default matches Ghostty's `scrollback-limit` value.
Set `scrollback_limit_bytes = 0` to disable pane scrollback entirely.
The legacy `scrollback_lines` key is still accepted inside `[advanced]`, but it uses the same byte-based value.
## environment variables
| variable | description |
|----------|-------------|
| `HERDR_LOG` | log level filter (default: `herdr=info`) |
## logs
herdr writes local file logs under:
```text
~/.config/herdr/
```
common files:
```text
~/.config/herdr/herdr.log
~/.config/herdr/herdr-client.log
~/.config/herdr/herdr-server.log
```
notes:
- `herdr.log` is used by monolithic `--no-session` mode and some top-level startup paths
- persistent session mode mainly uses `herdr-client.log` and `herdr-server.log`
- logs rotate automatically by size and keep a few older files as `.1`, `.2`, and so on
- default logs are metadata-focused and are intended to be shareable for issue diagnosis
- `HERDR_LOG` can increase verbosity when you need a local repro or deeper debugging
+2 -9
View File
@@ -50,16 +50,9 @@ If you plan to implement the change yourself, say that directly in the issue and
## Documentation for unreleased changes
The root docs describe the latest released version of herdr. Do not update root `README.md`, `CONFIGURATION.md`, `INTEGRATIONS.md`, `SOCKET_API.md`, or `CHANGELOG.md` for normal PRs.
The root `README.md`, root `CHANGELOG.md`, and website docs describe the latest released version of herdr. Do not update root `README.md`, root `CHANGELOG.md`, or `website/src/content/docs/` for normal PRs.
If your PR changes user-facing behavior, update the matching next-release docs under `docs/next/` instead.
Examples:
- config changes: update `docs/next/CONFIGURATION.md`
- integration changes: update `docs/next/INTEGRATIONS.md`
- socket/API changes: update `docs/next/SOCKET_API.md`
- workflow or usage changes: update `docs/next/README.md`
If your PR changes user-facing behavior, mention the needed public-doc update in the PR. Update `docs/next/README.md` only when the root README needs to change for the next release.
You do not need to edit the changelog for normal PRs. Maintainers prepare `docs/next/CHANGELOG.md` during release review.
-240
View File
@@ -1,240 +0,0 @@
# integrations
herdr works without any hook or plugin setup.
out of the box, it detects supported agents automatically by combining foreground process detection with screen heuristics. that is enough to give you workspace awareness with zero configuration.
when an agent exposes hooks or plugins, the more robust path is to forward semantic state to herdr over the local socket api. the built-in integrations in this document do exactly that.
if you want to inspect the exact files herdr installs, they are versioned in this repo:
- [pi extension](./src/integration/assets/pi/herdr-agent-state.ts)
- [claude code hook](./src/integration/assets/claude/herdr-agent-state.sh)
- [codex hook](./src/integration/assets/codex/herdr-agent-state.sh)
- [opencode plugin](./src/integration/assets/opencode/herdr-agent-state.js)
## how herdr uses integrations
herdr uses a hybrid model:
- **process detection** owns pane identity, liveness, and "the process is gone"
- **agent integrations** report semantic state like `working`, `blocked`, and `idle` over the local socket api when the tool exposes those events
- **screen heuristics** remain the fallback for gaps, unsupported tools, or incomplete hook surfaces
that means hooks/plugins do **not** become the source of truth for pane ownership. they enrich state reporting; they do not replace process detection.
## install commands
```bash
herdr integration install pi
herdr integration install claude
herdr integration install codex
herdr integration install opencode
```
## uninstall commands
```bash
herdr integration uninstall pi
herdr integration uninstall claude
herdr integration uninstall codex
herdr integration uninstall opencode
```
## pi
install:
```bash
herdr integration install pi
```
this writes the bundled pi extension to:
```text
~/.pi/agent/extensions/herdr-agent-state.ts
```
if `PI_CODING_AGENT_DIR` is set, herdr uses that agent directory instead and writes to:
```text
$PI_CODING_AGENT_DIR/extensions/herdr-agent-state.ts
```
`~` is expanded in `PI_CODING_AGENT_DIR`.
pi is the cleanest integration. it already has an authoritative hook model, so herdr can get direct state reports over the socket api without guessing as much from the terminal.
bundled source: [`src/integration/assets/pi/herdr-agent-state.ts`](./src/integration/assets/pi/herdr-agent-state.ts)
uninstall:
```bash
herdr integration uninstall pi
```
this removes the same extension path herdr would install, using `PI_CODING_AGENT_DIR` when it is set.
## claude code
install:
```bash
herdr integration install claude
```
this:
- writes the hook script to `~/.claude/hooks/herdr-agent-state.sh`
- updates `~/.claude/settings.json`
if `CLAUDE_CONFIG_DIR` is set, herdr uses that directory instead, for example `$CLAUDE_CONFIG_DIR/hooks/herdr-agent-state.sh` and `$CLAUDE_CONFIG_DIR/settings.json`. `~` is expanded in `CLAUDE_CONFIG_DIR`.
bundled source: [`src/integration/assets/claude/herdr-agent-state.sh`](./src/integration/assets/claude/herdr-agent-state.sh)
current hook mapping:
- `UserPromptSubmit``working`
- `PreToolUse``working`
- `PermissionRequest``blocked`
- `PostToolUse``working`
- `PostToolUseFailure``working`
- `SubagentStop``working`
- `Stop``idle`
- `SessionEnd``release`
notes:
- claude code hooks also run inside subagents. herdr treats subagent `working` and `blocked` reports as real pane state.
- subagent stop/release events are converted to `working` by the bundled hook script so a completed subagent does not make the parent claude pane look idle.
- `PostToolUse` and `PostToolUseFailure` move the pane back to `working` after a permissioned tool call resolves.
- some non-claude tools, including grok cli, may load claude settings or plugins. herdr ignores conflicting known-agent hook labels once native foreground-process detection identifies a different known agent.
uninstall:
```bash
herdr integration uninstall claude
```
this removes the same hook path and settings entries herdr would install, using `CLAUDE_CONFIG_DIR` when it is set.
## codex
install:
```bash
herdr integration install codex
```
this:
- writes the hook script to `~/.codex/herdr-agent-state.sh`
- updates `~/.codex/hooks.json`
- ensures `hooks = true` under `[features]` in `~/.codex/config.toml`
- migrates the deprecated top-level `[features] codex_hooks = true` setting to `hooks = true`
if `CODEX_HOME` is set, herdr uses that directory instead, for example `$CODEX_HOME/herdr-agent-state.sh`, `$CODEX_HOME/hooks.json`, and `$CODEX_HOME/config.toml`. `~` is expanded in `CODEX_HOME`.
bundled source: [`src/integration/assets/codex/herdr-agent-state.sh`](./src/integration/assets/codex/herdr-agent-state.sh)
current hook mapping:
- `SessionStart``idle`
- `UserPromptSubmit``working`
- `PreToolUse``working`
- `Stop``idle`
notes:
- codex does **not** currently expose a permission-specific hook like claude or opencode, so `blocked` still depends on herdr's normal heuristics.
- codex currently renders hook lifecycle messages in its own tui, for example `Running SessionStart hook` and `SessionStart hook (completed)`.
- that noise is an upstream codex limitation, not a herdr-specific issue.
- codex has a `suppressOutput` field in its hook output schema, but it is currently not effective for suppressing those tui lifecycle lines.
uninstall:
```bash
herdr integration uninstall codex
```
this:
- removes the same hook path herdr would install, using `CODEX_HOME` when it is set
- removes herdr-owned hook entries from the matching `hooks.json`
- intentionally leaves the matching `config.toml` alone
that last point is deliberate: herdr does **not** try to guess whether `hooks = true` is still needed for some other codex hook setup.
## opencode
install:
```bash
herdr integration install opencode
```
this writes the bundled plugin to:
```text
~/.config/opencode/plugins/herdr-agent-state.js
```
bundled source: [`src/integration/assets/opencode/herdr-agent-state.js`](./src/integration/assets/opencode/herdr-agent-state.js)
current plugin mapping:
- `permission.asked``blocked`
- `permission.replied: once|always``working`
- `permission.replied: reject``idle`
- `question.asked``blocked`
- `question.replied``working`
- `question.rejected``idle`
- `session.status: busy|retry``working`
- `session.status: idle``idle`
- `session.idle``idle`
notes:
- opencode has the richest event surface of the currently supported integrations.
- herdr intentionally does **not** guess that `session.deleted` means process exit. process detection still owns liveness and pane identity.
uninstall:
```bash
herdr integration uninstall opencode
```
this removes:
```text
~/.config/opencode/plugins/herdr-agent-state.js
```
## grok cli
herdr does not currently install a grok hook or plugin.
grok is heuristic-only in herdr. herdr detects `grok` and `grok-build` from the foreground process and uses screen heuristics for `working`, `blocked`, and `idle` states.
grok cli may load claude settings or plugins as a compatibility feature, including hooks from `~/.claude/settings.json`. if that causes the claude herdr hook to run in a grok pane, herdr ignores the conflicting `claude` hook label once native foreground-process detection identifies the pane as `grok`.
## amp
herdr does not currently install an Amp plugin.
Amp's public plugin API exposes lifecycle and tool-call hooks, but not passive permission/request-blocked events. A Herdr Amp plugin that only reports `idle` and `working` would take hook authority for the pane and mask Herdr's existing screen heuristics for Amp `blocked` states. Until Amp exposes permission state as an observable plugin event, Amp remains heuristic-only in Herdr.
## known limitations
- these integrations only activate inside herdr-managed panes.
- if an agent has an incomplete hook surface, herdr falls back to process detection and screen heuristics rather than inventing lease or ttl behavior.
- codex currently shows hook lifecycle chatter in its own tui until upstream adds a real silent mode.
## troubleshooting
if an install command succeeds but you do not see improved state reporting:
1. make sure you launched the agent inside a herdr pane
2. restart the agent session so it picks up the new hook/plugin config
3. verify the expected config file was written to the path above
4. remember that unsupported transitions still fall back to herdr's built-in heuristics
+10 -10
View File
@@ -6,7 +6,7 @@
</p>
<p align="center">
<a href="https://herdr.dev">herdr.dev</a> · <a href="#install">install</a> · <a href="#quick-start">quick start</a> · <a href="#supported-agents">supported agents</a> · <a href="./INTEGRATIONS.md">integrations</a> · <a href="./CONFIGURATION.md">configuration</a> · <a href="./SOCKET_API.md">socket api</a>
<a href="https://herdr.dev">herdr.dev</a> · <a href="#install">install</a> · <a href="#quick-start">quick start</a> · <a href="#supported-agents">supported agents</a> · <a href="https://herdr.dev/docs/integrations/">integrations</a> · <a href="https://herdr.dev/docs/configuration/">configuration</a> · <a href="https://herdr.dev/docs/socket-api/">socket api</a>
</p>
---
@@ -163,7 +163,7 @@ herdr pane read 1-2 --source recent --lines 50
herdr pane read 1-2 --source visible --ansi
```
full reference: [`SOCKET_API.md`](./SOCKET_API.md) and [`SKILL.md`](./SKILL.md).
full reference: [socket api](https://herdr.dev/docs/socket-api/) and [`SKILL.md`](./SKILL.md).
## supported agents
@@ -181,7 +181,7 @@ automatic detection works out of the box. process name matching plus terminal ou
detected but not fully tested: gemini cli, cursor agent, cline, kimi, github copilot cli.
for agents outside the built-in list, herdr still works as a terminal multiplexer with workspaces, panes, and tiling. custom integrations can report agent labels over the socket api. see [`SOCKET_API.md`](./SOCKET_API.md).
for agents outside the built-in list, herdr still works as a terminal multiplexer with workspaces, panes, and tiling. custom integrations can report agent labels over the socket api. see the [socket api docs](https://herdr.dev/docs/socket-api/).
### direct integrations
@@ -194,7 +194,7 @@ herdr integration install codex
herdr integration install opencode
```
see [`INTEGRATIONS.md`](./INTEGRATIONS.md) for setup details.
see the [integrations docs](https://herdr.dev/docs/integrations/) for setup details.
## keybindings
@@ -224,7 +224,7 @@ type = "pane" # "shell" or "pane"
command = "lazygit"
```
mouse is supported throughout. full reference: [`CONFIGURATION.md`](./CONFIGURATION.md).
mouse is supported throughout. full reference: [configuration docs](https://herdr.dev/docs/configuration/).
## configuration
@@ -234,7 +234,7 @@ config file: `~/.config/herdr/config.toml`
herdr --default-config # print full default config
```
in-app settings screen for theme, sound, and toast preferences. full reference: [`CONFIGURATION.md`](./CONFIGURATION.md).
in-app settings screen for theme, sound, and toast preferences. full reference: [configuration docs](https://herdr.dev/docs/configuration/).
## logs
@@ -258,14 +258,14 @@ use a higher log level only when needed:
HERDR_LOG=herdr=debug herdr
```
full logging and environment variable details: [`CONFIGURATION.md`](./CONFIGURATION.md).
full logging and environment variable details: [configuration docs](https://herdr.dev/docs/configuration/).
## docs
- [`CONFIGURATION.md`](./CONFIGURATION.md) — keybindings, themes, notifications, environment variables
- [`INTEGRATIONS.md`](./INTEGRATIONS.md) — pi, claude code, codex, opencode integrations
- [configuration](https://herdr.dev/docs/configuration/) — keybindings, themes, notifications, environment variables
- [integrations](https://herdr.dev/docs/integrations/) — pi, claude code, codex, opencode integrations
- [`SKILL.md`](./SKILL.md) — reusable agent skill
- [`SOCKET_API.md`](./SOCKET_API.md) — socket protocol and cli reference
- [socket api](https://herdr.dev/docs/socket-api/) — socket protocol and cli reference
## agent instructions
+1 -1
View File
@@ -19,7 +19,7 @@ this means you can:
the `herdr` binary is available in your PATH. its workspace, tab, pane, and wait commands talk to the running herdr instance over a local unix socket.
if you need the raw protocol or full api reference, read [`SOCKET_API.md`](./SOCKET_API.md).
if you need the raw protocol or full api reference, read the [socket api docs](https://herdr.dev/docs/socket-api/).
## concepts
-1112
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -151,7 +151,7 @@
## [0.5.1] - 2026-04-25
### Added
- Toast notifications can now be delivered through the outer terminal as desktop notifications. Configure this with `ui.toast.delivery = "terminal"`; see `CONFIGURATION.md` for details.
- Toast notifications can now be delivered through the outer terminal as desktop notifications. Configure this with `ui.toast.delivery = "terminal"`; see the [configuration docs](https://herdr.dev/docs/configuration/) for details.
- Herdr now writes separate capped support logs for app, client, and server modes, making persistent-session issue reports easier to diagnose without unbounded log growth.
- The bundled opencode plugin now reports question prompts as blocked while waiting for user input, then returns to working or idle when answered or dismissed. Question prompts are also detected by the default terminal-screen heuristics. (#51, thanks @mspiegel31)
@@ -428,7 +428,7 @@
### Added
- Added first-run onboarding flow that lets you choose notification preferences (sound and toast) on startup.
- Added optional visual toast notifications in the top-right corner for background workspace events (completion and attention-needed alerts).
- Added configurable keybindings for all navigate mode actions: new workspace, rename workspace, close workspace, resize mode, and toggle sidebar. See `CONFIGURATION.md` for the full key reference.
- Added configurable keybindings for all navigate mode actions: new workspace, rename workspace, close workspace, resize mode, and toggle sidebar. See the [configuration docs](https://herdr.dev/docs/configuration/) for the full key reference.
- Added configuration validation with startup diagnostics. Invalid key combinations or duplicate bindings now fall back to safe defaults with a visible warning.
### Changed
@@ -439,7 +439,7 @@
- Keybinding parser now accepts special keys (`enter`, `esc`, `tab`, `backspace`, `space`) and function keys (`f1``f12`).
### Documentation
- Split configuration reference into a dedicated `CONFIGURATION.md` file with full keybinding documentation and config diagnostics explanation.
- Split configuration reference into dedicated configuration docs with full keybinding documentation and config diagnostics explanation.
## [0.1.1] - 2026-03-28
-493
View File
@@ -1,493 +0,0 @@
# configuration
herdr reads config from:
```text
~/.config/herdr/config.toml
```
Named sessions share this config file. Sessions are runtime/socket namespaces, not workspace replacements; per-session sockets and persistent runtime state are separate:
```text
~/.config/herdr/session.json
~/.config/herdr/sessions/<name>/session.json
```
Use `herdr session list`, `herdr session attach <name>`, `herdr session stop <name>`, and `herdr session delete <name>` to inspect and manage named session namespaces. Add `--json` to session commands when scripts need machine-readable output.
In default persistence mode, quitting the UI detaches the current client. Use `herdr server stop` to stop the shared background server.
print the full default config with:
```bash
herdr --default-config
```
if a config value is invalid, or two navigate actions use the same keybinding, herdr falls back to a safe default and shows a startup warning in the UI.
## live reload
After editing `config.toml`, reload the running app without restarting the persistent server:
```bash
herdr server reload-config
```
You can also use the global menu inside herdr and choose `reload config`.
Reload is server-owned. In persistent mode the CLI sends a request to the running server, and the server reads, parses, validates, and applies `config.toml`.
Reloadable now:
- keybindings and prefix
- theme, custom theme colors, and legacy `ui.accent`
- `ui.confirm_close`
- `ui.agent_panel_scope`
- `ui.toast.delivery`
- server-side `ui.sound` policy; attached thin clients refresh local sound config after a successful sound-policy change
- `experimental.kitty_graphics`
- `advanced.scrollback_limit_bytes` for panes created after reload
- `ui.sidebar_width` as the default width; current width updates only while it is still config-owned
- `ui.sidebar_min_width` and `ui.sidebar_max_width`; the live width is re-clamped to the new bounds on reload
Startup-only or special-case:
- `onboarding` does not reopen onboarding during reload
- `experimental.allow_nested` is checked before launch and needs a restart
- existing pane scrollback buffers are not resized during reload
- terminal notifications and sounds are client-local side effects and are sent to the foreground attached client
If the TOML cannot be read or parsed, reload applies nothing and keeps the current running state. If keybindings are invalid, herdr keeps the current keybindings while applying other valid reloadable settings where possible.
## onboarding
```toml
onboarding = true
```
| option | default | description |
|--------|---------|-------------|
| `onboarding` | unset | show first-run notification setup; set `false` after choosing |
notes:
- missing `onboarding` currently behaves like `true`
- set `onboarding = true` to force the setup screen again for testing
- continuing from onboarding writes `onboarding = false` and opens the normal settings UI
## keybindings
keybindings live under `[keys]`.
supported syntax:
- plain keys: `n`, `x`, `-`, `` ` ``
- modifiers: `ctrl+b`, `shift+n`, `alt+x`, `cmd+x`, `super+x`
- special keys: `enter`, `esc`, `tab`, `backspace`, `left`, `right`, `up`, `down`
- function keys: `f1`, `f12`
- uppercase letters also imply shift: `D` works like `shift+d`
notes:
- most reliable bindings are plain keys, `ctrl+letter`, `esc`/`tab`/`enter`, and function keys
- `alt+...`, `cmd`/`super`, and punctuation-with-modifiers may vary depending on terminal/tmux setup
- bindings marked `unset` in the key reference are supported actions with no default key assigned
- for navigate-mode actions, duplicate keybindings are treated as config errors; later conflicting bindings fall back to defaults
example:
```toml
[keys]
prefix = "ctrl+b"
new_workspace = "n"
rename_workspace = "shift+n"
close_workspace = "X"
reload_config = "" # optional, unset by default
open_notification_target = "" # optional, unset by default
new_tab = "c"
split_vertical = "d"
split_horizontal = "D"
close_pane = "x"
rename_pane = "" # optional, unset by default
edit_scrollback = "" # optional, opens focused pane scrollback in $EDITOR
zoom = "f" # legacy alias: fullscreen
resize_mode = "r"
toggle_sidebar = "b"
previous_workspace = "ctrl+alt+["
next_workspace = "ctrl+alt+]"
previous_agent = "ctrl+["
next_agent = "ctrl+]"
previous_tab = "alt+["
next_tab = "alt+]"
focus_pane_left = "alt+h"
focus_pane_down = "alt+j"
focus_pane_up = "alt+k"
focus_pane_right = "alt+l"
[keys.indexed]
tabs = "" # optional; e.g. "ctrl" makes ctrl+1..9 switch tabs
workspaces = "" # optional; e.g. "ctrl+shift" makes ctrl+shift+1..9 switch workspaces
agents = "" # optional; follows visible agent panel order
```
### key reference
| key | default | action |
|-----|---------|--------|
| `prefix` | `ctrl+b` | enter or leave navigate mode |
| `new_workspace` | `n` | create a new workspace |
| `rename_workspace` | `shift+n` | rename selected workspace |
| `close_workspace` | `shift+d` | close selected workspace |
| `detach` | unset | optional explicit detach shortcut in the persistent session |
| `reload_config` | unset | reload `config.toml` in the running app/server |
| `open_notification_target` | unset | jump to the currently visible notification target |
| `previous_workspace` | unset | switch to the previous workspace directly from terminal mode |
| `next_workspace` | unset | switch to the next workspace directly from terminal mode |
| `previous_agent` | unset | focus the previous agent shown in the sidebar agent list |
| `next_agent` | unset | focus the next agent shown in the sidebar agent list |
| `new_tab` | `c` | create a new tab |
| `rename_tab` | unset | rename the active tab |
| `previous_tab` | unset | switch to the previous tab directly from terminal mode |
| `next_tab` | unset | switch to the next tab directly from terminal mode |
| `close_tab` | unset | close the active tab |
| `focus_pane_left` | unset | focus the pane to the left directly from terminal mode |
| `focus_pane_down` | unset | focus the pane below directly from terminal mode |
| `focus_pane_up` | unset | focus the pane above directly from terminal mode |
| `focus_pane_right` | unset | focus the pane to the right directly from terminal mode |
| `split_vertical` | `v` | split pane vertically (side by side) |
| `split_horizontal` | `-` | split pane horizontally (stacked) |
| `close_pane` | `x` | close focused pane |
| `rename_pane` | unset | rename the focused pane |
| `edit_scrollback` | unset | open the focused pane's retained scrollback in `$EDITOR` inside a temporary zoomed pane |
| `zoom` | `f` | zoom focused pane; legacy alias: `fullscreen` |
| `resize_mode` | `r` | enter or leave resize mode |
| `toggle_sidebar` | `b` | collapse or expand the sidebar |
`edit_scrollback` writes the focused pane's retained plain-text scrollback to a temporary file, opens `${EDITOR:-vi}` on that file in a temporary zoomed pane, then removes the file when the editor exits.
### indexed keybindings
Use `[keys.indexed]` to bind number keys `1` through `9` as positional shortcuts. Each value is a modifier combo only. Empty values disable that shortcut family.
```toml
[keys.indexed]
tabs = ""
workspaces = ""
agents = ""
```
| key | default | action |
|-----|---------|--------|
| `tabs` | unset | switch to tab 1-9 in the active workspace, left to right |
| `workspaces` | unset | switch to workspace 1-9 in sidebar order, top to bottom |
| `agents` | unset | focus agent row 1-9 in the visible agent panel order |
### custom command keybindings
Use `[[keys.command]]` to bind a prefix-mode key to a command. Press the prefix key, then the configured key.
```toml
[[keys.command]]
key = "g"
type = "pane"
command = "lazygit"
```
`type` is optional and defaults to `shell`.
| type | behavior |
|------|----------|
| `shell` | run the command detached in the background |
| `pane` | open a temporary zoomed pane, run the command there, then close the pane when the command exits |
Commands run through `/bin/sh -lc`. Herdr sets the command working directory to the active pane cwd when available and provides context through environment variables:
| variable | value |
|----------|-------|
| `HERDR_SOCKET_PATH` | active herdr socket path |
| `HERDR_BIN_PATH` | current herdr binary path |
| `HERDR_ACTIVE_WORKSPACE_ID` | active workspace id |
| `HERDR_ACTIVE_TAB_ID` | active tab id |
| `HERDR_ACTIVE_PANE_ID` | focused pane id |
| `HERDR_ACTIVE_PANE_CWD` | focused pane cwd |
Example detached helper:
```toml
[[keys.command]]
key = "shift+g"
type = "shell"
command = "notify-send herdr 'custom command ran'"
```
## theme
herdr ships with 18 built-in color themes. set one in config:
```toml
[theme]
name = "tokyo-night"
```
### built-in themes
| name | description |
|------|-------------|
| `catppuccin` | soft pastel mocha palette (default) |
| `catppuccin-latte` | light catppuccin palette |
| `terminal` | use your terminal's 16-color ANSI palette |
| `tokyo-night` | blue-purple aesthetic |
| `tokyo-night-day` | light tokyo night palette |
| `dracula` | purple/pink/green classic |
| `nord` | frosty scandinavian blues |
| `gruvbox` | warm retro browns/oranges |
| `gruvbox-light` | light gruvbox palette |
| `one-dark` | atom's beloved dark palette |
| `one-light` | atom's light palette |
| `solarized` | ethan schoonover's classic dark palette |
| `solarized-light` | ethan schoonover's classic light palette |
| `kanagawa` | hokusai-inspired |
| `kanagawa-lotus` | light kanagawa palette |
| `rose-pine` | muted, elegant |
| `rose-pine-dawn` | light rosé pine palette |
| `vesper` | high-contrast monochrome with peach and mint accents |
theme names are flexible: `tokyo-night`, `tokyonight`, and `tokyo_night` all work.
### custom overrides
override individual color tokens on top of any base theme:
```toml
[theme]
name = "dracula"
[theme.custom]
panel_bg = "reset"
accent = "#f5c2e7"
red = "rgb(255, 85, 85)"
green = "#a6e3a1"
```
all tokens are optional — only set what you want to change.
### available tokens
| token | used for |
|-------|----------|
| `accent` | highlights, active borders, navigation UI |
| `panel_bg` | floating panel, tab bar, and overlay background |
| `surface0` | selected item background |
| `surface1` | hover/active backgrounds |
| `surface_dim` | active workspace background, separators |
| `overlay0` | muted text, secondary info |
| `overlay1` | slightly brighter secondary text |
| `text` | primary text |
| `subtext0` | workspace names, dimmed labels |
| `mauve` | git branch names, special labels |
| `green` | idle/done states |
| `yellow` | busy/running states |
| `red` | waiting/needs attention states |
| `blue` | unseen notifications |
| `teal` | done notification accents |
| `peach` | interrupted/warning states |
tokens accept the same color formats as `accent`: hex (`#rrggbb`), named colors, or `rgb(r,g,b)`.
for `panel_bg`, you can also use `reset`, `default`, `none`, or `transparent` to stop herdr from painting an opaque panel background and instead use the host terminal's default background.
## ui
```toml
[ui]
sidebar_width = 26
sidebar_min_width = 18
sidebar_max_width = 36
mouse_capture = true
confirm_close = true
prompt_new_tab_name = true
show_agent_labels_on_pane_borders = false
agent_panel_scope = "all"
accent = "cyan"
```
### options
| option | default | description |
|--------|---------|-------------|
| `sidebar_width` | `26` | base sidebar width before auto-scaling |
| `sidebar_min_width` | `18` | minimum sidebar width when expanded |
| `sidebar_max_width` | `36` | maximum sidebar width when expanded |
| `mouse_capture` | `true` | capture mouse input for Herdr's mouse UI; set false to let the terminal handle normal clicks while still forwarding mouse to pane apps that request it |
| `confirm_close` | `true` | ask before closing a workspace |
| `prompt_new_tab_name` | `true` | ask for a tab name before creating a new tab; set false to create tabs immediately with generated names |
| `show_agent_labels_on_pane_borders` | `false` | show detected/reported agent labels in split pane borders when no manual pane name is set |
| `agent_panel_scope` | `all` | sidebar agent list scope: `current` or `all` |
| `accent` | `cyan` | highlight and border color |
Changing the agent panel scope from the sidebar writes `agent_panel_scope` to config so it survives session resets and upgrades.
`accent` accepts:
- named colors like `cyan`, `blue`, `magenta`
- hex like `#89b4fa`
- rgb like `rgb(137,180,250)`
## toast notifications
```toml
[ui.toast]
delivery = "off"
```
### options
| option | default | description |
|--------|---------|-------------|
| `ui.toast.delivery` | `off` | where background popup notifications should appear |
available values:
- `off` — disable popup notifications
- `herdr` — show top-right in-app toasts
- `terminal` — ask the outer terminal to show a desktop notification. some terminals suppress foreground notifications, including ghostty on macos.
- `system` — ask the os notification service directly. on macos, herdr uses `terminal-notifier` when available and falls back to built-in `osascript`. on linux, `system` requires `notify-send`.
### macos system notifications
for best macos support, install `terminal-notifier`:
```sh
brew install terminal-notifier
```
when `terminal-notifier` is installed, herdr tries to focus the hosting terminal when a notification is clicked. click-to-return is supported for detected ghostty, iterm2, wezterm, kitty, alacritty, and terminal.app sessions.
without `terminal-notifier`, herdr falls back to built-in `osascript`. this still shows a macos notification, but clicking the notification may focus the apple script runner instead of returning to your terminal.
compatibility note:
- older configs may still use `ui.toast.enabled = true|false`
- herdr still reads that legacy key for compatibility
- if you save toast settings from inside herdr, it rewrites the setting to `ui.toast.delivery`
current behavior:
- informational only
- one notification event at a time
- shown for background agent events like `needs attention` and `finished`
- suppression is tab-aware: the active tab stays quiet, but background tabs in the same workspace can still notify
- `terminal` delivery is best-effort and depends on terminal support
- `system` delivery is best-effort and depends on the os helper being available
- macos `system` delivery prefers `terminal-notifier` when present and falls back to `osascript`
- currently targets terminals such as ghostty, kitty, iterm2, and wezterm
- inside tmux, herdr wraps notification escapes with tmux passthrough
## sound
```toml
[ui.sound]
enabled = true
[ui.sound.agents]
claude = "default"
droid = "off"
```
### options
| option | default | description |
|--------|---------|-------------|
| `ui.sound.enabled` | `true` | enable background agent sounds |
per-agent values:
- `default`
- `on`
- `off`
available agent keys:
- `pi`
- `claude`
- `codex`
- `gemini`
- `cursor`
- `cline`
- `open_code`
- `github_copilot`
- `kimi`
- `droid`
- `amp`
- `grok`
- `hermes`
## experimental
```toml
[experimental]
allow_nested = false
kitty_graphics = false
```
### options
| option | default | description |
|--------|---------|-------------|
| `experimental.allow_nested` | `false` | allow launching herdr from inside a herdr-managed pane |
| `experimental.kitty_graphics` | `false` | enable experimental local Kitty graphics rendering for attached clients |
### nested launches
By default, herdr blocks nested launches when `HERDR_ENV=1` is already present.
Set `allow_nested = true` only for debugging or intentionally nested setups.
### Kitty graphics
`kitty_graphics` enables experimental local Kitty graphics rendering for attached clients.
It requires a Kitty graphics-compatible outer terminal.
Known limitation: resizing the terminal window or changing the terminal font while images are visible can leave existing images misplaced or stale. Restart the pane app or clear and redraw the image output after changing size or font. Please report any findings so this experimental path can improve.
## advanced
```toml
[advanced]
scrollback_limit_bytes = 10000000
```
### options
| option | default | description |
|--------|---------|-------------|
| `advanced.scrollback_limit_bytes` | `10000000` | maximum scrollback buffer size in bytes retained per pane terminal |
### scrollback
`scrollback_limit_bytes` limits retained terminal scrollback per pane.
The default matches Ghostty's `scrollback-limit` value.
Set `scrollback_limit_bytes = 0` to disable pane scrollback entirely.
The legacy `scrollback_lines` key is still accepted inside `[advanced]`, but it uses the same byte-based value.
## environment variables
| variable | description |
|----------|-------------|
| `HERDR_LOG` | log level filter (default: `herdr=info`) |
## logs
herdr writes local file logs under:
```text
~/.config/herdr/
```
common files:
```text
~/.config/herdr/herdr.log
~/.config/herdr/herdr-client.log
~/.config/herdr/herdr-server.log
```
notes:
- `herdr.log` is used by monolithic `--no-session` mode and some top-level startup paths
- persistent session mode mainly uses `herdr-client.log` and `herdr-server.log`
- logs rotate automatically by size and keep a few older files as `.1`, `.2`, and so on
- default logs are metadata-focused and are intended to be shareable for issue diagnosis
- `HERDR_LOG` can increase verbosity when you need a local repro or deeper debugging
-284
View File
@@ -1,284 +0,0 @@
# integrations
herdr works without any hook or plugin setup.
out of the box, it detects supported agents automatically by combining foreground process detection with screen heuristics. that is enough to give you workspace awareness with zero configuration.
when an agent exposes hooks or plugins, the more robust path is to forward semantic state to herdr over the local socket api. the built-in integrations in this document do exactly that.
if you want to inspect the exact files herdr installs, they are versioned in this repo:
- [pi extension](./src/integration/assets/pi/herdr-agent-state.ts)
- [claude code hook](./src/integration/assets/claude/herdr-agent-state.sh)
- [codex hook](./src/integration/assets/codex/herdr-agent-state.sh)
- [opencode plugin](./src/integration/assets/opencode/herdr-agent-state.js)
- [hermes plugin](./src/integration/assets/hermes/__init__.py)
## how herdr uses integrations
herdr uses a hybrid model:
- **process detection** owns pane identity, liveness, and "the process is gone"
- **agent integrations** report semantic state like `working`, `blocked`, and `idle` over the local socket api when the tool exposes those events
- **screen heuristics** remain the fallback for gaps, unsupported tools, or incomplete hook surfaces
that means hooks/plugins do **not** become the source of truth for pane ownership. they enrich state reporting; they do not replace process detection.
## install commands
```bash
herdr integration install pi
herdr integration install claude
herdr integration install codex
herdr integration install opencode
herdr integration install hermes
```
## uninstall commands
```bash
herdr integration uninstall pi
herdr integration uninstall claude
herdr integration uninstall codex
herdr integration uninstall opencode
herdr integration uninstall hermes
```
## pi
install:
```bash
herdr integration install pi
```
this writes the bundled pi extension to:
```text
~/.pi/agent/extensions/herdr-agent-state.ts
```
if `PI_CODING_AGENT_DIR` is set, herdr uses that agent directory instead and writes to:
```text
$PI_CODING_AGENT_DIR/extensions/herdr-agent-state.ts
```
`~` is expanded in `PI_CODING_AGENT_DIR`.
pi is the cleanest integration. it already has an authoritative hook model, so herdr can get direct state reports over the socket api without guessing as much from the terminal.
bundled source: [`src/integration/assets/pi/herdr-agent-state.ts`](./src/integration/assets/pi/herdr-agent-state.ts)
uninstall:
```bash
herdr integration uninstall pi
```
this removes the same extension path herdr would install, using `PI_CODING_AGENT_DIR` when it is set.
## claude code
install:
```bash
herdr integration install claude
```
this:
- writes the hook script to `~/.claude/hooks/herdr-agent-state.sh`
- updates `~/.claude/settings.json`
if `CLAUDE_CONFIG_DIR` is set, herdr uses that directory instead, for example `$CLAUDE_CONFIG_DIR/hooks/herdr-agent-state.sh` and `$CLAUDE_CONFIG_DIR/settings.json`. `~` is expanded in `CLAUDE_CONFIG_DIR`.
bundled source: [`src/integration/assets/claude/herdr-agent-state.sh`](./src/integration/assets/claude/herdr-agent-state.sh)
current hook mapping:
- `UserPromptSubmit``working`
- `PreToolUse``working`
- `PermissionRequest``blocked`
- `PostToolUse``working`
- `PostToolUseFailure``working`
- `SubagentStop``working`
- `Stop``idle`
- `SessionEnd``release`
notes:
- claude code hooks also run inside subagents. herdr treats subagent `working` and `blocked` reports as real pane state.
- subagent stop/release events are converted to `working` by the bundled hook script so a completed subagent does not make the parent claude pane look idle.
- `PostToolUse` and `PostToolUseFailure` move the pane back to `working` after a permissioned tool call resolves.
- some non-claude tools, including grok cli, may load claude settings or plugins. herdr ignores conflicting known-agent hook labels once native foreground-process detection identifies a different known agent.
uninstall:
```bash
herdr integration uninstall claude
```
this removes the same hook path and settings entries herdr would install, using `CLAUDE_CONFIG_DIR` when it is set.
## codex
install:
```bash
herdr integration install codex
```
this:
- writes the hook script to `~/.codex/herdr-agent-state.sh`
- updates `~/.codex/hooks.json`
- ensures `hooks = true` under `[features]` in `~/.codex/config.toml`
- migrates the deprecated top-level `[features] codex_hooks = true` setting to `hooks = true`
if `CODEX_HOME` is set, herdr uses that directory instead, for example `$CODEX_HOME/herdr-agent-state.sh`, `$CODEX_HOME/hooks.json`, and `$CODEX_HOME/config.toml`. `~` is expanded in `CODEX_HOME`.
bundled source: [`src/integration/assets/codex/herdr-agent-state.sh`](./src/integration/assets/codex/herdr-agent-state.sh)
current hook mapping:
- `SessionStart``idle`
- `UserPromptSubmit``working`
- `PreToolUse``working`
- `Stop``idle`
notes:
- codex does **not** currently expose a permission-specific hook like claude or opencode, so `blocked` still depends on herdr's normal heuristics.
- codex currently renders hook lifecycle messages in its own tui, for example `Running SessionStart hook` and `SessionStart hook (completed)`.
- that noise is an upstream codex limitation, not a herdr-specific issue.
- codex has a `suppressOutput` field in its hook output schema, but it is currently not effective for suppressing those tui lifecycle lines.
uninstall:
```bash
herdr integration uninstall codex
```
this:
- removes the same hook path herdr would install, using `CODEX_HOME` when it is set
- removes herdr-owned hook entries from the matching `hooks.json`
- intentionally leaves the matching `config.toml` alone
that last point is deliberate: herdr does **not** try to guess whether `hooks = true` is still needed for some other codex hook setup.
## opencode
install:
```bash
herdr integration install opencode
```
this writes the bundled plugin to:
```text
~/.config/opencode/plugins/herdr-agent-state.js
```
bundled source: [`src/integration/assets/opencode/herdr-agent-state.js`](./src/integration/assets/opencode/herdr-agent-state.js)
current plugin mapping:
- `permission.asked``blocked`
- `permission.replied: once|always``working`
- `permission.replied: reject``idle`
- `question.asked``blocked`
- `question.replied``working`
- `question.rejected``idle`
- `session.status: busy|retry``working`
- `session.status: idle``idle`
- `session.idle``idle`
notes:
- opencode has the richest event surface of the currently supported integrations.
- herdr intentionally does **not** guess that `session.deleted` means process exit. process detection still owns liveness and pane identity.
uninstall:
```bash
herdr integration uninstall opencode
```
this removes:
```text
~/.config/opencode/plugins/herdr-agent-state.js
```
## hermes agent
install:
```bash
herdr integration install hermes
```
this:
- writes the bundled plugin to `~/.hermes/plugins/herdr-agent-state/`
- updates `~/.hermes/config.yaml` so `plugins.enabled` contains `herdr-agent-state`
bundled source: [`src/integration/assets/hermes/__init__.py`](./src/integration/assets/hermes/__init__.py)
current plugin mapping:
- `on_session_start``idle`
- `pre_llm_call``working`
- `pre_api_request``working`
- `pre_tool_call``working`
- `post_tool_call``working`
- `pre_approval_request``blocked`
- `post_approval_response``working`
- `post_llm_call``idle`
- `on_session_end``idle`
- `on_session_finalize``release`
notes:
- hermes plugins are opt-in, so install also enables the plugin in `config.yaml`.
- herdr still keeps native process detection and screen heuristics for hermes. the plugin improves state accuracy when the hook surface fires.
uninstall:
```bash
herdr integration uninstall hermes
```
this removes `~/.hermes/plugins/herdr-agent-state/` and removes the matching `plugins.enabled` entry from `~/.hermes/config.yaml`.
## grok cli
herdr does not currently install a grok hook or plugin.
grok is heuristic-only in herdr. herdr detects `grok` and `grok-build` from the foreground process and uses screen heuristics for `working`, `blocked`, and `idle` states.
grok cli may load claude settings or plugins as a compatibility feature, including hooks from `~/.claude/settings.json`. if that causes the claude herdr hook to run in a grok pane, herdr ignores the conflicting `claude` hook label once native foreground-process detection identifies the pane as `grok`.
## amp
herdr does not currently install an Amp plugin.
Amp's public plugin API exposes lifecycle and tool-call hooks, but not passive permission/request-blocked events. A Herdr Amp plugin that only reports `idle` and `working` would take hook authority for the pane and mask Herdr's existing screen heuristics for Amp `blocked` states. Until Amp exposes permission state as an observable plugin event, Amp remains heuristic-only in Herdr.
## known limitations
- these integrations only activate inside herdr-managed panes.
- if an agent has an incomplete hook surface, herdr falls back to process detection and screen heuristics rather than inventing lease or ttl behavior.
- codex currently shows hook lifecycle chatter in its own tui until upstream adds a real silent mode.
## troubleshooting
if an install command succeeds but you do not see improved state reporting:
1. make sure you launched the agent inside a herdr pane
2. restart the agent session so it picks up the new hook/plugin config
3. verify the expected config file was written to the path above
4. remember that unsupported transitions still fall back to herdr's built-in heuristics
+10 -10
View File
@@ -6,7 +6,7 @@
</p>
<p align="center">
<a href="https://herdr.dev">herdr.dev</a> · <a href="#install">install</a> · <a href="#quick-start">quick start</a> · <a href="#supported-agents">supported agents</a> · <a href="./INTEGRATIONS.md">integrations</a> · <a href="./CONFIGURATION.md">configuration</a> · <a href="./SOCKET_API.md">socket api</a>
<a href="https://herdr.dev">herdr.dev</a> · <a href="#install">install</a> · <a href="#quick-start">quick start</a> · <a href="#supported-agents">supported agents</a> · <a href="https://herdr.dev/docs/integrations/">integrations</a> · <a href="https://herdr.dev/docs/configuration/">configuration</a> · <a href="https://herdr.dev/docs/socket-api/">socket api</a>
</p>
---
@@ -163,7 +163,7 @@ herdr pane read 1-2 --source recent --lines 50
herdr pane read 1-2 --source visible --ansi
```
full reference: [`SOCKET_API.md`](./SOCKET_API.md) and [`SKILL.md`](./SKILL.md).
full reference: [socket api](https://herdr.dev/docs/socket-api/) and [`SKILL.md`](./SKILL.md).
## supported agents
@@ -182,7 +182,7 @@ automatic detection works out of the box. process name matching plus terminal ou
detected but not fully tested: gemini cli, cursor agent, cline, kimi, github copilot cli.
for agents outside the built-in list, herdr still works as a terminal multiplexer with workspaces, panes, and tiling. custom integrations can report agent labels over the socket api. see [`SOCKET_API.md`](./SOCKET_API.md).
for agents outside the built-in list, herdr still works as a terminal multiplexer with workspaces, panes, and tiling. custom integrations can report agent labels over the socket api. see the [socket api docs](https://herdr.dev/docs/socket-api/).
### direct integrations
@@ -196,7 +196,7 @@ herdr integration install opencode
herdr integration install hermes
```
see [`INTEGRATIONS.md`](./INTEGRATIONS.md) for setup details.
see the [integrations docs](https://herdr.dev/docs/integrations/) for setup details.
## keybindings
@@ -226,7 +226,7 @@ type = "pane" # "shell" or "pane"
command = "lazygit"
```
mouse is supported throughout. full reference: [`CONFIGURATION.md`](./CONFIGURATION.md).
mouse is supported throughout. full reference: [configuration docs](https://herdr.dev/docs/configuration/).
## configuration
@@ -236,7 +236,7 @@ config file: `~/.config/herdr/config.toml`
herdr --default-config # print full default config
```
in-app settings screen for theme, sound, and toast preferences. full reference: [`CONFIGURATION.md`](./CONFIGURATION.md).
in-app settings screen for theme, sound, and toast preferences. full reference: [configuration docs](https://herdr.dev/docs/configuration/).
## logs
@@ -260,14 +260,14 @@ use a higher log level only when needed:
HERDR_LOG=herdr=debug herdr
```
full logging and environment variable details: [`CONFIGURATION.md`](./CONFIGURATION.md).
full logging and environment variable details: [configuration docs](https://herdr.dev/docs/configuration/).
## docs
- [`CONFIGURATION.md`](./CONFIGURATION.md) — keybindings, themes, notifications, environment variables
- [`INTEGRATIONS.md`](./INTEGRATIONS.md) — pi, claude code, codex, opencode, hermes integrations
- [configuration](https://herdr.dev/docs/configuration/) — keybindings, themes, notifications, environment variables
- [integrations](https://herdr.dev/docs/integrations/) — pi, claude code, codex, opencode, hermes integrations
- [`SKILL.md`](./SKILL.md) — reusable agent skill
- [`SOCKET_API.md`](./SOCKET_API.md) — socket protocol and cli reference
- [socket api](https://herdr.dev/docs/socket-api/) — socket protocol and cli reference
## agent instructions
File diff suppressed because it is too large Load Diff
+12 -2
View File
@@ -17,6 +17,7 @@ ci: lint
# Check formatting + run unit tests + maintenance script tests
check: ci
python3 -m unittest scripts.test_changelog scripts.test_vendor_libghostty_vt
@echo "docs reminder: if this changes user-facing behavior, make sure the relevant release docs are updated or called out before release."
# Install repo-local git hooks
install-hooks:
@@ -36,14 +37,23 @@ website-build:
build-libghostty-vt:
scripts/build_vendored_libghostty_vt.sh
# Check that public docs and changelog have been finalized from docs/next before release
# Check that release docs and changelog have been finalized from docs/next before release
release-docs-check:
@for file in README.md CONFIGURATION.md INTEGRATIONS.md SOCKET_API.md CHANGELOG.md; do \
@for file in README.md CHANGELOG.md; do \
if ! diff -u "$file" "docs/next/$file"; then \
echo "error: $file differs from docs/next/$file; finalize release docs before releasing"; \
exit 1; \
fi; \
done
@for file in CONFIGURATION.md INTEGRATIONS.md SOCKET_API.md; do \
if [ -e "$file" ]; then \
echo "error: $file was replaced by website docs; remove the root copy"; \
exit 1; \
fi; \
done
@test -f website/src/content/docs/configuration.mdx
@test -f website/src/content/docs/integrations.mdx
@test -f website/src/content/docs/socket-api.mdx
# Finalize changelog, bump version, commit, tag, push, and trigger the GitHub Release workflow (usage: just release 0.1.1)
release version:
-2
View File
@@ -18,7 +18,6 @@ Automatic detection works out of the box for common coding agents.
| Amp | yes | yes | yes |
| OpenCode | yes | yes | yes |
| Grok CLI | yes | yes | yes |
| Hermes Agent | yes | yes | yes |
| GitHub Copilot CLI | yes | yes | yes |
Detected but less thoroughly tested: Gemini CLI, Cursor Agent, Cline, and Kimi.
@@ -52,7 +51,6 @@ herdr integration install pi
herdr integration install claude
herdr integration install codex
herdr integration install opencode
herdr integration install hermes
```
Check installed integration versions:
@@ -165,12 +165,10 @@ herdr integration install pi
herdr integration install claude
herdr integration install codex
herdr integration install opencode
herdr integration install hermes
herdr integration uninstall pi
herdr integration uninstall claude
herdr integration uninstall codex
herdr integration uninstall opencode
herdr integration uninstall hermes
herdr integration status [--outdated-only]
```
+1 -14
View File
@@ -1,6 +1,6 @@
---
title: Integrations
description: Install Herdr integrations for Pi, Claude Code, Codex, OpenCode, and Hermes Agent.
description: Install Herdr integrations for Pi, Claude Code, Codex, and OpenCode.
---
Herdr detects supported agents automatically. Integrations make that detection more precise by reporting semantic state directly to Herdr.
@@ -14,7 +14,6 @@ herdr integration install pi
herdr integration install claude
herdr integration install codex
herdr integration install opencode
herdr integration install hermes
```
## Uninstall integrations
@@ -24,7 +23,6 @@ herdr integration uninstall pi
herdr integration uninstall claude
herdr integration uninstall codex
herdr integration uninstall opencode
herdr integration uninstall hermes
```
## How Herdr uses integrations
@@ -85,17 +83,6 @@ herdr integration install opencode
The plugin reports semantic state while OpenCode runs inside a Herdr pane.
## Hermes Agent
Install the Hermes Agent plugin:
```bash
herdr integration install hermes
```
Herdr writes `~/.hermes/plugins/herdr-agent-state/` and enables `herdr-agent-state` in `~/.hermes/config.yaml`. Restart Hermes after installing so the plugin loads.
The plugin reports lifecycle, tool, and approval state while Hermes runs inside a Herdr pane. Native screen heuristics remain available when the plugin is not installed.
## Custom status labels