@tokenade/cli 0.7.2 → 0.7.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.
Files changed (2) hide show
  1. package/README.md +34 -144
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- # Tokenade
3
+ # Tokenade
4
4
 
5
5
  ### The #1 tool to cut your AI agent's token bill.
6
6
 
@@ -16,7 +16,7 @@ Set it up once, save on every prompt — same results, a fraction of the tokens.
16
16
  [![node](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org)
17
17
  [![free plan](https://img.shields.io/badge/free-10M%20tokens%2Fmo%2C%20no%20card-22c55e)](https://tokenade.net/signup)
18
18
 
19
- [**🚀 Start free**](https://tokenade.net/signup) &nbsp;·&nbsp; [**💸 Pricing**](https://tokenade.net/pricing) &nbsp;·&nbsp; [**📊 Dashboard**](https://tokenade.net/dashboard) &nbsp;·&nbsp; [**🐛 Report an issue**](https://github.com/pi-infected/tokenade-npm/issues)
19
+ [**Start free**](https://tokenade.net/signup) &nbsp;·&nbsp; [**Pricing**](https://tokenade.net/pricing) &nbsp;·&nbsp; [**Dashboard**](https://tokenade.net/dashboard) &nbsp;·&nbsp; [**Report an issue**](https://github.com/pi-infected/tokenade-npm/issues)
20
20
 
21
21
  </div>
22
22
 
@@ -38,22 +38,22 @@ Your coding agent burns tokens on things the model never needed to see — whole
38
38
 
39
39
  > **Less tokens, same results — automatically, on every prompt.**
40
40
 
41
- ## What it does
41
+ ## What it does
42
42
 
43
- | | Feature | What you get |
44
- |---|---|---|
45
- | 🔎 | **Semantic code search** | Finds the right files by *meaning*, so your agent reads only what matters — not your whole project. |
46
- | 🧹 | **Command optimization** | Trims long command outputs (logs, builds, tests) down to what counts before your agent ever sees them. |
47
- | 🧩 | **MCP optimization** | Loads only the MCP tools your agent actually needs, on demand — instead of every tool, every time. |
48
- | 📊 | **Token dashboard** | See exactly how many tokens Tokenade saved you — clear numbers, no guesswork. |
49
- | 🛟 | **Free to start** | Save up to **10M tokens/month** on the free plan — unlimited machines, no credit card. |
50
- | ⚙️ | **One-command install** | Ready in seconds. Connects to your agent automatically, with zero configuration. |
43
+ | Feature | What you get |
44
+ |---|---|
45
+ | **Semantic code search** | Finds the right files by *meaning*, so your agent reads only what matters — not your whole project. |
46
+ | **Command optimization** | Trims long command outputs (logs, builds, tests) down to what counts before your agent ever sees them. |
47
+ | **MCP optimization** | Loads only the MCP tools your agent actually needs, on demand — instead of every tool, every time. |
48
+ | **Token dashboard** | See exactly how many tokens Tokenade saved you — clear numbers, no guesswork. |
49
+ | **Free to start** | Save up to **10M tokens/month** on the free plan — unlimited machines, no credit card. |
50
+ | **One-command install** | Ready in seconds. Connects to your agent automatically, with zero configuration. |
51
51
 
52
- ## 🤝 Works with the agents you already use
52
+ ## Works with the agents you already use
53
53
 
54
54
  **Claude Code** · **Cursor** · **Codex** · **GitHub Copilot** · **Gemini CLI** · **Qwen Code** · **Windsurf** · **Cline** · **Kilo Code** · **OpenCode** · **Aider** · **Hermes** · **OpenClaw** · **Antigravity** · **Grok**
55
55
 
56
- ## 📦 Install
56
+ ## Install
57
57
 
58
58
  ```sh
59
59
  npm install -g @tokenade/cli
@@ -63,7 +63,7 @@ The `postinstall` step downloads the prebuilt binary for your platform from the
63
63
 
64
64
  **Supported:** Linux · macOS · Windows · x64 & arm64 · Node ≥ 18.
65
65
 
66
- ## 🔓 Activate (browser — no key to type)
66
+ ## Activate (browser — no key to type)
67
67
 
68
68
  ```sh
69
69
  tokenade login # opens tokenade.net so you (logged into your dashboard) approve this device
@@ -72,34 +72,34 @@ tokenade install # registers the hooks with your coding agent
72
72
 
73
73
  **Free** and **Pro** include **unlimited machines**; **Enterprise** includes 3 (plus paid extra seats). Manage them anytime at [tokenade.net/dashboard](https://tokenade.net/dashboard).
74
74
 
75
- ## 🔒 What leaves your machine
75
+ ## What leaves your machine
76
76
 
77
77
  **Nothing**, except anonymous token-savings counts and an update check. Tokenade runs **locally**; its agent hooks live in your editor/agent config — **inspectable and reversible**.
78
78
 
79
- ## 💸 Pricing
79
+ ## Pricing
80
80
 
81
81
  | | **Free** | **Pro** | **Enterprise** |
82
82
  |---|---|---|---|
83
83
  | Token savings | Up to **10M / mo** | Up to **100M / mo** | **Unlimited** |
84
84
  | Machines | **Unlimited** | **Unlimited** | 3 (+ paid seats) |
85
- | All reduction features | | | |
86
- | Token-savings dashboard | | | |
87
- | Priority support | — | | |
85
+ | All reduction features | | | |
86
+ | Token-savings dashboard | | | |
87
+ | Priority support | — | | |
88
88
  | Price | **$0** — no card | **$19.90/mo** — flat, no per-token billing | **$2,990/yr** — 3 seats incl. |
89
89
  | | [Start free →](https://tokenade.net/signup) | [Go Pro →](https://tokenade.net/pricing) | [Go Enterprise →](https://tokenade.net/pricing) |
90
90
 
91
- ## 🐛 Found a bug? Tell us!
91
+ ## Found a bug? Tell us!
92
92
 
93
93
  Tokenade is in **active beta** and your reports make it better — fast.
94
94
 
95
95
  - **Open an issue:** https://github.com/pi-infected/tokenade-npm/issues
96
96
  - **Join the beta testers on WhatsApp:** https://chat.whatsapp.com/JmBZxT41XB6AtQWgW9oNif
97
97
 
98
- When reporting, please include your OS, `tokenade --version`, your coding agent, and what you expected vs. what happened. The more detail, the faster we fix it. 🙏
98
+ When reporting, please include your OS, `tokenade --version`, your coding agent, and what you expected vs. what happened. The more detail, the faster we fix it.
99
99
 
100
100
  ---
101
101
 
102
- ## 🧰 CLI reference — every command
102
+ ## CLI reference — every command
103
103
 
104
104
  > **You rarely need any of these by hand.** After `tokenade install`, Tokenade works automatically through your agent's hooks. The CLI below is for power users, scripting, and inspection. Run `tokenade help` for the live list, and `tokenade <command> --help` where available.
105
105
 
@@ -160,6 +160,8 @@ When reporting, please include your OS, `tokenade --version`, your coding agent,
160
160
  | **System & network** | `table` · `disk` · `netstat` · `dns` · `vmstat` · `filelist` · `grep` |
161
161
  | **Web & docs** | `web` · `serp` (aliases `google`/`bing`/`ddg`) · `snapshot` · `stealth` · `curl` · `docs` · `pdf` · `notebook` |
162
162
 
163
+ **Your own compactors.** `add-compactor --file <rules.toml>` teaches Tokenade to fold output from a command it doesn't cover yet (alias `add-filter`); `add-compactor --list` shows the ones you've added, and `add-compactor --help` prints the file format.
164
+
163
165
  ### Savings, receipts & reporting
164
166
 
165
167
  | Command | What it does |
@@ -206,7 +208,7 @@ When reporting, please include your OS, `tokenade --version`, your coding agent,
206
208
 
207
209
  ---
208
210
 
209
- ## 🧪 Examples & recipes
211
+ ## Examples & recipes
210
212
 
211
213
  Real commands, real (trimmed) output — so both humans **and coding agents** know exactly what each command does and when to reach for it. Every compactor reads a file **or `-` for stdin**, so you can pipe: `some-noisy-cmd | tokenade auto -`.
212
214
 
@@ -348,132 +350,20 @@ $ tokenade execute --lang python --script 'print(sum(range(101)))'
348
350
  $ eval "$(tokenade shell-init)" # add to ~/.zshrc — git/cargo/kubectl/… auto-compact
349
351
  ```
350
352
 
351
- ### Format compactors
352
-
353
- `tokenade auto <file|->` auto-detects and dispatches — **the one to reach for**. Or call a format directly. All read a file or `-` (stdin).
354
-
355
- **`json`** — folds arrays of objects into a compact TOON table.
356
- ```text
357
- $ tokenade json api.json
358
- { "page": 1, "total": 20, "users": "<see [fold @ users] block below>" }
359
-
360
- [fold @ users] [×20 rows · toon] active,id,name,role
361
- true,1,"u1","user"
362
-
363
- ```
364
-
365
- **`logs`** — collapses runs of templated-equal lines (timestamps/IDs normalised).
366
- ```text
367
- $ tokenade logs app.log # 200 lines →
368
- <TS> INFO worker job=<N> status=done ms=<N> [×200 lines · e.g. job=1, ms=11]
369
- ```
353
+ ### Format & output compactors
370
354
 
371
- **`diff`** caps context, folds multi-file patches.
372
- ```text
373
- $ git diff | tokenade diff -
374
- diff --git a/redact.rs b/redact.rs
375
- @@ -175,17 +175,24 @@ fn patterns() …
376
- …2 context line(s) elided…
377
- + r#"…(?:'[^']*'|"[^"]*"|[^\s]+)"#,
378
- ```
355
+ Tokenade includes a family of format-aware compactors — the full list is in
356
+ the [CLI reference](#-cli-reference--every-command) above. Each reads a file or
357
+ `-` (stdin); when unsure, let Tokenade pick:
379
358
 
380
- **`csv` / `tsv`** — drop empty columns, cap rows, truncate cells.
381
- ```text
382
- $ tokenade csv users.csv
383
- id,name,email,signup,plan
384
- 1,Ada,ada@x.io,2024-01-02,pro
385
- # 1 empty column(s) dropped
386
- ```
387
-
388
- **`yaml`** — strips `managedFields`, `lastTransitionTime`, and other k8s noise.
389
- ```text
390
- $ kubectl get deploy web -o yaml | tokenade yaml -
391
- metadata:
392
- name: web
393
- managedFields: <dropped>
394
- status:
395
- conditions:
396
- - type: Available
397
- lastTransitionTime: <dropped>
398
- ```
399
-
400
- **`env`** — compact an env dump **and redact secrets**.
401
- ```text
402
- $ env | tokenade env -
403
- AWS_SECRET_ACCESS_KEY=<redacted 17 chars>
404
- DATABASE_URL=<redacted 21 chars>
405
- # [tokenade:env] 2 secret(s) redacted
406
- ```
407
-
408
- **`table`** — any columnar CLI output (`docker ps`, `kubectl get`, `ps aux`).
409
- ```text
410
- $ docker ps | tokenade table -
411
- IMAGE STATUS PORTS NAMES
412
- nginx:latest Up 2 hours 0.0.0.0:80->80/tcp web
413
- ```
414
-
415
- **`stack`** — fold framework frames in a stack trace, keep your code + the error.
416
- ```text
417
- $ tokenade stack trace.txt
418
- /app/main.py:42 in <module> run()
419
- /app/db.py:17 in query raise ValueError("bad row")
420
- ValueError: bad row
421
- ```
422
-
423
- **`dns`** — keep the ANSWER section of `dig`/`host`, drop the pseudo-sections.
424
- ```text
425
- $ dig example.com | tokenade dns -
426
- example.com A NOERROR: 2 answers
427
- example.com. IN A 93.184.216.34
428
- ```
359
+ ```sh
360
+ tokenade auto <file> # auto-detect and compact
361
+ some-noisy-cmd | tokenade auto - # …or pipe stdin
429
362
 
430
- **`access`** group an nginx/Apache log by method + path + status.
431
- ```text
432
- $ tokenade access access.log
433
- 3 request(s) · status counts: 200=2, 500=1
434
- 2× GET /api/users [200]
435
- 1× POST /api/pay [500]
363
+ tokenade add-compactor --file my-rules.toml # teach Tokenade a new compactor
364
+ tokenade add-compactor --list # list the ones you've added
436
365
  ```
437
366
 
438
- The full family — same shape (`tokenade <name> file|-`), each tuned to one format:
439
-
440
- | Command | Common use → output |
441
- |---|---|
442
- | `md` | Markdown → drop front-matter, fold huge code blocks, strip ref-links |
443
- | `ndjson` | JSONL cloud logs → severity histogram + key-union schema |
444
- | `lock` | `Cargo.lock`/`yarn.lock` → flat `name@version` list |
445
- | `sql` | psql/mysql result table → capped, borderless rows |
446
- | `openapi` / `graphql` | API spec → endpoint / type + field list, no bodies |
447
- | `sourcemap` | `.map` → sources list, drop mappings blob |
448
- | `gitlog` | `git log` → `hash author subject` per commit |
449
- | `archive` | `tar -tvf`/`unzip -l` → names only, perms/size dropped |
450
- | `terraform` | `terraform plan` → fold "Refreshing state", drop unchanged attrs |
451
- | `k8s-manifest` | `helm template` → per-kind summary, drop spec bodies |
452
- | `describe` | `kubectl describe` → identity + status + warnings |
453
- | `systemd` | `systemctl status` → Active + Mem/CPU + ERR/WARN tail |
454
- | `journal` | `journalctl`/`dmesg` → group by service, surface ERR/WARN |
455
- | `container-logs` | `kubectl logs --prefix` → per-stream fold |
456
- | `grep` | `grep -r`/`rg` → group by file, top hits |
457
- | `filelist` | `find`/`tree`/`ls -laR` → per-dir counts + ext histogram |
458
- | `disk` | `du -h` → top entries by size |
459
- | `netstat` | `ss`/`netstat -an` → per-state counts, top LISTEN |
460
- | `vmstat` | `vmstat 1 N` → per-column min/mean/max + peaks |
461
- | `strace` | `strace`/`ltrace` → syscall counts + error summary |
462
- | `tcpdump` | `tcpdump` text → per-flow aggregation |
463
- | `metrics` | Prometheus `/metrics` → grouped, capped label combos |
464
- | `curl` | `curl -v` → fold TLS handshake + cert chain |
465
- | `cargo-bench` | criterion output → Δ-vs-baseline + regressions |
466
- | `jvmbuild` (`mvn`/`gradle`) | Maven/Gradle build → per-phase outcome |
467
- | `pkginstall` | pip/npm/cargo install → drop progress, keep installed list |
468
- | `ghactions` | GH Actions log → strip timestamps, keep `##[error]` |
469
- | `ansible` | `ansible-playbook` → per-task outcome, failures verbatim |
470
- | `web` | HTML page → clean markdown |
471
- | `serp` (`google`/`bing`/`ddg`) | raw search-results HTML → title/url/snippet |
472
- | `snapshot` | Playwright a11y-tree → compact tree |
473
- | `stealth` | page → detect Cloudflare/hCaptcha + remediation |
474
- | `docs` / `pdf` | `.docx`/`.xlsx`/`.pptx`/`.pdf` → plain text |
475
- | `notebook` | Jupyter `.ipynb` → code + outputs, strip base64 images |
476
-
477
367
  ### Savings, receipts & reporting
478
368
 
479
369
  **`gain`** — how many tokens you've saved.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenade/cli",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "description": "Tokenade — cut your AI coding agent's token bill. Installs the Tokenade CLI (a local, paid token-reduction tool; activate via your browser).",
5
5
  "homepage": "https://tokenade.net",
6
6
  "license": "UNLICENSED",