aboutsummaryrefslogtreecommitdiff
path: root/website/src/content/docs/configuration.mdx
blob: 558f01f1945879a07e5fa73cc8ff043494537c32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
---
title: Configuration
description: Configure Herdr keybindings, themes, sidebar behavior, notifications, and advanced options.
---

Herdr works without a config file. Add one when you want custom keys, themes, sidebar settings, notifications, or advanced behavior.

## Config file

Herdr reads config from:

```text
~/.config/herdr/config.toml
```

Print the full default config:

```bash
herdr --default-config
```

Save it as your config if you want a complete starting point:

```bash
herdr --default-config > ~/.config/herdr/config.toml
```

If a config value is invalid, Herdr falls back to a safe default and shows a startup warning.

Herdr shows first-run notification setup when `onboarding` is missing or true. Set it when you want to skip that flow after choosing your notification settings.

```toml
onboarding = false
```

## Reload config

Reload a running server after editing `config.toml`:

```bash
herdr server reload-config
```

You can also open the global menu in Herdr and choose `reload config`.

Reload applies most UI settings without restarting panes. Startup-only settings still need a restart.

## Keybindings

Herdr has a prefix mode similar to tmux. The default prefix is `ctrl+b`.

A small keybinding override looks like this:

```toml
[keys]
prefix = "ctrl+b"
new_workspace = "n"
rename_workspace = "shift+n"
close_workspace = "shift+d"
new_tab = "c"
split_vertical = "v"
split_horizontal = "-"
close_pane = "x"
zoom = "f"
resize_mode = "r"
toggle_sidebar = "b"
```

Optional actions are unset by default. Bind them when you want direct shortcuts:

```toml
[keys]
detach = "q"
reload_config = "R"
open_notification_target = "o"
previous_workspace = "H"
next_workspace = "L"
previous_agent = "A"
next_agent = "D"
previous_tab = "J"
next_tab = "K"
rename_tab = "T"
close_tab = "W"
rename_pane = "p"
edit_scrollback = "e"
focus_pane_left = "h"
focus_pane_down = "j"
focus_pane_up = "k"
focus_pane_right = "l"
```

Use the full default config to see every available action.

Key strings accept plain keys, modifier combinations such as `ctrl+a`, `shift+n`, `alt+1`, `cmd+k`, and special keys such as `enter`, `tab`, `esc`, `left`, `right`, `up`, and `down`. Plain keys, `ctrl+letter`, Escape, Tab, Enter, and function keys are the most reliable. Alt, Cmd/Super, and punctuation with modifiers depend on your terminal and tmux settings.

## Indexed jumps

Indexed keybindings let you jump directly to visible positions.

```toml
[keys.indexed]
workspaces = "ctrl+shift"
tabs = "ctrl"
agents = "alt"
```

These expand over number keys 1 through 9. For example, `tabs = "ctrl"` makes `ctrl+1` through `ctrl+9` switch tabs.

## Custom command keybindings

Custom prefix-mode commands can run shell helpers from inside Herdr.

```toml
[[keys.command]]
key = "g"
type = "pane"
command = "lazygit"
```

`type = "pane"` opens a temporary pane and closes it when the command exits.

`type = "shell"` runs detached in the background.

Custom commands receive `HERDR_SOCKET_PATH`, `HERDR_BIN_PATH`, `HERDR_ACTIVE_WORKSPACE_ID`, `HERDR_ACTIVE_TAB_ID`, `HERDR_ACTIVE_PANE_ID`, and `HERDR_ACTIVE_PANE_CWD` when those values are available. Shell commands run from the focused pane's working directory when Herdr can detect it.

## Theme

Choose a built-in theme:

```toml
[theme]
name = "catppuccin"
```

Built-in themes:

`catppuccin`, `catppuccin-latte`, `terminal`, `tokyo-night`, `tokyo-night-day`, `dracula`, `nord`, `gruvbox`, `gruvbox-light`, `one-dark`, `one-light`, `solarized`, `solarized-light`, `kanagawa`, `kanagawa-lotus`, `rose-pine`, `rose-pine-dawn`, `vesper`.

Use `terminal` when you want Herdr UI colors to follow your host terminal's ANSI palette.

You can override individual colors:

```toml
[theme.custom]
panel_bg = "reset"
accent = "#a6e3a1"
green = "#a6e3a1"
blue = "#89b4fa"
red = "#f38ba8"
yellow = "#f9e2af"
```

Color values accept hex, named colors, `rgb(r,g,b)`, or reset aliases like `reset`, `default`, `none`, and `transparent`.

## UI and sidebar

The sidebar is the main Herdr dashboard. It shows workspaces, tabs, panes, and agent state.

Common options:

```toml
[ui]
sidebar_width = 32
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"
```

`sidebar_min_width` and `sidebar_max_width` control the expanded sidebar's resize bounds in columns. The defaults are 18 and 36.

`agent_panel_scope` can be `all` or `current`. Use `current` if you only want the agent panel to show agents in the active workspace.

`confirm_close` controls whether closing a workspace asks for confirmation. `prompt_new_tab_name` controls whether new tabs ask for a label first.

Set `mouse_capture = false` if you want your terminal to handle normal clicks, such as command-clicking URLs.

Set `show_agent_labels_on_pane_borders = true` if you want detected agent labels in split pane borders when no manual pane label is set.

## Notifications

Herdr can show popup notifications when agents finish or need input.

```toml
[ui.toast]
delivery = "off"
```

`delivery = "off"` disables popup notifications. This is the default.

`delivery = "herdr"` shows a top-right toast inside the Herdr UI. Click the toast, or bind `keys.open_notification_target`, to focus the target workspace, tab, and pane.

`delivery = "terminal"` asks the outer terminal to show a desktop notification. Herdr sends terminal notification escape sequences for Ghostty, iTerm2, Kitty, and WezTerm. This is useful over SSH because the local terminal owns the notification.

`delivery = "system"` asks the local operating system directly. On macOS, Herdr uses `terminal-notifier` when available, then falls back to `/usr/bin/osascript`. `terminal-notifier` can activate the hosting terminal when you click the notification. On Linux, Herdr uses `notify-send` and requires `DISPLAY` or `WAYLAND_DISPLAY`.

Popup notifications are for background attention. Herdr suppresses popups for the active tab.

## Sound

Sound notifications are enabled by default and are played by the local Herdr client.

```toml
[ui.sound]
enabled = true
```

Herdr plays a done sound when an agent finishes and an attention sound when an agent needs input. Set `enabled = false` on shared machines or remote servers unless you explicitly want audio.

On macOS, Herdr uses `afplay`. On Linux, Herdr tries `paplay`, then `aplay`. If no player is available, sound playback is skipped and Herdr logs a warning.

Custom sounds must be mp3 files. Relative paths are resolved from the config file's directory.

```toml
[ui.sound]
path = "sounds/notification.mp3"
done_path = "sounds/done.mp3"
request_path = "sounds/request.mp3"
```

`path` sets one sound for all sound notifications. `done_path` and `request_path` override only the finished and needs-input sounds.

Per-agent sound overrides accept `default`, `on`, or `off`. Droid is muted by default.

```toml
[ui.sound.agents]
droid = "off"
claude = "on"
```

## Scrollback

Set the scrollback buffer size for newly created panes:

```toml
[advanced]
scrollback_limit_bytes = 10485760
```

Existing panes keep their current buffer until they are recreated.

## Nested launches

Herdr normally protects you from launching Herdr inside Herdr.

```toml
[experimental]
allow_nested = false
```

Only enable nested launches for testing.

## Kitty graphics

Kitty graphics support is experimental.

```toml
[experimental]
kitty_graphics = false
```

Leave this off unless you are testing terminal image behavior.

## Environment variables

| Variable | Purpose |
| --- | --- |
| `HERDR_CONFIG_PATH` | Override the config file path. |
| `HERDR_SESSION` | Select a named session for CLI commands. |
| `HERDR_SOCKET_PATH` | Low-level socket path override. |
| `HERDR_LOG` | Set log filtering, for example `HERDR_LOG=herdr=debug`. |
| `HERDR_DISABLE_SOUND` | Disable sound playback even when `[ui.sound] enabled = true`. |

## Logs

Logs are useful when diagnosing startup warnings, integration state, or socket API behavior.

Common log files:

```text
~/.config/herdr/herdr.log
~/.config/herdr/herdr-client.log
~/.config/herdr/herdr-server.log
```

Logs rotate automatically. Include the current log and rotated siblings when reporting issues.