agenthud 0.11.1 → 0.11.3

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/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-3J6HDPKN.js");
18
+ import("./main-PCPOGJO6.js");
@@ -19,7 +19,7 @@ var ALL_TYPES = [
19
19
  "glob",
20
20
  "user"
21
21
  ];
22
- var DEFAULT_TYPES = ["response", "bash", "edit", "thinking"];
22
+ var DEFAULT_TYPES = ["user", "response", "bash", "edit", "thinking"];
23
23
  var KNOWN_WATCH_FLAGS = /* @__PURE__ */ new Set([
24
24
  "-w",
25
25
  "--watch",
@@ -48,47 +48,62 @@ var KNOWN_SUMMARY_FLAGS = /* @__PURE__ */ new Set([
48
48
  "-y",
49
49
  "--yes"
50
50
  ]);
51
- var KNOWN_SUBCOMMANDS = /* @__PURE__ */ new Set(["report", "summary"]);
51
+ var KNOWN_SUBCOMMANDS = /* @__PURE__ */ new Set(["watch", "report", "summary"]);
52
52
  function getHelp() {
53
- return `Usage: agenthud [options]
53
+ return `Usage: agenthud [command] [options]
54
54
 
55
- Monitors all running Claude Code sessions in real-time.
56
-
57
- Options:
58
- -w, --watch Watch mode (default) \u2014 live updates
59
- --once Print once and exit
60
- --cwd Scope the view to the Claude project
61
- containing the current directory.
62
- Exits 1 if no such project is found.
63
- -V, --version Show version number
64
- -h, --help Show this help message
55
+ Monitors all running Claude Code sessions.
65
56
 
66
57
  Commands:
67
- report [--date DATE] [--include TYPES] [--format FORMAT] [--detail-limit N] [--with-git]
68
- Print activity report for a date (default: today)
58
+ watch (default) Live TUI \u2014 project tree on top, activity
59
+ viewer on bottom, both updating in real
60
+ time. Running \`agenthud\` with no
61
+ command does this.
62
+ -w, --watch Explicit alias for the default
63
+ --once Print one frame and exit
64
+ --cwd Scope to the Claude project containing
65
+ the current directory. Exits 1 if no
66
+ such project is found.
67
+
68
+ report [--date DATE] [--include TYPES] [--format FORMAT]
69
+ [--detail-limit N] [--with-git]
70
+ Print activity report for a date
71
+ (default: today). Markdown or JSON.
69
72
  --date YYYY-MM-DD|today|yesterday|-Nd Date to report on
70
73
  --include TYPES Comma-separated types or "all"
71
- Types: response,bash,edit,thinking,read,glob,user
72
- Default: response,bash,edit,thinking
73
- --format FORMAT Output format: markdown (default) or json
74
- --detail-limit N Max chars per activity detail (default: 120, 0 = unlimited)
75
- --with-git Merge git commits from each session's project into the timeline
74
+ Types: user, response, bash, edit,
75
+ thinking, read, glob
76
+ Default: user, response, bash, edit, thinking
77
+ --format FORMAT markdown (default) or json
78
+ --detail-limit N Max chars per detail (default 120;
79
+ 0 = unlimited)
80
+ --with-git Merge git commits from each session's
81
+ project into the timeline
76
82
 
77
- summary [--date DATE | --last Nd | --from DATE --to DATE] [--prompt TEXT] [--force] [-y]
78
- Generate LLM summary via claude CLI.
79
- Single day produces a daily summary;
80
- a date range produces a meta-summary built from daily summaries.
83
+ summary [--date DATE | --last Nd | --from DATE --to DATE]
84
+ [--prompt TEXT] [--force] [--model NAME] [-y]
85
+ Generate an LLM summary via the claude
86
+ CLI. A single day produces a daily
87
+ summary; a date range produces a
88
+ meta-summary built from daily summaries.
81
89
  --date YYYY-MM-DD|today|yesterday|-Nd Date to summarize (default: today)
82
- --last Nd Date range: last N days, ending today (e.g. --last 7d)
83
- --from YYYY-MM-DD Date range: start date (use with --to)
84
- --to YYYY-MM-DD Date range: end date (use with --from)
90
+ --last Nd Date range: last N days, ending today
91
+ (e.g. --last 7d)
92
+ --from YYYY-MM-DD Range start (use with --to)
93
+ --to YYYY-MM-DD Range end (use with --from)
85
94
  --prompt TEXT Override prompt for this run (daily only)
86
95
  --force Regenerate even if cached
87
- --model NAME Pass --model to claude (e.g. "sonnet", "haiku", or a full model ID)
88
- -y, --yes Skip confirmation prompts for new daily summaries
96
+ --model NAME Pass --model to claude (e.g. "sonnet",
97
+ "haiku", or a full model id)
98
+ -y, --yes Skip confirmation prompts for new daily
99
+ summaries
100
+
101
+ Global options:
102
+ -V, --version Show version number
103
+ -h, --help Show this help message
89
104
 
90
105
  Environment:
91
- CLAUDE_PROJECTS_DIR Path to Claude projects directory
106
+ CLAUDE_PROJECTS_DIR Path to the Claude projects directory
92
107
  (default: ~/.claude/projects)
93
108
 
94
109
  Config: ~/.agenthud/config.yaml
@@ -131,6 +146,7 @@ function todayLocalMidnight() {
131
146
  return new Date(now.getFullYear(), now.getMonth(), now.getDate());
132
147
  }
133
148
  function parseArgs(args) {
149
+ if (args[0] === "watch") args = args.slice(1);
134
150
  if (args.includes("--help") || args.includes("-h")) {
135
151
  return { mode: "watch", command: "help" };
136
152
  }
@@ -145,11 +161,20 @@ function parseArgs(args) {
145
161
  let reportDate = todayLocalMidnight();
146
162
  let reportInclude = DEFAULT_TYPES;
147
163
  let reportError;
148
- for (const arg of rest) {
149
- if (arg.startsWith("-") && !KNOWN_REPORT_FLAGS.has(arg)) {
164
+ const FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
165
+ "--date",
166
+ "--include",
167
+ "--format",
168
+ "--detail-limit"
169
+ ]);
170
+ for (let i = 0; i < rest.length; i++) {
171
+ const arg = rest[i];
172
+ if (!arg.startsWith("-")) continue;
173
+ if (!KNOWN_REPORT_FLAGS.has(arg)) {
150
174
  reportError = `Unknown option: "${arg}". Run agenthud --help for usage.`;
151
175
  break;
152
176
  }
177
+ if (FLAGS_WITH_VALUE.has(arg)) i++;
153
178
  }
154
179
  const dateIdx = rest.indexOf("--date");
155
180
  if (dateIdx !== -1) {
@@ -3584,7 +3609,10 @@ function App({
3584
3609
  } else {
3585
3610
  setIsLive(false);
3586
3611
  setScrollOffset(
3587
- (o) => Math.min(o + 1, Math.max(0, activities.length - viewerRows))
3612
+ (o) => Math.min(
3613
+ o + 1,
3614
+ Math.max(0, mergedActivities.length - viewerRows)
3615
+ )
3588
3616
  );
3589
3617
  }
3590
3618
  }
@@ -3622,7 +3650,10 @@ function App({
3622
3650
  setViewerCursorLine(0);
3623
3651
  setIsLive(false);
3624
3652
  setScrollOffset(
3625
- (o) => Math.min(o + viewerRows, Math.max(0, activities.length - viewerRows))
3653
+ (o) => Math.min(
3654
+ o + viewerRows,
3655
+ Math.max(0, mergedActivities.length - viewerRows)
3656
+ )
3626
3657
  );
3627
3658
  }
3628
3659
  },
@@ -3654,7 +3685,7 @@ function App({
3654
3685
  setScrollOffset(
3655
3686
  (o) => Math.min(
3656
3687
  o + Math.floor(viewerRows / 2),
3657
- Math.max(0, activities.length - viewerRows)
3688
+ Math.max(0, mergedActivities.length - viewerRows)
3658
3689
  )
3659
3690
  );
3660
3691
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenthud",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "CLI tool to monitor agent status in real-time. Works with Claude Code, multi-agent workflows, and any AI agent system.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",