agenthud 0.9.2 → 0.9.4
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.
- package/README.md +64 -34
- package/dist/index.js +1 -1
- package/dist/{main-6SGKXL7E.js → main-26QL33AJ.js} +472 -179
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,10 +4,16 @@
|
|
|
4
4
|
[](https://github.com/neochoon/agenthud/actions/workflows/ci.yml)
|
|
5
5
|
[](https://codecov.io/gh/neochoon/agenthud)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
An observability layer for [Claude Code](https://github.com/anthropics/claude-code). **See** your live sessions, **export** structured activity logs, and **summarize** a day or a week into an LLM digest — all from one CLI.
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
+
AgentHUD reads Claude Code's session files from `~/.claude/projects/` and gives you three things:
|
|
12
|
+
|
|
13
|
+
- **Live monitor** ([`agenthud`](#live-monitor)) — a split-view TUI showing every project, session, sub-agent, and activity as it happens.
|
|
14
|
+
- **Structured export** ([`agenthud report`](#report)) — print activity for any date as Markdown or JSON for piping to scripts, dashboards, or other LLMs.
|
|
15
|
+
- **LLM digest** ([`agenthud summary`](#summary)) — synthesize a day or a date range into an engineering summary via the `claude` CLI, with caching so weekly digests are cheap to regenerate.
|
|
16
|
+
|
|
11
17
|
## Install
|
|
12
18
|
|
|
13
19
|
Requires Node.js 20+.
|
|
@@ -18,43 +24,46 @@ npx agenthud
|
|
|
18
24
|
|
|
19
25
|
Run this in a separate terminal while using Claude Code. Press `?` inside the TUI any time for in-app help.
|
|
20
26
|
|
|
21
|
-
##
|
|
27
|
+
## Live monitor
|
|
22
28
|
|
|
23
|
-
AgentHUD
|
|
29
|
+
AgentHUD's TUI splits the screen into a project tree and an activity viewer:
|
|
24
30
|
|
|
25
31
|
```
|
|
26
|
-
┌─ Projects
|
|
27
|
-
│ > agenthud ~/WestbrookAI/agenthud
|
|
28
|
-
│ #864f [hot] Fix the auth bug in login flow
|
|
29
|
-
│ ├─ » code-reviewer
|
|
30
|
-
│ (#398c [warm])
|
|
31
|
-
│ myproject ~/work/myproject
|
|
32
|
-
│ #def4 [hot] Add OAuth support
|
|
33
|
-
│ ... 12 cold projects
|
|
34
|
-
|
|
35
|
-
┌─ Activity · agenthud
|
|
36
|
-
│ [10:23] ○ Read src/ui/App.tsx
|
|
37
|
-
│ [10:23] ~ Edit src/ui/App.tsx
|
|
38
|
-
│ [10:23] $ Bash npm test
|
|
39
|
-
│ [10:23] < Response Tests passed successfully
|
|
40
|
-
│ [10:25] ◆ abc1234 feat: fix auth callback
|
|
41
|
-
|
|
32
|
+
┌─ Projects ───────────────────────────────────────────────┐
|
|
33
|
+
│ > agenthud ~/WestbrookAI/agenthud 13m │
|
|
34
|
+
│ #864f [hot] Fix the auth bug in login flow │
|
|
35
|
+
│ ├─ » code-reviewer │
|
|
36
|
+
│ (#398c [warm]) │
|
|
37
|
+
│ myproject ~/work/myproject 2d │
|
|
38
|
+
│ #def4 [hot] Add OAuth support │
|
|
39
|
+
│ ... 12 cold projects │
|
|
40
|
+
└──────────────────────────────────────────────────────────┘
|
|
41
|
+
┌─ Activity · agenthud ────────────────────────────────────┐
|
|
42
|
+
│ [10:23] ○ Read src/ui/App.tsx │
|
|
43
|
+
│ [10:23] ~ Edit src/ui/App.tsx │
|
|
44
|
+
│ [10:23] $ Bash npm test │
|
|
45
|
+
│ [10:23] < Response Tests passed successfully │
|
|
46
|
+
│ [10:25] ◆ abc1234 feat: fix auth callback │
|
|
47
|
+
│ › │
|
|
48
|
+
└──────────────────────────────────────────────────────────┘
|
|
42
49
|
```
|
|
43
50
|
|
|
44
51
|
**Project tree (top pane)**
|
|
45
52
|
- Sessions grouped under their project (project name + path at the top).
|
|
46
|
-
- Session rows show short ID + first user prompt (the session's "topic").
|
|
53
|
+
- Session rows show short ID + first user prompt (the session's "topic"). Long titles truncate with a `…` suffix.
|
|
54
|
+
- Right edge of each row shows how long ago it was last touched: `42m`, `17h`, `3d`, `2w`, `1mo`, `1y`. Project rows use the most recent session's mtime.
|
|
47
55
|
- Non-interactive sessions (from `claude -p`, SDK, `agenthud summary`) appear in parens and dimmed.
|
|
48
56
|
- Sub-agents nest one level deeper under their parent session.
|
|
49
57
|
- Cold projects collapse under `... N cold projects` at the bottom (press Enter on the line to expand).
|
|
50
58
|
- Press `h` to hide a project, session, or sub-agent (saved to `~/.agenthud/state.yaml`).
|
|
51
59
|
|
|
52
60
|
**Activity viewer (bottom pane)**
|
|
53
|
-
- Real-time feed for the selected session: file reads, edits, bash, responses, thinking, git commits.
|
|
61
|
+
- Real-time feed for the selected session: file reads, edits, bash, responses, thinking, git commits. Newest at the bottom, like `tail -f`.
|
|
62
|
+
- A `›` slides left → right along the bottom row while the viewer is in LIVE mode — visible proof the feed is alive. Hidden when paused (scrolled into history) or when the session has no activity yet.
|
|
54
63
|
- Press `f` to cycle through filter presets (configurable).
|
|
55
|
-
- Press `↵` on any row to open a scrollable detail view; on a commit row this shows `git show --stat`.
|
|
64
|
+
- Press `↵` on any row to open a scrollable detail view; on a commit row this shows `git show --stat --patch`.
|
|
56
65
|
|
|
57
|
-
|
|
66
|
+
### Session status
|
|
58
67
|
|
|
59
68
|
Each session row carries a colored badge derived from when its JSONL file was last touched:
|
|
60
69
|
|
|
@@ -67,7 +76,7 @@ Each session row carries a colored badge derived from when its JSONL file was la
|
|
|
67
76
|
|
|
68
77
|
Sub-agents use the same scheme. Projects inherit the hottest status of their sessions; a project is treated as "cold" only when all its sessions are cold.
|
|
69
78
|
|
|
70
|
-
|
|
79
|
+
### Activity types
|
|
71
80
|
|
|
72
81
|
| Icon | Type | Description |
|
|
73
82
|
|------|------|-------------|
|
|
@@ -82,11 +91,11 @@ Sub-agents use the same scheme. Projects inherit the hottest status of their ses
|
|
|
82
91
|
| `…` | Thinking | Claude's thinking (requires `showThinkingSummaries: true`) |
|
|
83
92
|
| `◆` | Commit | Git commit in the project (when `--with-git` or in viewer) |
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
### Keyboard shortcuts
|
|
86
95
|
|
|
87
96
|
Full reference is also available inside the app — press `?`.
|
|
88
97
|
|
|
89
|
-
|
|
98
|
+
#### Project tree focus
|
|
90
99
|
|
|
91
100
|
| Key | Action |
|
|
92
101
|
|-----|--------|
|
|
@@ -101,7 +110,7 @@ Full reference is also available inside the app — press `?`.
|
|
|
101
110
|
| `?` | Help |
|
|
102
111
|
| `q` | Quit |
|
|
103
112
|
|
|
104
|
-
|
|
113
|
+
#### Activity viewer focus
|
|
105
114
|
|
|
106
115
|
| Key | Action |
|
|
107
116
|
|-----|--------|
|
|
@@ -110,21 +119,33 @@ Full reference is also available inside the app — press `?`.
|
|
|
110
119
|
| `PgUp` / `Ctrl+B` | Page up |
|
|
111
120
|
| `PgDn` / `Ctrl+F` | Page down |
|
|
112
121
|
| `Ctrl+U` / `Ctrl+D` | Half page up / down |
|
|
113
|
-
| `g` | Jump to
|
|
114
|
-
| `G` | Jump to
|
|
122
|
+
| `g` | Jump to top (oldest) |
|
|
123
|
+
| `G` | Jump to live (newest, bottom) |
|
|
115
124
|
| `↵` | Open detail view |
|
|
116
125
|
| `f` | Cycle filter preset |
|
|
126
|
+
| `r` | Refresh now |
|
|
117
127
|
| `Tab` | Switch focus to project tree |
|
|
118
128
|
| `?` | Help |
|
|
119
129
|
| `q` | Quit |
|
|
120
130
|
|
|
121
|
-
|
|
131
|
+
#### Detail view
|
|
122
132
|
|
|
123
133
|
| Key | Action |
|
|
124
134
|
|-----|--------|
|
|
125
135
|
| `↑` / `k` / `↓` / `j` | Scroll |
|
|
126
136
|
| `↵` / `Esc` / `q` | Close |
|
|
127
137
|
|
|
138
|
+
Detail view colors the content based on activity type:
|
|
139
|
+
|
|
140
|
+
- **Git commit detail** (`git show --stat --patch`): added lines green (`+`), removed lines red (`-`), hunk headers cyan (`@@ ... @@`), `commit/Author/Date/diff` metadata dimmed.
|
|
141
|
+
- **Response / thinking / prompt**: text inside triple-backtick code fences renders in cyan so the boundary between prose and code is obvious. No language-specific syntax highlighting — just code-vs-prose separation.
|
|
142
|
+
|
|
143
|
+
### Behavior
|
|
144
|
+
|
|
145
|
+
- **Alternate screen buffer.** Watch mode uses the alt-screen (like `vim`, `htop`, `btop`), so quitting (`q`) restores the pre-launch shell completely. No TUI residue, no "is it still running?" confusion.
|
|
146
|
+
- **Minimum terminal size.** 80 cols × 20 rows. Smaller terminals show a one-line hint and redraw automatically when you resize.
|
|
147
|
+
- **Help overlay scrolls.** Press `?` for an in-app reference. The overlay scrolls (`j/k`, `PgUp/PgDn`, `Ctrl+B/F`, `Space`, `g/G`) so the full content is reachable on shorter terminals.
|
|
148
|
+
|
|
128
149
|
## Report
|
|
129
150
|
|
|
130
151
|
Print activity for a date in Markdown or JSON — suitable for piping to scripts or LLMs:
|
|
@@ -155,7 +176,7 @@ Output:
|
|
|
155
176
|
|
|
156
177
|
| Flag | Default | Description |
|
|
157
178
|
|------|---------|-------------|
|
|
158
|
-
| `--date` | today | `YYYY-MM-DD` or `
|
|
179
|
+
| `--date` | today | `YYYY-MM-DD`, `today`, `yesterday`, or `-Nd` (N days ago, local date) |
|
|
159
180
|
| `--include` | `response,bash,edit,thinking` | Comma-separated types or `all` |
|
|
160
181
|
| `--format` | `markdown` | `markdown` or `json` |
|
|
161
182
|
| `--detail-limit` | `120` | Max chars per detail field; `0` = unlimited |
|
|
@@ -179,6 +200,10 @@ agenthud summary --prompt "Only commits" # override prompt
|
|
|
179
200
|
agenthud summary --last 7d # last 7 days, ending today
|
|
180
201
|
agenthud summary --from 2026-05-10 --to 2026-05-16 # explicit range
|
|
181
202
|
agenthud summary --last 7d -y # skip per-day confirmations
|
|
203
|
+
|
|
204
|
+
# Cheaper model — summarization doesn't need Opus-tier reasoning
|
|
205
|
+
agenthud summary --date today --model sonnet # ~40% cheaper than Opus
|
|
206
|
+
agenthud summary --last 7d --model haiku # ~80% cheaper, 200K context
|
|
182
207
|
```
|
|
183
208
|
|
|
184
209
|
**Daily summaries** are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cached and returned instantly; today is always regenerated (activity still growing).
|
|
@@ -191,6 +216,10 @@ Each missing daily prompts for confirmation just before generation, so you see c
|
|
|
191
216
|
|
|
192
217
|
**`--date` formats:** `YYYY-MM-DD`, `today`, `yesterday`, or `-Nd` (N days ago).
|
|
193
218
|
|
|
219
|
+
**Model selection:** Summarization is a low-reasoning task (structured input → structured markdown) — Sonnet or Haiku usually beats Opus on cost-per-summary with no quality loss. Pass `--model sonnet`, `--model haiku`, or a full model id (`--model claude-sonnet-4-6`). With no flag, `claude` uses its default model.
|
|
220
|
+
|
|
221
|
+
**Cost warning:** If the day's activity log is large (~300K tokens or more), AgentHUD prints a warning before sending and asks for one more confirmation in interactive mode. `-y` skips the prompt but still prints the warning.
|
|
222
|
+
|
|
194
223
|
**Requires:** [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed and authenticated.
|
|
195
224
|
|
|
196
225
|
## Configuration
|
|
@@ -202,10 +231,11 @@ Each missing daily prompts for confirmation just before generation, so you see c
|
|
|
202
231
|
refreshInterval: 2s
|
|
203
232
|
|
|
204
233
|
# Activity filter presets (cycle with 'f' key in viewer)
|
|
205
|
-
# Each list is one preset
|
|
234
|
+
# Each list is one preset. Use "all" (or "*") to show everything.
|
|
235
|
+
# Types: response, user, bash, edit, thinking, read, glob, commit
|
|
206
236
|
filterPresets:
|
|
207
|
-
- []
|
|
208
|
-
- ["response"]
|
|
237
|
+
- ["all"]
|
|
238
|
+
- ["response", "user"]
|
|
209
239
|
- ["commit"]
|
|
210
240
|
```
|
|
211
241
|
|
package/dist/index.js
CHANGED