agenthud 0.5.4 → 0.5.6
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 +15 -0
- package/dist/index.js +46 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,6 +29,21 @@ Terminal dashboard for AI agent development.
|
|
|
29
29
|
npx agenthud
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
## CLI
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Usage: agenthud [command] [options]
|
|
36
|
+
|
|
37
|
+
Commands:
|
|
38
|
+
init Initialize agenthud in current directory
|
|
39
|
+
|
|
40
|
+
Options:
|
|
41
|
+
-w, --watch Watch mode (default)
|
|
42
|
+
--once Run once and exit
|
|
43
|
+
-V, --version Show version number
|
|
44
|
+
-h, --help Show this help message
|
|
45
|
+
```
|
|
46
|
+
|
|
32
47
|
## Features
|
|
33
48
|
|
|
34
49
|
- **Claude**: Real-time Claude Code session monitoring
|
package/dist/index.js
CHANGED
|
@@ -2473,13 +2473,43 @@ function App({ mode, agentDirExists: agentDirExists2 = true }) {
|
|
|
2473
2473
|
}
|
|
2474
2474
|
|
|
2475
2475
|
// src/cli.ts
|
|
2476
|
+
import { readFileSync } from "fs";
|
|
2477
|
+
import { dirname, join as join3 } from "path";
|
|
2478
|
+
import { fileURLToPath } from "url";
|
|
2479
|
+
function getHelp() {
|
|
2480
|
+
return `Usage: agenthud [command] [options]
|
|
2481
|
+
|
|
2482
|
+
Commands:
|
|
2483
|
+
init Initialize agenthud in current directory
|
|
2484
|
+
|
|
2485
|
+
Options:
|
|
2486
|
+
-w, --watch Watch mode (default)
|
|
2487
|
+
--once Run once and exit
|
|
2488
|
+
-V, --version Show version number
|
|
2489
|
+
-h, --help Show this help message
|
|
2490
|
+
`;
|
|
2491
|
+
}
|
|
2492
|
+
function getVersion() {
|
|
2493
|
+
const __dirname3 = dirname(fileURLToPath(import.meta.url));
|
|
2494
|
+
const packageJson = JSON.parse(
|
|
2495
|
+
readFileSync(join3(__dirname3, "..", "package.json"), "utf-8")
|
|
2496
|
+
);
|
|
2497
|
+
return packageJson.version;
|
|
2498
|
+
}
|
|
2476
2499
|
var clearFn = () => console.clear();
|
|
2477
2500
|
function clearScreen() {
|
|
2478
2501
|
clearFn();
|
|
2479
2502
|
}
|
|
2480
2503
|
function parseArgs(args) {
|
|
2481
2504
|
const hasOnce = args.includes("--once");
|
|
2482
|
-
const
|
|
2505
|
+
const hasVersion = args.includes("--version") || args.includes("-V");
|
|
2506
|
+
const hasHelp = args.includes("--help") || args.includes("-h");
|
|
2507
|
+
if (hasHelp) {
|
|
2508
|
+
return { mode: "watch", command: "help" };
|
|
2509
|
+
}
|
|
2510
|
+
if (hasVersion) {
|
|
2511
|
+
return { mode: "watch", command: "version" };
|
|
2512
|
+
}
|
|
2483
2513
|
const command = args[0] === "init" ? "init" : void 0;
|
|
2484
2514
|
if (hasOnce) {
|
|
2485
2515
|
return { mode: "once", command };
|
|
@@ -2495,8 +2525,8 @@ import {
|
|
|
2495
2525
|
readFileSync as nodeReadFileSync6,
|
|
2496
2526
|
appendFileSync as nodeAppendFileSync
|
|
2497
2527
|
} from "fs";
|
|
2498
|
-
import { fileURLToPath } from "url";
|
|
2499
|
-
import { dirname, join as
|
|
2528
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2529
|
+
import { dirname as dirname2, join as join4 } from "path";
|
|
2500
2530
|
import { homedir as homedir2 } from "os";
|
|
2501
2531
|
var fs3 = {
|
|
2502
2532
|
existsSync: nodeExistsSync4,
|
|
@@ -2505,18 +2535,18 @@ var fs3 = {
|
|
|
2505
2535
|
readFileSync: (path) => nodeReadFileSync6(path, "utf-8"),
|
|
2506
2536
|
appendFileSync: nodeAppendFileSync
|
|
2507
2537
|
};
|
|
2508
|
-
var __filename2 =
|
|
2509
|
-
var __dirname2 =
|
|
2538
|
+
var __filename2 = fileURLToPath2(import.meta.url);
|
|
2539
|
+
var __dirname2 = dirname2(__filename2);
|
|
2510
2540
|
function getDefaultConfig2() {
|
|
2511
|
-
let templatePath =
|
|
2541
|
+
let templatePath = join4(__dirname2, "templates", "config.yaml");
|
|
2512
2542
|
if (!nodeExistsSync4(templatePath)) {
|
|
2513
|
-
templatePath =
|
|
2543
|
+
templatePath = join4(__dirname2, "..", "templates", "config.yaml");
|
|
2514
2544
|
}
|
|
2515
2545
|
return nodeReadFileSync6(templatePath, "utf-8");
|
|
2516
2546
|
}
|
|
2517
2547
|
function getClaudeSessionPath2(projectPath) {
|
|
2518
2548
|
const encoded = projectPath.replace(/\//g, "-");
|
|
2519
|
-
return
|
|
2549
|
+
return join4(homedir2(), ".claude", "projects", encoded);
|
|
2520
2550
|
}
|
|
2521
2551
|
function runInit(cwd = process.cwd()) {
|
|
2522
2552
|
const result = {
|
|
@@ -2593,6 +2623,14 @@ function stopPerformanceCleanup() {
|
|
|
2593
2623
|
|
|
2594
2624
|
// src/index.ts
|
|
2595
2625
|
var options = parseArgs(process.argv.slice(2));
|
|
2626
|
+
if (options.command === "help") {
|
|
2627
|
+
console.log(getHelp());
|
|
2628
|
+
process.exit(0);
|
|
2629
|
+
}
|
|
2630
|
+
if (options.command === "version") {
|
|
2631
|
+
console.log(getVersion());
|
|
2632
|
+
process.exit(0);
|
|
2633
|
+
}
|
|
2596
2634
|
if (options.command === "init") {
|
|
2597
2635
|
const result = runInit();
|
|
2598
2636
|
console.log("\n\u2713 agenthud initialized\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agenthud",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
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",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"ink": "^6.6.0",
|
|
54
54
|
"react": "^19.2.3",
|
|
55
|
-
"string-width": "^
|
|
55
|
+
"string-width": "^7.2.0",
|
|
56
56
|
"yaml": "^2.8.2"
|
|
57
57
|
}
|
|
58
58
|
}
|