cat-herdr 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cat_herdr-0.1.0/CONTRIBUTING.md +36 -0
- cat_herdr-0.1.0/LICENSE +21 -0
- cat_herdr-0.1.0/MANIFEST.in +3 -0
- cat_herdr-0.1.0/PKG-INFO +269 -0
- cat_herdr-0.1.0/README.md +250 -0
- cat_herdr-0.1.0/assets/lion-badge.png +0 -0
- cat_herdr-0.1.0/docs/ai-configuration.md +58 -0
- cat_herdr-0.1.0/docs/hooks.md +206 -0
- cat_herdr-0.1.0/pyproject.toml +40 -0
- cat_herdr-0.1.0/setup.cfg +4 -0
- cat_herdr-0.1.0/src/cat_herdr/__init__.py +1 -0
- cat_herdr-0.1.0/src/cat_herdr/__main__.py +4 -0
- cat_herdr-0.1.0/src/cat_herdr/adapters/claude.json +93 -0
- cat_herdr-0.1.0/src/cat_herdr/adapters/codex.json +59 -0
- cat_herdr-0.1.0/src/cat_herdr/adapters/opencode.js +41 -0
- cat_herdr-0.1.0/src/cat_herdr/adapters/pi.ts +19 -0
- cat_herdr-0.1.0/src/cat_herdr/als_alerts.py +153 -0
- cat_herdr-0.1.0/src/cat_herdr/als_pane.py +2469 -0
- cat_herdr-0.1.0/src/cat_herdr/als_runs.py +499 -0
- cat_herdr-0.1.0/src/cat_herdr/als_tmux.py +143 -0
- cat_herdr-0.1.0/src/cat_herdr/cat-herdr.1 +287 -0
- cat_herdr-0.1.0/src/cat_herdr/claude-statusline.sh +164 -0
- cat_herdr-0.1.0/src/cat_herdr/cli.py +341 -0
- cat_herdr-0.1.0/src/cat_herdr/config.py +96 -0
- cat_herdr-0.1.0/src/cat_herdr/native.py +295 -0
- cat_herdr-0.1.0/src/cat_herdr/usage.py +155 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/PKG-INFO +269 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/SOURCES.txt +37 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/dependency_links.txt +1 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/entry_points.txt +2 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/requires.txt +3 -0
- cat_herdr-0.1.0/src/cat_herdr.egg-info/top_level.txt +1 -0
- cat_herdr-0.1.0/tests/fixtures/native-interactive.json +66 -0
- cat_herdr-0.1.0/tests/test_als_dashboard.py +2704 -0
- cat_herdr-0.1.0/tests/test_als_watch.py +49 -0
- cat_herdr-0.1.0/tests/test_config.py +138 -0
- cat_herdr-0.1.0/tests/test_discovery.py +56 -0
- cat_herdr-0.1.0/tests/test_native_status.py +258 -0
- cat_herdr-0.1.0/tests/test_packaging.py +167 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Contributing to Cat Herdr
|
|
2
|
+
|
|
3
|
+
Use the [configuration guide](docs/ai-configuration.md) to tailor an installed
|
|
4
|
+
copy. Follow this guide to change Cat Herdr itself.
|
|
5
|
+
|
|
6
|
+
## Work locally
|
|
7
|
+
|
|
8
|
+
Clone the project or clone your own fork if you want a remote for your
|
|
9
|
+
changes. A local clone is enough to develop and test without a forge account.
|
|
10
|
+
Use Python 3.11 or newer for the commands below and have tmux on your PATH.
|
|
11
|
+
The Autometta tests also need [`yq`](https://github.com/mikefarah/yq) version
|
|
12
|
+
4. The `yq` package in Debian and Ubuntu is a different tool and fails them.
|
|
13
|
+
Run the commands from the checkout root.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
git switch -c my-change
|
|
17
|
+
python3 -m venv .venv
|
|
18
|
+
. .venv/bin/activate
|
|
19
|
+
python -m pip install -e .
|
|
20
|
+
python -B -m unittest discover -s tests -v
|
|
21
|
+
cat-herdr --help
|
|
22
|
+
cat-herdr config --check
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Test interactive changes by opening the dashboard in a terminal with an agent
|
|
26
|
+
running in tmux. Read `AGENTS.md` for the source entry points.
|
|
27
|
+
|
|
28
|
+
## Keep a fork or submit a change
|
|
29
|
+
|
|
30
|
+
You can keep your changes in your clone or fork for your own use. Forking is
|
|
31
|
+
optional and there is no requirement to submit changes. To keep a hosted copy,
|
|
32
|
+
create a fork from the upstream project, clone your fork and push your branch
|
|
33
|
+
to it after testing.
|
|
34
|
+
|
|
35
|
+
If the change could help others, you can open an upstream pull request from
|
|
36
|
+
your fork's branch. Include what changed, why it helps and which checks you ran.
|
cat_herdr-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Anthony West
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
cat_herdr-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cat-herdr
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A terminal dashboard for Claude Code and Codex sessions in tmux
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/aw-pr/cat-herdr
|
|
7
|
+
Project-URL: Issues, https://github.com/aw-pr/cat-herdr/issues
|
|
8
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
|
+
Classifier: Environment :: Console :: Curses
|
|
10
|
+
Classifier: Operating System :: MacOS
|
|
11
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Topic :: Software Development
|
|
14
|
+
Requires-Python: >=3.9
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: tomli>=1.1; python_version < "3.11"
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
|
|
20
|
+
# Cat Herdr
|
|
21
|
+
|
|
22
|
+
<img src="https://raw.githubusercontent.com/aw-pr/cat-herdr/main/assets/lion-badge.png" width="96" height="96" alt="A gold lion on a midnight blue tile">
|
|
23
|
+
|
|
24
|
+
**Cat Herdr is a terminal dashboard that finds, watches and switches between
|
|
25
|
+
Claude Code and Codex sessions running in tmux.** This is a beta release.
|
|
26
|
+
|
|
27
|
+

|
|
28
|
+

|
|
29
|
+

|
|
30
|
+

|
|
31
|
+
|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
*The screenshots show demo sessions and a demo run.*
|
|
35
|
+
|
|
36
|
+
It needs tmux, Python 3.9 or newer, and macOS or Linux. Everything else is
|
|
37
|
+
optional.
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
### Homebrew (macOS)
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
brew install aw-pr/cat-herdr/cat-herdr &&
|
|
45
|
+
cat-herdr install-shortcut --existing "$(command -v ch || true)"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Homebrew installs tmux for you. The second line is optional and safe to
|
|
49
|
+
repeat: it sets up the short `ch` command next to `cat-herdr` when the name
|
|
50
|
+
is free on your PATH, and otherwise warns once, leaves whatever is already
|
|
51
|
+
using `ch` untouched, and leaves `cat-herdr` working either way.
|
|
52
|
+
|
|
53
|
+
### uv (verified on Linux)
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
uv tool install cat-herdr &&
|
|
57
|
+
cat-herdr install-shortcut --existing "$(command -v ch || true)"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Install tmux through your system package manager. If your shell cannot find
|
|
61
|
+
`cat-herdr` afterwards, run `uv tool update-shell` and start a new shell.
|
|
62
|
+
|
|
63
|
+
To install from the repository instead of the package index, make the first
|
|
64
|
+
line `uv tool install git+https://github.com/aw-pr/cat-herdr &&`.
|
|
65
|
+
|
|
66
|
+
Other installers (pipx, pip) are not yet verified.
|
|
67
|
+
|
|
68
|
+
## First run
|
|
69
|
+
|
|
70
|
+
Check the install, start an agent in a tmux session, then open the dashboard:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
cat-herdr --version
|
|
74
|
+
tmux new -d -s web claude # or codex
|
|
75
|
+
cat-herdr
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Press `Enter` to jump into the session. From a plain terminal, tmux's prefix
|
|
79
|
+
then `d` (`Ctrl-b` `d` by default) brings you back and leaves the agent
|
|
80
|
+
running. Press `?` for the keys and `q` to quit.
|
|
81
|
+
|
|
82
|
+
With no agent running, the dashboard says so and waits. It refreshes every
|
|
83
|
+
two seconds. If tmux is not installed, `cat-herdr` tells you.
|
|
84
|
+
|
|
85
|
+
The canonical command is always `cat-herdr`. If `install-shortcut` set up
|
|
86
|
+
`ch` for you, either name opens the dashboard. If you'd rather type `cath`,
|
|
87
|
+
or `ch` was already taken on your machine, add your own alias instead:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
# zsh
|
|
91
|
+
command -v cath >/dev/null || printf '%s\n' "alias cath='cat-herdr'" >> ~/.zshrc
|
|
92
|
+
# Bash
|
|
93
|
+
command -v cath >/dev/null || printf '%s\n' "alias cath='cat-herdr'" >> ~/.bashrc
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Start a new shell (or `source ~/.zshrc` / `source ~/.bashrc`) to pick it up.
|
|
97
|
+
|
|
98
|
+
Run `cat-herdr -h` for the full option list, or `man cat-herdr` for the
|
|
99
|
+
installed manual. With uv, if `man cat-herdr` can't find the page, point
|
|
100
|
+
`MANPATH` at the tool's venv and keep your normal manuals too:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
MANPATH="$(uv tool dir)/cat-herdr/share/man:${MANPATH-}" man cat-herdr
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Controls
|
|
107
|
+
|
|
108
|
+
With no arguments, `cat-herdr` opens the dashboard in a terminal, or prints a
|
|
109
|
+
plain table when piped. Press `?` on any page for the keys that page answers.
|
|
110
|
+
The tables below list the same keys.
|
|
111
|
+
|
|
112
|
+
### Move
|
|
113
|
+
|
|
114
|
+
| Key | Action |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `↑` `k`, `↓` `j` | Move the selection. The first `↓` on the top row opens its preview. |
|
|
117
|
+
| `3j`, `3↓` | Type a count before a move to repeat it, as in vim. Works in every list, in Help and in a full card. |
|
|
118
|
+
| `g`, `G` | First or last row. `5G` goes to row five. |
|
|
119
|
+
| `H`, `M`, `L` | Top, middle or bottom row on screen. |
|
|
120
|
+
| `Ctrl-u`, `Ctrl-d` | Half a screen up or down. |
|
|
121
|
+
| `PgUp`, `PgDn` | A whole screen up or down. |
|
|
122
|
+
| Click | Select a row and act on it as `Enter` does. On a card, a click only selects. A click on a view name in the top line opens that view. |
|
|
123
|
+
|
|
124
|
+
### Act on the selected chat
|
|
125
|
+
|
|
126
|
+
| Key | Action |
|
|
127
|
+
| --- | --- |
|
|
128
|
+
| `Enter` | Jump to the chat's tmux pane. |
|
|
129
|
+
| `→` `l`, `←` `h` | Show or hide the live tmux preview. |
|
|
130
|
+
| `n` | Open the chat in a new split beside the dashboard. |
|
|
131
|
+
| `m` | Manage tmux sessions, starting on the chat's session. |
|
|
132
|
+
| `u` | Show or hide chats without a tmux pane. |
|
|
133
|
+
|
|
134
|
+
The selected row says, dimmed, what `Enter` does there: `↵ jump`, `↵ tmux`,
|
|
135
|
+
`↵ cards`, `↵ fold` or `↵ open`.
|
|
136
|
+
|
|
137
|
+
Chats without a tmux pane appear once a status feed reports them (see
|
|
138
|
+
[Optional integrations](#optional-integrations)). Selecting one shows its
|
|
139
|
+
last prompt and reply. `Enter` asks `y` or `n`, then reopens it in a new tmux
|
|
140
|
+
pane.
|
|
141
|
+
|
|
142
|
+
### Help, back and quit
|
|
143
|
+
|
|
144
|
+
| Key | Action |
|
|
145
|
+
| --- | --- |
|
|
146
|
+
| `?` | Help for the current page. |
|
|
147
|
+
| `s` | In Help, open Hook Setup for status feeds. |
|
|
148
|
+
| `Esc`, `b`, `Backspace`, `Delete` | Go back one level. On the main list this closes the preview. It never quits. |
|
|
149
|
+
| `q`, `Ctrl-C` | Quit. |
|
|
150
|
+
|
|
151
|
+
### Manage sessions
|
|
152
|
+
|
|
153
|
+
`m` lists every tmux session, with or without an agent in it.
|
|
154
|
+
|
|
155
|
+
| Key | Action |
|
|
156
|
+
| --- | --- |
|
|
157
|
+
| `↑` `k`, `↓` `j` | Select a session. The preview follows. |
|
|
158
|
+
| `Enter` | Jump to the session, or attach it. |
|
|
159
|
+
| `x` | Close the session after `y` or `n`. The dashboard's own session is protected. |
|
|
160
|
+
|
|
161
|
+
### Autometta views
|
|
162
|
+
|
|
163
|
+
These keys work once [Autometta](https://github.com/aw-pr/autometta-public)
|
|
164
|
+
is set up on the machine. Without it they do nothing, and the dashboard and
|
|
165
|
+
its Help leave them out.
|
|
166
|
+
|
|
167
|
+
| Key | Action |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| `r` | Runs: every run, live and finished. Press `r` again for the main list. |
|
|
170
|
+
| `a` | Alerts: outstanding escalations. Press `a` again for the main list. |
|
|
171
|
+
| `o` | Notices from Autometta. Press `o` again for the main list. |
|
|
172
|
+
| `Enter` on a run | Open its cards beneath it, like a tree. `Enter` again, `←` or `h` folds them away. |
|
|
173
|
+
| `Enter` on a card | Open the full card. Page with `PgUp`, `PgDn`, `Space`, `Ctrl-u`, `Ctrl-d`, `g` and `G`. |
|
|
174
|
+
| `v` on a card | Open the card read-only in nvim or vim, when either is installed. |
|
|
175
|
+
| `Enter`, `→` on a failure or alert | Show its detail below the list. `PgUp` and `PgDn` scroll it. `Esc` or `b` closes it and keeps the selection. |
|
|
176
|
+
|
|
177
|
+

|
|
178
|
+
|
|
179
|
+
- A run row ends with its stage's worker and verifier models. The one at
|
|
180
|
+
work is blue, with the percentage of its own token estimate spent so far.
|
|
181
|
+
- Each card shows its state with the main list's symbol and colour, and
|
|
182
|
+
reads `worker · in progress` while an agent works on it. The detail pane
|
|
183
|
+
below shows the selected card's objective, attempts and tokens.
|
|
184
|
+
- Below the live runs, under a Finished heading, the main list keeps the runs
|
|
185
|
+
that finished in the last 6 hours, newest first. Each row gives its repo,
|
|
186
|
+
whether it is done, failed or halted, its cards done, when it ended, how
|
|
187
|
+
long it took, the percentage of its token estimate used and its total
|
|
188
|
+
tokens. A narrow row drops the length, then the finish time, then the cards
|
|
189
|
+
done.
|
|
190
|
+
- The runs view (`r`) is that same Autometta section on a page of its own,
|
|
191
|
+
with every finished run where the main list keeps only the last 6 hours.
|
|
192
|
+
Its rows read and act exactly as they do on the main list, and it scrolls:
|
|
193
|
+
a `↓ N more` marker says how many rows lie below. Its Help explains each
|
|
194
|
+
column.
|
|
195
|
+
|
|
196
|
+
### Command line
|
|
197
|
+
|
|
198
|
+
| Command | Result |
|
|
199
|
+
| --- | --- |
|
|
200
|
+
| `cat-herdr` | The dashboard in a terminal, a plain table when piped. |
|
|
201
|
+
| `cat-herdr -w` | Watch the plain table in place. `q` quits. |
|
|
202
|
+
| `cat-herdr -a` | Also list tmux sessions with no agent in them. |
|
|
203
|
+
| `cat-herdr -b` | A one-line `working/total` count for a status bar. Prints nothing when no agent is running. |
|
|
204
|
+
| `cat-herdr --session-state NAME` | The state of the named session's active pane. |
|
|
205
|
+
| `cat-herdr config --check` | Validate your settings file. |
|
|
206
|
+
|
|
207
|
+
Stock tmux return keys apply inside the dashboard's own panes: prefix then
|
|
208
|
+
`d` to detach (the agent keeps running), prefix then `L` for the last
|
|
209
|
+
session, prefix then `l` for the last window, prefix then `;` for the last
|
|
210
|
+
pane. Check your own bindings with `tmux list-keys -T prefix`.
|
|
211
|
+
|
|
212
|
+
## Optional integrations
|
|
213
|
+
|
|
214
|
+
Cat Herdr works on its own. It finds agents by the foreground process of each
|
|
215
|
+
tmux pane and reads working or idle from the pane's screen. Three optional
|
|
216
|
+
sources add detail, and the dashboard stays quiet about any that are absent.
|
|
217
|
+
|
|
218
|
+
| Source | Adds | Set up |
|
|
219
|
+
| --- | --- | --- |
|
|
220
|
+
| Native adapters | Working and idle from the provider's own events for Claude Code, Codex, OpenCode and Pi, and reply and approve for Claude Code and OpenCode. | `cat-herdr hook-adapter PROVIDER` prints the adapter. See [docs/hooks.md](https://github.com/aw-pr/cat-herdr/blob/main/docs/hooks.md). |
|
|
221
|
+
| [cctop](https://github.com/st0012/cctop) | Session status from its maintained hooks for the same four providers, on macOS. | Install cctop, then press `?` and `s` in the dashboard. |
|
|
222
|
+
| [Autometta](https://github.com/aw-pr/autometta-public) | Runs, stage cards, alerts and notices for card runs that pair a worker with a verifier. | Nothing to configure: the views appear when Autometta's home directory exists. Reading its state needs [`yq`](https://github.com/mikefarah/yq) version 4 on your PATH, not the Debian and Ubuntu package of the same name. |
|
|
223
|
+
|
|
224
|
+
[docs/hooks.md](https://github.com/aw-pr/cat-herdr/blob/main/docs/hooks.md) has setup, confirmation and repair steps per
|
|
225
|
+
provider. To switch cctop or Autometta off, see the configuration guide below.
|
|
226
|
+
|
|
227
|
+
## Known limitations
|
|
228
|
+
|
|
229
|
+
- **State comes from the screen.** Without a status feed, Cat Herdr knows
|
|
230
|
+
working and idle only, and an unfamiliar prompt reads `?`.
|
|
231
|
+
- **Pi on Linux.** When Pi runs under Node, Cat Herdr finds it only through
|
|
232
|
+
cctop, which is macOS-only, so on Linux it may be missing from the list.
|
|
233
|
+
- **Model column.** The plain table's MODEL column reads `-` in this release.
|
|
234
|
+
- **Installers.** Homebrew and uv are the tested routes. pipx and pip are not
|
|
235
|
+
yet verified.
|
|
236
|
+
|
|
237
|
+
## Configure or contribute
|
|
238
|
+
|
|
239
|
+
Use [the configuration guide](https://github.com/aw-pr/cat-herdr/blob/main/docs/ai-configuration.md) to change dashboard
|
|
240
|
+
settings or ask an assistant to configure your install. Run
|
|
241
|
+
`cat-herdr config --help` for the file location and validation command.
|
|
242
|
+
|
|
243
|
+
Use [the contributor guide](https://github.com/aw-pr/cat-herdr/blob/main/CONTRIBUTING.md) to change the source, work in a
|
|
244
|
+
fork, or optionally submit a pull request upstream.
|
|
245
|
+
|
|
246
|
+
## Uninstall
|
|
247
|
+
|
|
248
|
+
Run this while the package is still installed. It removes the sibling
|
|
249
|
+
`ch` symlink only when its stored target is the installed launcher path.
|
|
250
|
+
|
|
251
|
+
```
|
|
252
|
+
(
|
|
253
|
+
launcher=$(command -v cat-herdr) || exit 1
|
|
254
|
+
case "$launcher" in /*) ;; *) exit 1 ;; esac
|
|
255
|
+
[ -f "$launcher" ] && [ -x "$launcher" ] || exit 1
|
|
256
|
+
shortcut="${launcher%/*}/ch"
|
|
257
|
+
if [ -L "$shortcut" ] && [ "$(readlink "$shortcut")" = "$launcher" ]; then
|
|
258
|
+
rm "$shortcut"
|
|
259
|
+
fi
|
|
260
|
+
)
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Then run `brew uninstall cat-herdr` or `uv tool uninstall cat-herdr`,
|
|
264
|
+
depending on how you installed it. If you added the `cath` alias, remove its
|
|
265
|
+
line from your shell startup file.
|
|
266
|
+
|
|
267
|
+
## Licence
|
|
268
|
+
|
|
269
|
+
MIT. See [LICENSE](https://github.com/aw-pr/cat-herdr/blob/main/LICENSE).
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# Cat Herdr
|
|
2
|
+
|
|
3
|
+
<img src="https://raw.githubusercontent.com/aw-pr/cat-herdr/main/assets/lion-badge.png" width="96" height="96" alt="A gold lion on a midnight blue tile">
|
|
4
|
+
|
|
5
|
+
**Cat Herdr is a terminal dashboard that finds, watches and switches between
|
|
6
|
+
Claude Code and Codex sessions running in tmux.** This is a beta release.
|
|
7
|
+
|
|
8
|
+

|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
*The screenshots show demo sessions and a demo run.*
|
|
16
|
+
|
|
17
|
+
It needs tmux, Python 3.9 or newer, and macOS or Linux. Everything else is
|
|
18
|
+
optional.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
### Homebrew (macOS)
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
brew install aw-pr/cat-herdr/cat-herdr &&
|
|
26
|
+
cat-herdr install-shortcut --existing "$(command -v ch || true)"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Homebrew installs tmux for you. The second line is optional and safe to
|
|
30
|
+
repeat: it sets up the short `ch` command next to `cat-herdr` when the name
|
|
31
|
+
is free on your PATH, and otherwise warns once, leaves whatever is already
|
|
32
|
+
using `ch` untouched, and leaves `cat-herdr` working either way.
|
|
33
|
+
|
|
34
|
+
### uv (verified on Linux)
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
uv tool install cat-herdr &&
|
|
38
|
+
cat-herdr install-shortcut --existing "$(command -v ch || true)"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Install tmux through your system package manager. If your shell cannot find
|
|
42
|
+
`cat-herdr` afterwards, run `uv tool update-shell` and start a new shell.
|
|
43
|
+
|
|
44
|
+
To install from the repository instead of the package index, make the first
|
|
45
|
+
line `uv tool install git+https://github.com/aw-pr/cat-herdr &&`.
|
|
46
|
+
|
|
47
|
+
Other installers (pipx, pip) are not yet verified.
|
|
48
|
+
|
|
49
|
+
## First run
|
|
50
|
+
|
|
51
|
+
Check the install, start an agent in a tmux session, then open the dashboard:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
cat-herdr --version
|
|
55
|
+
tmux new -d -s web claude # or codex
|
|
56
|
+
cat-herdr
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Press `Enter` to jump into the session. From a plain terminal, tmux's prefix
|
|
60
|
+
then `d` (`Ctrl-b` `d` by default) brings you back and leaves the agent
|
|
61
|
+
running. Press `?` for the keys and `q` to quit.
|
|
62
|
+
|
|
63
|
+
With no agent running, the dashboard says so and waits. It refreshes every
|
|
64
|
+
two seconds. If tmux is not installed, `cat-herdr` tells you.
|
|
65
|
+
|
|
66
|
+
The canonical command is always `cat-herdr`. If `install-shortcut` set up
|
|
67
|
+
`ch` for you, either name opens the dashboard. If you'd rather type `cath`,
|
|
68
|
+
or `ch` was already taken on your machine, add your own alias instead:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
# zsh
|
|
72
|
+
command -v cath >/dev/null || printf '%s\n' "alias cath='cat-herdr'" >> ~/.zshrc
|
|
73
|
+
# Bash
|
|
74
|
+
command -v cath >/dev/null || printf '%s\n' "alias cath='cat-herdr'" >> ~/.bashrc
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Start a new shell (or `source ~/.zshrc` / `source ~/.bashrc`) to pick it up.
|
|
78
|
+
|
|
79
|
+
Run `cat-herdr -h` for the full option list, or `man cat-herdr` for the
|
|
80
|
+
installed manual. With uv, if `man cat-herdr` can't find the page, point
|
|
81
|
+
`MANPATH` at the tool's venv and keep your normal manuals too:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
MANPATH="$(uv tool dir)/cat-herdr/share/man:${MANPATH-}" man cat-herdr
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Controls
|
|
88
|
+
|
|
89
|
+
With no arguments, `cat-herdr` opens the dashboard in a terminal, or prints a
|
|
90
|
+
plain table when piped. Press `?` on any page for the keys that page answers.
|
|
91
|
+
The tables below list the same keys.
|
|
92
|
+
|
|
93
|
+
### Move
|
|
94
|
+
|
|
95
|
+
| Key | Action |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `↑` `k`, `↓` `j` | Move the selection. The first `↓` on the top row opens its preview. |
|
|
98
|
+
| `3j`, `3↓` | Type a count before a move to repeat it, as in vim. Works in every list, in Help and in a full card. |
|
|
99
|
+
| `g`, `G` | First or last row. `5G` goes to row five. |
|
|
100
|
+
| `H`, `M`, `L` | Top, middle or bottom row on screen. |
|
|
101
|
+
| `Ctrl-u`, `Ctrl-d` | Half a screen up or down. |
|
|
102
|
+
| `PgUp`, `PgDn` | A whole screen up or down. |
|
|
103
|
+
| Click | Select a row and act on it as `Enter` does. On a card, a click only selects. A click on a view name in the top line opens that view. |
|
|
104
|
+
|
|
105
|
+
### Act on the selected chat
|
|
106
|
+
|
|
107
|
+
| Key | Action |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `Enter` | Jump to the chat's tmux pane. |
|
|
110
|
+
| `→` `l`, `←` `h` | Show or hide the live tmux preview. |
|
|
111
|
+
| `n` | Open the chat in a new split beside the dashboard. |
|
|
112
|
+
| `m` | Manage tmux sessions, starting on the chat's session. |
|
|
113
|
+
| `u` | Show or hide chats without a tmux pane. |
|
|
114
|
+
|
|
115
|
+
The selected row says, dimmed, what `Enter` does there: `↵ jump`, `↵ tmux`,
|
|
116
|
+
`↵ cards`, `↵ fold` or `↵ open`.
|
|
117
|
+
|
|
118
|
+
Chats without a tmux pane appear once a status feed reports them (see
|
|
119
|
+
[Optional integrations](#optional-integrations)). Selecting one shows its
|
|
120
|
+
last prompt and reply. `Enter` asks `y` or `n`, then reopens it in a new tmux
|
|
121
|
+
pane.
|
|
122
|
+
|
|
123
|
+
### Help, back and quit
|
|
124
|
+
|
|
125
|
+
| Key | Action |
|
|
126
|
+
| --- | --- |
|
|
127
|
+
| `?` | Help for the current page. |
|
|
128
|
+
| `s` | In Help, open Hook Setup for status feeds. |
|
|
129
|
+
| `Esc`, `b`, `Backspace`, `Delete` | Go back one level. On the main list this closes the preview. It never quits. |
|
|
130
|
+
| `q`, `Ctrl-C` | Quit. |
|
|
131
|
+
|
|
132
|
+
### Manage sessions
|
|
133
|
+
|
|
134
|
+
`m` lists every tmux session, with or without an agent in it.
|
|
135
|
+
|
|
136
|
+
| Key | Action |
|
|
137
|
+
| --- | --- |
|
|
138
|
+
| `↑` `k`, `↓` `j` | Select a session. The preview follows. |
|
|
139
|
+
| `Enter` | Jump to the session, or attach it. |
|
|
140
|
+
| `x` | Close the session after `y` or `n`. The dashboard's own session is protected. |
|
|
141
|
+
|
|
142
|
+
### Autometta views
|
|
143
|
+
|
|
144
|
+
These keys work once [Autometta](https://github.com/aw-pr/autometta-public)
|
|
145
|
+
is set up on the machine. Without it they do nothing, and the dashboard and
|
|
146
|
+
its Help leave them out.
|
|
147
|
+
|
|
148
|
+
| Key | Action |
|
|
149
|
+
| --- | --- |
|
|
150
|
+
| `r` | Runs: every run, live and finished. Press `r` again for the main list. |
|
|
151
|
+
| `a` | Alerts: outstanding escalations. Press `a` again for the main list. |
|
|
152
|
+
| `o` | Notices from Autometta. Press `o` again for the main list. |
|
|
153
|
+
| `Enter` on a run | Open its cards beneath it, like a tree. `Enter` again, `←` or `h` folds them away. |
|
|
154
|
+
| `Enter` on a card | Open the full card. Page with `PgUp`, `PgDn`, `Space`, `Ctrl-u`, `Ctrl-d`, `g` and `G`. |
|
|
155
|
+
| `v` on a card | Open the card read-only in nvim or vim, when either is installed. |
|
|
156
|
+
| `Enter`, `→` on a failure or alert | Show its detail below the list. `PgUp` and `PgDn` scroll it. `Esc` or `b` closes it and keeps the selection. |
|
|
157
|
+
|
|
158
|
+

|
|
159
|
+
|
|
160
|
+
- A run row ends with its stage's worker and verifier models. The one at
|
|
161
|
+
work is blue, with the percentage of its own token estimate spent so far.
|
|
162
|
+
- Each card shows its state with the main list's symbol and colour, and
|
|
163
|
+
reads `worker · in progress` while an agent works on it. The detail pane
|
|
164
|
+
below shows the selected card's objective, attempts and tokens.
|
|
165
|
+
- Below the live runs, under a Finished heading, the main list keeps the runs
|
|
166
|
+
that finished in the last 6 hours, newest first. Each row gives its repo,
|
|
167
|
+
whether it is done, failed or halted, its cards done, when it ended, how
|
|
168
|
+
long it took, the percentage of its token estimate used and its total
|
|
169
|
+
tokens. A narrow row drops the length, then the finish time, then the cards
|
|
170
|
+
done.
|
|
171
|
+
- The runs view (`r`) is that same Autometta section on a page of its own,
|
|
172
|
+
with every finished run where the main list keeps only the last 6 hours.
|
|
173
|
+
Its rows read and act exactly as they do on the main list, and it scrolls:
|
|
174
|
+
a `↓ N more` marker says how many rows lie below. Its Help explains each
|
|
175
|
+
column.
|
|
176
|
+
|
|
177
|
+
### Command line
|
|
178
|
+
|
|
179
|
+
| Command | Result |
|
|
180
|
+
| --- | --- |
|
|
181
|
+
| `cat-herdr` | The dashboard in a terminal, a plain table when piped. |
|
|
182
|
+
| `cat-herdr -w` | Watch the plain table in place. `q` quits. |
|
|
183
|
+
| `cat-herdr -a` | Also list tmux sessions with no agent in them. |
|
|
184
|
+
| `cat-herdr -b` | A one-line `working/total` count for a status bar. Prints nothing when no agent is running. |
|
|
185
|
+
| `cat-herdr --session-state NAME` | The state of the named session's active pane. |
|
|
186
|
+
| `cat-herdr config --check` | Validate your settings file. |
|
|
187
|
+
|
|
188
|
+
Stock tmux return keys apply inside the dashboard's own panes: prefix then
|
|
189
|
+
`d` to detach (the agent keeps running), prefix then `L` for the last
|
|
190
|
+
session, prefix then `l` for the last window, prefix then `;` for the last
|
|
191
|
+
pane. Check your own bindings with `tmux list-keys -T prefix`.
|
|
192
|
+
|
|
193
|
+
## Optional integrations
|
|
194
|
+
|
|
195
|
+
Cat Herdr works on its own. It finds agents by the foreground process of each
|
|
196
|
+
tmux pane and reads working or idle from the pane's screen. Three optional
|
|
197
|
+
sources add detail, and the dashboard stays quiet about any that are absent.
|
|
198
|
+
|
|
199
|
+
| Source | Adds | Set up |
|
|
200
|
+
| --- | --- | --- |
|
|
201
|
+
| Native adapters | Working and idle from the provider's own events for Claude Code, Codex, OpenCode and Pi, and reply and approve for Claude Code and OpenCode. | `cat-herdr hook-adapter PROVIDER` prints the adapter. See [docs/hooks.md](https://github.com/aw-pr/cat-herdr/blob/main/docs/hooks.md). |
|
|
202
|
+
| [cctop](https://github.com/st0012/cctop) | Session status from its maintained hooks for the same four providers, on macOS. | Install cctop, then press `?` and `s` in the dashboard. |
|
|
203
|
+
| [Autometta](https://github.com/aw-pr/autometta-public) | Runs, stage cards, alerts and notices for card runs that pair a worker with a verifier. | Nothing to configure: the views appear when Autometta's home directory exists. Reading its state needs [`yq`](https://github.com/mikefarah/yq) version 4 on your PATH, not the Debian and Ubuntu package of the same name. |
|
|
204
|
+
|
|
205
|
+
[docs/hooks.md](https://github.com/aw-pr/cat-herdr/blob/main/docs/hooks.md) has setup, confirmation and repair steps per
|
|
206
|
+
provider. To switch cctop or Autometta off, see the configuration guide below.
|
|
207
|
+
|
|
208
|
+
## Known limitations
|
|
209
|
+
|
|
210
|
+
- **State comes from the screen.** Without a status feed, Cat Herdr knows
|
|
211
|
+
working and idle only, and an unfamiliar prompt reads `?`.
|
|
212
|
+
- **Pi on Linux.** When Pi runs under Node, Cat Herdr finds it only through
|
|
213
|
+
cctop, which is macOS-only, so on Linux it may be missing from the list.
|
|
214
|
+
- **Model column.** The plain table's MODEL column reads `-` in this release.
|
|
215
|
+
- **Installers.** Homebrew and uv are the tested routes. pipx and pip are not
|
|
216
|
+
yet verified.
|
|
217
|
+
|
|
218
|
+
## Configure or contribute
|
|
219
|
+
|
|
220
|
+
Use [the configuration guide](https://github.com/aw-pr/cat-herdr/blob/main/docs/ai-configuration.md) to change dashboard
|
|
221
|
+
settings or ask an assistant to configure your install. Run
|
|
222
|
+
`cat-herdr config --help` for the file location and validation command.
|
|
223
|
+
|
|
224
|
+
Use [the contributor guide](https://github.com/aw-pr/cat-herdr/blob/main/CONTRIBUTING.md) to change the source, work in a
|
|
225
|
+
fork, or optionally submit a pull request upstream.
|
|
226
|
+
|
|
227
|
+
## Uninstall
|
|
228
|
+
|
|
229
|
+
Run this while the package is still installed. It removes the sibling
|
|
230
|
+
`ch` symlink only when its stored target is the installed launcher path.
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
(
|
|
234
|
+
launcher=$(command -v cat-herdr) || exit 1
|
|
235
|
+
case "$launcher" in /*) ;; *) exit 1 ;; esac
|
|
236
|
+
[ -f "$launcher" ] && [ -x "$launcher" ] || exit 1
|
|
237
|
+
shortcut="${launcher%/*}/ch"
|
|
238
|
+
if [ -L "$shortcut" ] && [ "$(readlink "$shortcut")" = "$launcher" ]; then
|
|
239
|
+
rm "$shortcut"
|
|
240
|
+
fi
|
|
241
|
+
)
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
Then run `brew uninstall cat-herdr` or `uv tool uninstall cat-herdr`,
|
|
245
|
+
depending on how you installed it. If you added the `cath` alias, remove its
|
|
246
|
+
line from your shell startup file.
|
|
247
|
+
|
|
248
|
+
## Licence
|
|
249
|
+
|
|
250
|
+
MIT. See [LICENSE](https://github.com/aw-pr/cat-herdr/blob/main/LICENSE).
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Configure an installed Cat Herdr
|
|
2
|
+
|
|
3
|
+
Edit `$XDG_CONFIG_HOME/cat-herdr/config.toml` when `XDG_CONFIG_HOME` is an
|
|
4
|
+
absolute path. If the variable is unset, empty or relative, use
|
|
5
|
+
`~/.config/cat-herdr/config.toml`. The dashboard reads the file at startup.
|
|
6
|
+
Each setting is optional. If the file is missing, Cat Herdr uses the defaults
|
|
7
|
+
and leaves the config directory untouched.
|
|
8
|
+
|
|
9
|
+
```toml
|
|
10
|
+
[display]
|
|
11
|
+
preview = "open"
|
|
12
|
+
|
|
13
|
+
[integrations]
|
|
14
|
+
cctop = false
|
|
15
|
+
autometta = false
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- `display.preview` defaults to `"hidden"`. `"open"` shows the preview as soon
|
|
19
|
+
as a selected pane and enough space are available. Use Right or `l` to open
|
|
20
|
+
it and Left or `h` to hide it for the current dashboard session.
|
|
21
|
+
- `integrations.cctop` defaults to `true`. Set it to `false` to skip cctop and
|
|
22
|
+
keep live tmux discovery.
|
|
23
|
+
- `integrations.autometta` defaults to `true`. Set it to `false` to hide Runs
|
|
24
|
+
and Alerts and show any live agent panes in the Agents list. With the
|
|
25
|
+
defaults, absent integrations stay quiet.
|
|
26
|
+
|
|
27
|
+
Run `cat-herdr config --check` after an edit. The checker prints the file path
|
|
28
|
+
and reports invalid TOML or unsupported settings without rewriting the file.
|
|
29
|
+
Fix any error it reports before starting the dashboard.
|
|
30
|
+
|
|
31
|
+
## Try a setting in isolation
|
|
32
|
+
|
|
33
|
+
With Cat Herdr already installed, run this in a terminal with a live agent pane
|
|
34
|
+
available to preview. Quit the dashboard with `q`.
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
scratch=$(mktemp -d) || exit 1
|
|
38
|
+
(
|
|
39
|
+
trap 'rm -r "$scratch"' EXIT
|
|
40
|
+
export XDG_CONFIG_HOME="$scratch"
|
|
41
|
+
mkdir -p "$XDG_CONFIG_HOME/cat-herdr"
|
|
42
|
+
cat > "$XDG_CONFIG_HOME/cat-herdr/config.toml" <<'TOML'
|
|
43
|
+
[display]
|
|
44
|
+
preview = "open"
|
|
45
|
+
TOML
|
|
46
|
+
cat-herdr config --check && cat-herdr
|
|
47
|
+
)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Prompt for your assistant
|
|
51
|
+
|
|
52
|
+
> Open the Cat Herdr preview by default. Edit only my Cat Herdr user
|
|
53
|
+
> `config.toml`, preserving my other settings, and run
|
|
54
|
+
> `cat-herdr config --check`. This only needs user settings access. Leave the
|
|
55
|
+
> source checkout, provider settings and installation alone.
|
|
56
|
+
|
|
57
|
+
To change Cat Herdr itself, follow the [source contribution guide](../CONTRIBUTING.md).
|
|
58
|
+
If your change could help other users, consider an upstream pull request.
|