agenthud 0.8.5 → 0.9.0

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 CHANGED
@@ -16,7 +16,7 @@ Requires Node.js 20+.
16
16
  npx agenthud
17
17
  ```
18
18
 
19
- Run this in a separate terminal while using Claude Code.
19
+ Run this in a separate terminal while using Claude Code. Press `?` inside the TUI any time for in-app help.
20
20
 
21
21
  ## What it shows
22
22
 
@@ -24,29 +24,35 @@ AgentHUD reads Claude Code's session files from `~/.claude/projects/` and displa
24
24
 
25
25
  ```
26
26
  ┌─ Sessions ──────────────────────────────────────────────┐
27
- │ > agenthud
28
- sub-agent: code-reviewer
29
- myproject
30
- dotfiles
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 │
31
34
  └─────────────────────────────────────────────────────────┘
32
35
  ┌─ Activity · agenthud ───────────────────────────────────┐
33
- │ [10:23:45] ○ Read src/ui/App.tsx
34
- │ [10:23:46] ~ Edit src/ui/App.tsx
35
- │ [10:23:47] $ Bash npm test
36
- │ [10:23:50] < Response Tests passed successfully
37
- │ [10:23:51] Thinking Analyzing the test results...
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
38
41
  └─────────────────────────────────────────────────────────┘
39
42
  ```
40
43
 
41
44
  **Session tree (top pane)**
42
- - All Claude Code sessions across all projects
43
- - Sub-agents shown nested under their parent session
44
- - Live indicator on currently active session
45
+ - Sessions grouped under their project (project name + path at the top).
46
+ - Session rows show short ID + first user prompt (the session's "topic").
47
+ - Non-interactive sessions (from `claude -p`, SDK, `agenthud summary`) appear in parens and dimmed.
48
+ - Sub-agents nest one level deeper under their parent session.
49
+ - Cold projects collapse under `... N cold projects` at the bottom (press Enter on the line to expand).
50
+ - Press `h` to hide a project, session, or sub-agent (saved to `~/.agenthud/state.yaml`).
45
51
 
46
52
  **Activity viewer (bottom pane)**
47
- - Real-time activity feed for the selected session
48
- - File reads, edits, bash commands, responses, thinking blocks
49
- - Automatically tails the live session; press `g` to scroll back to top
53
+ - Real-time feed for the selected session: file reads, edits, bash, responses, thinking, git commits.
54
+ - 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`.
50
56
 
51
57
  ## Activity types
52
58
 
@@ -61,61 +67,66 @@ AgentHUD reads Claude Code's session files from `~/.claude/projects/` and displa
61
67
  | `<` | Response | Claude's text response |
62
68
  | `>` | User | Your message |
63
69
  | `…` | Thinking | Claude's thinking (requires `showThinkingSummaries: true`) |
70
+ | `◆` | Commit | Git commit in the project (when `--with-git` or in viewer) |
64
71
 
65
72
  ## Keyboard shortcuts
66
73
 
74
+ Full reference is also available inside the app — press `?`.
75
+
67
76
  ### Session tree focus
68
77
 
69
78
  | Key | Action |
70
79
  |-----|--------|
71
- | `↑` / `k` | Select previous session |
72
- | `↓` / `j` | Select next session |
73
- | `↵` | Expand / collapse sub-agents |
74
- | `h` | Hide session or sub-agent |
75
- | `Tab` | Switch to activity viewer |
80
+ | `↑` / `k` | Move up |
81
+ | `↓` / `j` | Move down |
82
+ | `↵` | Expand/collapse project, session, or sub-agent summary |
83
+ | `h` | Hide selected (project / session / sub-agent) |
84
+ | `Tab` | Switch focus to activity viewer |
76
85
  | `PgUp` / `Ctrl+B` | Page up |
77
86
  | `PgDn` / `Ctrl+F` | Page down |
78
- | `r` | Refresh |
87
+ | `r` | Refresh now |
88
+ | `?` | Help |
79
89
  | `q` | Quit |
80
90
 
81
91
  ### Activity viewer focus
82
92
 
83
93
  | Key | Action |
84
94
  |-----|--------|
85
- | `↑` / `k` | Scroll up |
86
- | `↓` / `j` | Scroll down |
87
- | `g` | Jump to top |
88
- | `G` | Jump to bottom (live) |
89
- | `↵` | Open detail view |
90
- | `s` | Save log to `~/.agenthud/logs/` |
91
- | `Tab` | Switch to session tree |
95
+ | `↑` / `k` | Scroll one line up |
96
+ | `↓` / `j` | Scroll one line down |
92
97
  | `PgUp` / `Ctrl+B` | Page up |
93
98
  | `PgDn` / `Ctrl+F` | Page down |
94
- | `Ctrl+U` | Half page up |
95
- | `Ctrl+D` | Half page down |
99
+ | `Ctrl+U` / `Ctrl+D` | Half page up / down |
100
+ | `g` | Jump to live (newest) |
101
+ | `G` | Jump to oldest |
102
+ | `↵` | Open detail view |
103
+ | `f` | Cycle filter preset |
104
+ | `s` | Save log to `~/.agenthud/logs/` |
105
+ | `Tab` | Switch focus to session tree |
106
+ | `?` | Help |
96
107
  | `q` | Quit |
97
108
 
98
- ### Detail view (full content)
99
-
100
- Press `↵` on any activity to open a scrollable full-content view.
109
+ ### Detail view
101
110
 
102
111
  | Key | Action |
103
112
  |-----|--------|
104
- | `↑` / `k` | Scroll up |
105
- | `↓` / `j` | Scroll down |
113
+ | `↑` / `k` / `↓` / `j` | Scroll |
106
114
  | `↵` / `Esc` / `q` | Close |
107
115
 
108
116
  ## Report
109
117
 
110
- Print a Markdown summary of all activity on a given date, suitable for piping to scripts or LLMs:
118
+ Print activity for a date in Markdown or JSON suitable for piping to scripts or LLMs:
111
119
 
112
120
  ```bash
113
- agenthud report # today
114
- agenthud report --date 2026-05-14 # specific date
115
- agenthud report --date today --include all # all activity types
121
+ agenthud report # today (Markdown)
122
+ agenthud report --date 2026-05-14 # specific date
123
+ agenthud report --date today --include all # all activity types
124
+ agenthud report --format json # JSON output
125
+ agenthud report --detail-limit 0 # no truncation (full text)
126
+ agenthud report --with-git # merge git commits into timeline
116
127
  ```
117
128
 
118
- Output is written to stdout in Markdown format:
129
+ Output:
119
130
 
120
131
  ```
121
132
  # AgentHUD Report: 2026-05-14
@@ -125,43 +136,69 @@ Output is written to stdout in Markdown format:
125
136
  [10:23] $ npm test
126
137
  [10:35] ~ src/ui/App.tsx
127
138
  [11:15] < Added spinner hook to make the UI feel alive.
139
+ [14:30] ◆ abc1234 feat: fix auth callback
128
140
  ```
129
141
 
130
- **`--include` types:** `response`, `bash`, `edit`, `thinking`, `read`, `glob`, `user`
131
- Default: `response,bash,edit,thinking`
142
+ **Options:**
143
+
144
+ | Flag | Default | Description |
145
+ |------|---------|-------------|
146
+ | `--date` | today | `YYYY-MM-DD` or `today` (local date) |
147
+ | `--include` | `response,bash,edit,thinking` | Comma-separated types or `all` |
148
+ | `--format` | `markdown` | `markdown` or `json` |
149
+ | `--detail-limit` | `120` | Max chars per detail field; `0` = unlimited |
150
+ | `--with-git` | off | Merge git commits from each session's project into the timeline |
151
+
152
+ `--include` types: `response`, `bash`, `edit`, `thinking`, `read`, `glob`, `user`
132
153
 
133
154
  ## Summary
134
155
 
135
156
  Generate an LLM-based summary of a day's activity using the `claude` CLI:
136
157
 
137
158
  ```bash
138
- agenthud summary # today
139
- agenthud summary --date 2026-05-14 # past date (cached on second run)
140
- agenthud summary --date 2026-05-14 --force # ignore cache
141
- agenthud summary --prompt "커밋만 요약해" # override prompt
159
+ agenthud summary # today (always regenerated)
160
+ agenthud summary --date 2026-05-14 # past date (cached on second run)
161
+ agenthud summary --date 2026-05-14 --force # ignore cache
162
+ agenthud summary --prompt "Only commits" # override prompt
142
163
  ```
143
164
 
144
- Results are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cached and returned instantly on re-run. Today's date is always regenerated since activity is still growing.
165
+ Results are saved to `~/.agenthud/summaries/YYYY-MM-DD.md`. Past dates are cached and returned instantly on re-run. Today is always regenerated (activity still growing).
145
166
 
146
- **Prompt customization:** The summary uses `~/.agenthud/summary-prompt.md`, which is auto-created from a built-in template on first run. Edit it freely or override per-call with `--prompt`.
167
+ **Prompt customization:** The summary uses `~/.agenthud/summary-prompt.md`, auto-created from a built-in template on first run. Edit it freely or override per-call with `--prompt`.
147
168
 
148
- **Requires:** [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed and authenticated (`npm i -g @anthropic-ai/claude-code`).
169
+ **Requires:** [`@anthropic-ai/claude-code`](https://www.npmjs.com/package/@anthropic-ai/claude-code) installed and authenticated.
149
170
 
150
171
  ## Configuration
151
172
 
152
- Optional. Create `~/.agenthud/config.yaml`:
173
+ `~/.agenthud/config.yaml` is auto-created on first run with sensible defaults. Edit it freely:
153
174
 
154
175
  ```yaml
155
- refreshInterval: 2s # How often to poll for updates (default: 2s)
156
- logDir: ~/.agenthud/logs # Where to save logs with 's' key
157
-
158
- # Sessions/sub-agents to hide from the tree
159
- hiddenSessions:
160
- - old-project
161
- hiddenSubAgents:
162
- - code-reviewer
176
+ # How often to poll for activity updates (Linux fallback when fs.watch isn't used)
177
+ refreshInterval: 2s
178
+
179
+ # Where 's' key saves activity logs
180
+ logDir: ~/.agenthud/logs
181
+
182
+ # Activity filter presets (cycle with 'f' key in viewer)
183
+ # Each list is one preset; [] means "all". First preset is the default.
184
+ filterPresets:
185
+ - []
186
+ - ["response"]
187
+ - ["commit"]
163
188
  ```
164
189
 
190
+ App-managed state (hidden items) lives separately in `~/.agenthud/state.yaml` so your config file stays clean. You shouldn't need to edit it manually — use `h` in the TUI to hide things.
191
+
192
+ ## Files
193
+
194
+ | Path | Purpose |
195
+ |------|---------|
196
+ | `~/.agenthud/config.yaml` | User settings (edit freely) |
197
+ | `~/.agenthud/state.yaml` | Hidden projects/sessions/sub-agents (app-managed) |
198
+ | `~/.agenthud/summary-prompt.md` | LLM prompt template for `summary` |
199
+ | `~/.agenthud/summaries/` | Cached daily summaries |
200
+ | `~/.agenthud/logs/` | Saved activity logs (`s` key) |
201
+
165
202
  ## Environment Variables
166
203
 
167
204
  | Variable | Default | Description |
package/dist/index.js CHANGED
@@ -15,4 +15,4 @@ Error: Node.js ${MIN_NODE_VERSION}+ is required (current: ${process.version})
15
15
  process.exit(1);
16
16
  }
17
17
  if (!process.env.NODE_ENV) process.env.NODE_ENV = "production";
18
- import("./main-LOBTW45O.js");
18
+ import("./main-NHQJ23YJ.js");