claude-master-toolkit 0.1.1 → 0.1.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.
Files changed (4) hide show
  1. package/README.md +20 -20
  2. package/bin/ctk.js +14 -0
  3. package/dist/cli.js +1428 -19
  4. package/package.json +10 -3
package/README.md CHANGED
@@ -5,8 +5,8 @@
5
5
  See what your sessions actually cost. Cut context bloat before it bites. Query your history in a real dashboard instead of squinting at `/cost`.
6
6
 
7
7
  ```bash
8
- npm install -g workctl
9
- workctl dashboard
8
+ npm install -g claude-master-toolkit
9
+ ctk dashboard
10
10
  ```
11
11
 
12
12
  Opens a local dashboard at `http://localhost:3200` backed by SQLite. Reads your Claude Code session JSONL files directly — no API keys, no telemetry, no accounts.
@@ -48,19 +48,19 @@ The server watches `~/.claude/projects/` and syncs new session events in real ti
48
48
 
49
49
  All commands are designed to return **compact, Claude-friendly output** — ideal for the `Bash` tool in agent loops.
50
50
 
51
- | Command | What it does |
52
- |---|---|
53
- | `workctl cost [--quiet]` | Realized cost of the current session (reads session JSONL, applies pricing) |
54
- | `workctl context` | Current window usage, cumulative totals, cost, threshold advice |
55
- | `workctl tokens [file]` | Rough token count for a file or stdin (`chars / 4`) |
56
- | `workctl estimate <file>` | Faithful pre-flight count via Anthropic `count_tokens` API |
57
- | `workctl slice <file> <symbol>` | Extract just one function / class / type from a file |
58
- | `workctl find <query> [path]` | Ranked ripgrep, top 20 results |
59
- | `workctl git-log [N]` | One-line log for last N commits |
60
- | `workctl git-changed` | Files changed vs main branch with line counts |
61
- | `workctl test-summary [cmd]` | Run a test command, print only pass/fail summary |
62
- | `workctl model <phase>` | Model alias recommendation per SDD phase |
63
- | `workctl dashboard` | Launch the local metrics dashboard |
51
+ | Command | What it does |
52
+ | ------------------------------- | --------------------------------------------------------------------------- |
53
+ | `workctl cost [--quiet]` | Realized cost of the current session (reads session JSONL, applies pricing) |
54
+ | `workctl context` | Current window usage, cumulative totals, cost, threshold advice |
55
+ | `workctl tokens [file]` | Rough token count for a file or stdin (`chars / 4`) |
56
+ | `workctl estimate <file>` | Faithful pre-flight count via Anthropic `count_tokens` API |
57
+ | `workctl slice <file> <symbol>` | Extract just one function / class / type from a file |
58
+ | `workctl find <query> [path]` | Ranked ripgrep, top 20 results |
59
+ | `workctl git-log [N]` | One-line log for last N commits |
60
+ | `workctl git-changed` | Files changed vs main branch with line counts |
61
+ | `workctl test-summary [cmd]` | Run a test command, print only pass/fail summary |
62
+ | `workctl model <phase>` | Model alias recommendation per SDD phase |
63
+ | `workctl dashboard` | Launch the local metrics dashboard |
64
64
 
65
65
  Every command supports `--json` for machine-readable output.
66
66
 
@@ -70,11 +70,11 @@ Every command supports `--json` for machine-readable output.
70
70
 
71
71
  Three fidelity sources, picked per use case:
72
72
 
73
- | Source | Fidelity | Used by |
74
- |---|---|---|
75
- | Session JSONL (`~/.claude/projects/*/*.jsonl`) | **100%** — real API-charged counts | `cost`, `context`, dashboard |
76
- | Anthropic `count_tokens` API | **100%** — official endpoint | `estimate` (needs `ANTHROPIC_API_KEY`) |
77
- | `chars / 4` | rough | `tokens`, fallback for `estimate` |
73
+ | Source | Fidelity | Used by |
74
+ | ---------------------------------------------- | ---------------------------------- | -------------------------------------- |
75
+ | Session JSONL (`~/.claude/projects/*/*.jsonl`) | **100%** — real API-charged counts | `cost`, `context`, dashboard |
76
+ | Anthropic `count_tokens` API | **100%** — official endpoint | `estimate` (needs `ANTHROPIC_API_KEY`) |
77
+ | `chars / 4` | rough | `tokens`, fallback for `estimate` |
78
78
 
79
79
  Pricing table is hard-coded in `src/shared/pricing.ts` for the Claude 4.6 / 4.5 family. Update there when Anthropic changes prices.
80
80
 
package/bin/ctk.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { createRequire } from "module";
4
+ import path from "path";
5
+ import { fileURLToPath } from "url";
6
+
7
+ const require = createRequire(import.meta.url);
8
+
9
+ const __filename = fileURLToPath(import.meta.url);
10
+ const __dirname = path.dirname(__filename);
11
+
12
+ const cliPath = path.join(__dirname, "../dist/cli.js");
13
+
14
+ await import(cliPath);