agenthud 0.11.2 → 0.11.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/dist/index.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
68
|
-
|
|
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,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
--
|
|
75
|
-
--
|
|
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]
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
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
|
|
83
|
-
|
|
84
|
-
--
|
|
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",
|
|
88
|
-
|
|
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
|
|
@@ -101,9 +116,6 @@ function getVersion() {
|
|
|
101
116
|
);
|
|
102
117
|
return packageJson.version;
|
|
103
118
|
}
|
|
104
|
-
function clearScreen() {
|
|
105
|
-
console.clear();
|
|
106
|
-
}
|
|
107
119
|
function parseLocalMidnight(dateStr) {
|
|
108
120
|
if (dateStr === "today") {
|
|
109
121
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -131,6 +143,7 @@ function todayLocalMidnight() {
|
|
|
131
143
|
return new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
|
132
144
|
}
|
|
133
145
|
function parseArgs(args) {
|
|
146
|
+
if (args[0] === "watch") args = args.slice(1);
|
|
134
147
|
if (args.includes("--help") || args.includes("-h")) {
|
|
135
148
|
return { mode: "watch", command: "help" };
|
|
136
149
|
}
|
|
@@ -145,11 +158,20 @@ function parseArgs(args) {
|
|
|
145
158
|
let reportDate = todayLocalMidnight();
|
|
146
159
|
let reportInclude = DEFAULT_TYPES;
|
|
147
160
|
let reportError;
|
|
148
|
-
|
|
149
|
-
|
|
161
|
+
const FLAGS_WITH_VALUE = /* @__PURE__ */ new Set([
|
|
162
|
+
"--date",
|
|
163
|
+
"--include",
|
|
164
|
+
"--format",
|
|
165
|
+
"--detail-limit"
|
|
166
|
+
]);
|
|
167
|
+
for (let i = 0; i < rest.length; i++) {
|
|
168
|
+
const arg = rest[i];
|
|
169
|
+
if (!arg.startsWith("-")) continue;
|
|
170
|
+
if (!KNOWN_REPORT_FLAGS.has(arg)) {
|
|
150
171
|
reportError = `Unknown option: "${arg}". Run agenthud --help for usage.`;
|
|
151
172
|
break;
|
|
152
173
|
}
|
|
174
|
+
if (FLAGS_WITH_VALUE.has(arg)) i++;
|
|
153
175
|
}
|
|
154
176
|
const dateIdx = rest.indexOf("--date");
|
|
155
177
|
if (dateIdx !== -1) {
|
|
@@ -4134,7 +4156,5 @@ if (options.scopeToCwd) {
|
|
|
4134
4156
|
if (options.mode === "watch") {
|
|
4135
4157
|
installAltScreenCleanup();
|
|
4136
4158
|
enterAltScreen();
|
|
4137
|
-
} else {
|
|
4138
|
-
if (options.mode === "once") clearScreen();
|
|
4139
4159
|
}
|
|
4140
4160
|
render(React.createElement(App, { mode: options.mode, scopeToProject }));
|
package/package.json
CHANGED