@tokz/cli 0.1.1 → 0.2.1

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
@@ -11,10 +11,12 @@ analytics to explore; everything downstream (projects, dashboards,
11
11
  timeframes) is scoped to it.
12
12
 
13
13
  ```bash
14
- npx tokz # interactive TUI: browse projects, drill into charts
15
- npx tokz audit # static report for the current project
16
- npx tokz audit --all # static report across every project on this machine
17
- npx tokz audit --json # machine-readable report
14
+ npx @tokz/cli # interactive TUI: browse projects, drill into charts
15
+ npx @tokz/cli audit # static report for the current project
16
+ npx @tokz/cli audit --all # static report across every project on this machine
17
+
18
+ npm i -g @tokz/cli # installs the `tokz` command
19
+ tokz # then just: tokz
18
20
  ```
19
21
 
20
22
  ## Interactive TUI
package/dist/cli.js CHANGED
@@ -10,6 +10,7 @@ import {
10
10
  } from "./chunk-MO4Y7IF6.js";
11
11
 
12
12
  // src/cli.ts
13
+ import { createRequire } from "module";
13
14
  import { Command } from "commander";
14
15
 
15
16
  // src/report.ts
@@ -59,8 +60,9 @@ function renderReport(report) {
59
60
  }
60
61
 
61
62
  // src/cli.ts
63
+ var { version } = createRequire(import.meta.url)("../package.json");
62
64
  var program = new Command();
63
- program.name("tokz").description("Audit where your coding agent's context window and API dollars go.").version("0.1.0");
65
+ program.name("tokz").description("Audit where your coding agent's context window and API dollars go.").version(version);
64
66
  program.command("audit").argument("[project]", "project path (default: current directory)").option("--all", "scan all projects under ~/.claude/projects").option("--json", "output raw JSON report").option("--days <n>", "only include the last N days of activity").action(async (project, opts) => {
65
67
  const projectPath = project ?? process.cwd();
66
68
  const transcripts = await findTranscripts(opts.all ? void 0 : projectPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokz/cli",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Audit where your coding agent's context window and API dollars go.",
5
5
  "type": "module",
6
6
  "license": "MIT",