@tokenade/cli 0.7.1 → 0.7.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 (2) hide show
  1. package/README.md +424 -18
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,32 +1,438 @@
1
- # @tokenade/cli
1
+ <div align="center">
2
2
 
3
- **Tokenade** cuts your AI coding agent's token bill — semantic code search,
4
- output filtering and compaction, applied automatically as a local MCP server +
5
- inspectable agent hooks. Paid product (freemium) — see <https://tokenade.net>.
3
+ # Tokenade
6
4
 
7
- ## Install
5
+ ### The #1 tool to cut your AI agent's token bill.
6
+
7
+ **Ranked #1 on the [Token-Harness Optimizer Leaderboard](https://pi-infected.github.io/token-harness-optimizer-leaderboard/) — zero config.**
8
+
9
+ **Tokenade is the simplest way to slash what your coding agent sends to the model.**
10
+ Set it up once, save on every prompt — same results, a fraction of the tokens.
11
+
12
+ **Freemium** — start free (10M tokens/month, no credit card), upgrade only when you scale.
13
+
14
+ [![npm](https://img.shields.io/npm/v/@tokenade/cli?color=8b5cf6&label=%40tokenade%2Fcli&logo=npm)](https://www.npmjs.com/package/@tokenade/cli)
15
+ [![platforms](https://img.shields.io/badge/platforms-Linux%20%C2%B7%20macOS%20%C2%B7%20Windows-2563eb)](https://tokenade.net)
16
+ [![node](https://img.shields.io/badge/node-%3E%3D18-339933?logo=node.js&logoColor=white)](https://nodejs.org)
17
+ [![free plan](https://img.shields.io/badge/free-10M%20tokens%2Fmo%2C%20no%20card-22c55e)](https://tokenade.net/signup)
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)
20
+
21
+ </div>
22
+
23
+ ---
24
+
25
+ ```sh
26
+ npm install -g @tokenade/cli
27
+ tokenade login # opens your browser to authorize this machine — no key to type
28
+ tokenade install # wires Tokenade into your coding agent automatically
29
+ ```
30
+
31
+ That's it. Tokenade now trims tokens on **every prompt**, in the background. No config, nothing to remember.
32
+
33
+ ---
34
+
35
+ ## Why Tokenade
36
+
37
+ Your coding agent burns tokens on things the model never needed to see — whole files when one function mattered, 2,000-line build logs, every MCP tool definition on every turn. Tokenade strips that waste **before it reaches the model**, locally, automatically.
38
+
39
+ > **Less tokens, same results — automatically, on every prompt.**
40
+
41
+ ## ✨ What it does
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. |
51
+
52
+ ## 🤝 Works with the agents you already use
53
+
54
+ **Claude Code** · **Cursor** · **Codex** · **GitHub Copilot** · **Gemini CLI** · **Qwen Code** · **Windsurf** · **Cline** · **Kilo Code** · **OpenCode** · **Aider** · **Hermes** · **OpenClaw** · **Antigravity** · **Grok**
55
+
56
+ ## 📦 Install
8
57
 
9
58
  ```sh
10
59
  npm install -g @tokenade/cli
11
60
  ```
12
61
 
13
- The postinstall downloads the prebuilt binary for your platform from the signed
14
- release manifest (`downloads.tokenade.net/manifest.json`) and verifies its
15
- SHA-256. Nothing is run blindly.
62
+ The `postinstall` step downloads the prebuilt binary for your platform from the **signed release manifest** (`downloads.tokenade.net/manifest.json`) and verifies its **SHA‑256**. Nothing is run blindly — and the launcher in [`bin/tokenade.js`](bin/tokenade.js) and the installer in [`install.js`](install.js) are right here in this repo for you to inspect.
16
63
 
17
- ## Activate (browser no key to type)
64
+ **Supported:** Linux · macOS · Windows · x64 & arm64 · Node ≥ 18.
65
+
66
+ ## 🔓 Activate (browser — no key to type)
18
67
 
19
68
  ```sh
20
- tokenade login # opens tokenade.net to authorize this machine
21
- tokenade install # registers the MCP server + hooks with your coding agent
69
+ tokenade login # opens tokenade.net so you (logged into your dashboard) approve this device
70
+ tokenade install # registers the hooks with your coding agent
71
+ ```
72
+
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
+
75
+ ## 🔒 What leaves your machine
76
+
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
+
79
+ ## 💸 Pricing
80
+
81
+ | | **Free** | **Pro** | **Enterprise** |
82
+ |---|---|---|---|
83
+ | Token savings | Up to **10M / mo** | Up to **100M / mo** | **Unlimited** |
84
+ | Machines | **Unlimited** | **Unlimited** | 3 (+ paid seats) |
85
+ | All reduction features | ✅ | ✅ | ✅ |
86
+ | Token-savings dashboard | ✅ | ✅ | ✅ |
87
+ | Priority support | — | ✅ | ✅ |
88
+ | Price | **$0** — no card | **$19.90/mo** — flat, no per-token billing | **$2,990/yr** — 3 seats incl. |
89
+ | | [Start free →](https://tokenade.net/signup) | [Go Pro →](https://tokenade.net/pricing) | [Go Enterprise →](https://tokenade.net/pricing) |
90
+
91
+ ## 🐛 Found a bug? Tell us!
92
+
93
+ Tokenade is in **active beta** and your reports make it better — fast.
94
+
95
+ - **Open an issue:** https://github.com/pi-infected/tokenade-npm/issues
96
+ - **Join the beta testers on WhatsApp:** https://chat.whatsapp.com/JmBZxT41XB6AtQWgW9oNif
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. 🙏
99
+
100
+ ---
101
+
102
+ ## 🧰 CLI reference — every command
103
+
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
+
106
+ ### Setup & account
107
+
108
+ | Command | What it does |
109
+ |---|---|
110
+ | `install` | Register Tokenade with your detected agent (hooks). Flags: `--only <agent>`, `--with-hook`, `--with-claude-md`, `--with-lsp-enforcement-hook`, `--with-brevity-skill`, `--dry-run`. |
111
+ | `uninstall [aliases]` | Remove the integration. `uninstall aliases` removes only the shell proxy. `--dry-run` to preview. |
112
+ | `login` | Activate via browser device-flow — no key to type. |
113
+ | `activate <key>` | Link this machine to a tokenade.net license (free or paid) with a key. |
114
+ | `upgrade` | Self-update in place (aliases: `self-update`). `--on`/`--off` toggles the 24h background updater. |
115
+ | `healthcheck` | Diagnose the install (aliases: `health`, `doctor`). |
116
+ | `detect` | Print the detected AI agent. |
117
+ | `discover` | Scan `~/.claude` logs, surface top tools + install suggestions. |
118
+ | `hooks <status\|tail [N]>` | Show installed hooks + recent activity / live tail. |
119
+ | `statusline` | One-line summary for `~/.claude/settings.json` `statusLine`. |
120
+ | `incompatibilities` | Check for other token tools that conflict with Tokenade and propose fixes (aliases: `competitors`, `scan`). |
121
+
122
+ ### Code intelligence — read less, find faster
123
+
124
+ | Command | What it does |
125
+ |---|---|
126
+ | `map` | Print a compact codebase structure map. |
127
+ | `skeleton <file>` | Signatures-only skeleton of a file. |
128
+ | `query <symbol>` | Locate a symbol without reading files. |
129
+ | `impact <file>` | Refactor impact radius (dependents + symbols). |
130
+ | `semantic <query>` | Hybrid BM25 + dense, framework-aware search (aliases: `ask`, `sem`). |
131
+ | `file-search <path> <query>` | Per-file embedder lookup (`--k=N`). |
132
+ | `index` | Build & cache the codebase symbol index. |
133
+ | `watch` | Keep the index fresh: incremental reindex on every save. |
134
+ | `measure` | Report agent-loaded-file startup-token cost. |
135
+ | `review-context` | Token-budgeted code-review context (`--budget N`, `--base ref`). |
136
+ | `pack` | Budget-bounded repo export, one fenced bundle (`--budget N`, `--diff`, `--out FILE`). |
137
+ | `semantic-status` | Per-project state of `~/.tokenade/semantic.db`. |
138
+
139
+ ### Run commands through compaction
140
+
141
+ | Command | What it does |
142
+ |---|---|
143
+ | `wrap <cmd>` | Run a command through the auto-detected compactor (default for noisy commands). |
144
+ | `proxy <cmd...>` | Run a command and emit compressed output (logs savings). |
145
+ | `raw <cmd...>` | Run a command **without** compaction (aliases: `bypass`, `noproxy`). |
146
+ | `filter <cmd...>` | Filter stdin as if it were produced by `<cmd>`. |
147
+ | `execute --lang L --script CODE` | Sandboxed "think-in-code" runner (bash/python/node/jq/awk/ruby/perl) — returns only stdout, redacted + compacted, keeps raw data out of context. |
148
+ | `shell-init` | Print the shell proxy fragment for your shell (`--shell …`, `--all`). |
149
+ | `shellwrap` | TTY-aware alias target for csh/tcsh + cmd.exe. |
150
+
151
+ ### Format compactors
152
+
153
+ `auto <file|->` auto-detects the format and dispatches to the right compactor — **the one to call** if unsure. Or target a format directly (all read `<file>` or `-` for stdin):
154
+
155
+ | Domain | Commands |
156
+ |---|---|
157
+ | **Data & config** | `json` · `csv` · `tsv` · `yaml` · `ndjson` · `lock` · `sql` · `env` · `md` · `openapi` · `graphql` · `sourcemap` |
158
+ | **Logs & traces** | `logs` · `access` · `journal` · `container-logs` · `ghactions` · `stack` · `strace` · `tcpdump` · `metrics` |
159
+ | **Build / VCS / infra** | `diff` · `gitlog` · `archive` · `cargo-bench` · `jvmbuild` (aliases `mvn`/`gradle`/`sbt`) · `pkginstall` · `terraform` · `ansible` · `k8s-manifest` · `describe` · `systemd` |
160
+ | **System & network** | `table` · `disk` · `netstat` · `dns` · `vmstat` · `filelist` · `grep` |
161
+ | **Web & docs** | `web` · `serp` (aliases `google`/`bing`/`ddg`) · `snapshot` · `stealth` · `curl` · `docs` · `pdf` · `notebook` |
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
+
165
+ ### Savings, receipts & reporting
166
+
167
+ | Command | What it does |
168
+ |---|---|
169
+ | `gain` | Cumulative token savings (`--json`, `--history`, `--by-source`). |
170
+ | `dashboard` | Screenshot-ready savings overview (aliases: `dash`, `stats`; `--html`/`--json`). |
171
+ | `receipt` | Signed, tamper-evident savings receipt over the local ledger (`--verify <file>`). |
172
+ | `cache-note` | Prompt-cache-aware framing of savings (net vs gross). |
173
+ | `mcp-stats` | MCP manifest rollup (servers/wrapped) + token-aware skills index. |
174
+ | `report` | Share redacted Tokenade + agent logs (consent-gated, typed phrase) to improve compression (`--dry-run`, `--message`, `--accept`). |
175
+
176
+ ### Recovery & disclosure — get folded bytes back
177
+
178
+ | Command | What it does |
179
+ |---|---|
180
+ | `expand-ref <hash>` | Re-emit the verbatim bytes a compactor folded, by hash (alias: `xref`). |
181
+ | `expand-fold <id>` | Expand a folded log run back to its raw lines (alias: `xfold`). |
182
+ | `disclose <stash\|read\|search>` | Progressive disclosure: stash a big blob to a file, read/search by hash. |
183
+ | `search-stash <hash> <query>` | Fuzzy / natural-language recall within a stashed blob (BM25). |
184
+ | `turn-summary` | Extractive summary of a conversation turn (`--max N`). |
185
+
186
+ ### Security & maintenance
187
+
188
+ | Command | What it does |
189
+ |---|---|
190
+ | `scrub-secret <substring>` | **Emergency:** purge a leaked credential from all Tokenade-owned files + caches (`--dry-run`). |
191
+ | `scrub-cache` | Re-apply built-in redaction patterns to every persisted byte (use after upgrade). |
192
+ | `redact <file…>` | Redact secret-shaped values to `<redacted>` in any file (`--in-place`, `--dry-run`). Streams line-by-line, idempotent. |
193
+ | `evict-stale` | Prune 7-day-stale cache rows + zero-saved noise, then VACUUM to reclaim disk. |
194
+ | `mistake <list\|add\|from-revert>` | Persistent "bad direction" memory (records git reverts). |
195
+ | `audit-claude-md [DIR]` | Audit the `CLAUDE.md` cascade for bloat + cross-file dupes (alias: `claudemd`). |
196
+
197
+ ### Agent integration & config
198
+
199
+ | Command | What it does |
200
+ |---|---|
201
+ | `style <chat\|coding\|off>` | Response-style preamble injected before each prompt. |
202
+ | `read-mode` | Show the active fold read-mode ladder (`TOKENADE_READ_MODE`). |
203
+ | `unwrap-mcps` | Restore wrapped MCP servers to their original form (idempotent). |
204
+ | `mcp-proxy <bin>` | Transparent JSON-RPC proxy in front of an MCP server (written by `install`; internal). |
205
+ | `--version` | Print the installed version. |
206
+
207
+ > **User presets:** drop TOML files in `~/.config/tokenade/presets/` to add command-rewrite rules for your own CLIs (helm, ansible, internal scripts).
208
+
209
+ ---
210
+
211
+ ## 🧪 Examples & recipes
212
+
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 -`.
214
+
215
+ ### Setup & account
216
+
217
+ **`install`** — wire Tokenade into your agent (run once).
218
+ ```text
219
+ $ tokenade install
220
+ ✓ detected agent: claude-code
221
+ ✓ hooks registered in ~/.claude/settings.json (Bash|Read + Edit/Write)
222
+ ✓ shell proxy added to ~/.zshrc
223
+ ── Incompatible tools — suggested fixes ── # only if any are found
224
+ ✓ install complete — token savings start on your next prompt.
22
225
  ```
23
226
 
24
- `tokenade login` opens your browser so you (logged into your dashboard) approve
25
- this device. Each plan allows 3 machines; manage them at
26
- <https://tokenade.net/dashboard>.
227
+ **`login`** authorize this machine in your browser (no key to paste).
228
+ ```text
229
+ $ tokenade login
230
+ → opening https://tokenade.net/device?code=ABCD-1234 …
231
+ ✓ this machine is now linked to your account (plan: free).
232
+ ```
233
+
234
+ **`activate <key>`** — link a machine with a license key instead of the browser.
235
+ ```text
236
+ $ tokenade activate tk_live_xxx
237
+ ✓ activated — plan: pro · unlimited machines.
238
+ ```
239
+
240
+ **`healthcheck`** (aliases `health`, `doctor`) — confirm everything is wired.
241
+ ```text
242
+ $ tokenade healthcheck
243
+ ─── tokenade healthcheck ───
244
+ OK binary at ~/.local/bin/tokenade (0.6.2)
245
+ OK gain ledger writable at ~/.tokenade/gain.jsonl
246
+ OK license active — plan: pro
247
+ OK agent detected: claude-code
248
+ OK hookwrap found in ~/.claude/settings.json
249
+ all checks passed
250
+ ```
251
+
252
+ **`detect`** — print the detected agent. **`discover`** — scan your logs and suggest installs. **`hooks status`** — show installed hooks. **`statusline`** — one line for your editor status bar. **`upgrade`** — self-update; **`uninstall`** — remove cleanly.
253
+ ```text
254
+ $ tokenade detect
255
+ claude-code
256
+ ```
257
+
258
+ **`incompatibilities`** (aliases `competitors`, `scan`) — find other token tools that conflict with Tokenade and propose fixes.
259
+ ```text
260
+ $ tokenade incompatibilities
261
+ ── Found 1 potentially incompatible tool(s) ──
262
+
263
+ [redundant] rtk
264
+ Output-filtering CLI proxy (filters/compresses bash output)
265
+ → binary at ~/.cargo/bin/rtk
266
+ fix: Tokenade subsumes rtk: `tokenade proxy <cmd>` does the same AND
267
+ auto-detects 48 formats — usually with better savings.
268
+
269
+ Run `tokenade install` to interactively migrate & fix the [redundant] /
270
+ [overlapping] tools (the fix-up pass is on by default; opt out with `--no-cleanup`).
271
+ ```
272
+
273
+ ### Code intelligence — read less, find faster
274
+
275
+ **`map`** — get the lay of the land without reading anything.
276
+ ```text
277
+ $ tokenade map
278
+ 4722 files, 49898 symbols indexed
279
+ by directory:
280
+ crates/tokenade-core/src/ 140 files, 4802 symbols
281
+ crates/tokenade-core/src/cmd/ 2637 files, 25741 symbols
282
+ crates/tokenade-cli/src/ 12 files, 1188 symbols
283
+ ```
284
+
285
+ **`skeleton <file>`** — see a file's shape (signatures only), not its body.
286
+ ```text
287
+ $ tokenade skeleton crates/tokenade-core/src/redact.rs
288
+ use regex::Regex;
289
+ // … 3 lines …
290
+ pub fn redact(s: &str) -> String {
291
+ // … 8 lines …
292
+ pub fn redact_argv(argv: &[String]) -> Vec<String> {
293
+ struct PatternSet {
294
+ ```
295
+
296
+ **`query <symbol>`** — jump straight to where a symbol is defined.
297
+ ```text
298
+ $ tokenade query redact
299
+ module redact — crates/tokenade-core/src/lib.rs:137
300
+ fn redact — crates/tokenade-core/src/redact.rs:28
301
+ fn redact_argv — crates/tokenade-core/src/redact.rs:38
302
+ ```
303
+
304
+ **`impact <file>`** — before a refactor, see what depends on it.
305
+ ```text
306
+ $ tokenade impact crates/tokenade-core/src/redact.rs
307
+ crates/tokenade-core/src/redact.rs declares (47 symbols): fn redact, redact_argv, …
308
+ dependents (3):
309
+ crates/tokenade-core/src/debug_log.rs
310
+ crates/tokenade-core/src/sandbox.rs
311
+ crates/tokenade-core/tests/proptest_compactors.rs
312
+ ```
313
+
314
+ **`semantic "<query>"`** (aliases `ask`, `sem`) — find code by meaning, not by string match.
315
+ ```text
316
+ $ tokenade semantic "where do we redact secrets before logging"
317
+ 1. crates/tokenade-core/src/redact.rs:28 fn redact — applies all secret patterns
318
+ 2. crates/tokenade-core/src/gain.rs:231 record_inner — redacts label before write
319
+ ```
320
+
321
+ **`measure`** — see the per-session token cost of your agent-loaded files (CLAUDE.md, etc.).
322
+ ```text
323
+ $ tokenade measure
324
+ file tokens
325
+ CLAUDE.md 642
326
+ AGENTS.md 385
327
+ PER SESSION (one agent loads one) 642
328
+ ```
329
+
330
+ Also: **`index`** (build the cache up front) · **`watch`** (keep it fresh on save) · **`file-search <path> <query>`** (search within one file) · **`review-context --base main`** (budget-bounded diff context for reviews) · **`pack --budget 8000`** (export a repo slice as one bundle) · **`semantic-status`** (index state).
331
+
332
+ ### Run commands through compaction
333
+
334
+ **`wrap <cmd>`** — the default: run any noisy command, get the compacted output.
335
+ ```text
336
+ $ tokenade wrap 'kubectl get pods -A'
337
+ NAMESPACE NAME READY STATUS RESTARTS AGE
338
+ default web-xx 1/1 Running 0 2h
339
+ … 47 rows · grouped by status: Running=46, Pending=1
340
+ ```
341
+
342
+ **`execute --lang <L> --script <code>`** — "think in code": run a snippet in a sandbox, get **only stdout** back (raw data never enters your context).
343
+ ```text
344
+ $ tokenade execute --lang python --script 'print(sum(range(101)))'
345
+ 5050
346
+ ```
347
+
348
+ **`proxy <cmd…>`** — like `wrap`, logs savings to your ledger. **`raw <cmd…>`** — run *without* compaction (escape hatch). **`filter <cmd…>`** — treat stdin as if produced by `<cmd>`. **`shell-init`** — print the shell fragment that auto-wraps noisy commands:
349
+ ```text
350
+ $ eval "$(tokenade shell-init)" # add to ~/.zshrc — git/cargo/kubectl/… auto-compact
351
+ ```
352
+
353
+ ### Format & output compactors
354
+
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:
358
+
359
+ ```sh
360
+ tokenade auto <file> # auto-detect and compact
361
+ some-noisy-cmd | tokenade auto - # …or pipe stdin
362
+
363
+ tokenade add-compactor --file my-rules.toml # teach Tokenade a new compactor
364
+ tokenade add-compactor --list # list the ones you've added
365
+ ```
366
+
367
+ ### Savings, receipts & reporting
368
+
369
+ **`gain`** — how many tokens you've saved.
370
+ ```text
371
+ $ tokenade gain
372
+ operations: 136
373
+ tokens: 1,333,261 → 99,204
374
+ saved: 1,234,057 (92.6%)
375
+ by op: auto:json 9× −36% · auto-compact 4× −96% · …
376
+ ```
377
+
378
+ **`dashboard`** (aliases `dash`, `stats`) — the big-picture banner (`--html` / `--json`).
379
+ ```text
380
+ $ tokenade dashboard
381
+ 25.5M measured · 97.9% · 1571 ops
382
+ ```
383
+
384
+ **`receipt`** — a signed, tamper-evident savings receipt (`--verify <file>` to check one). **`cache-note --saved N`** — frames savings honestly (net vs gross of prompt-cache). **`mcp-stats`** — rollup of your MCP servers + skills index.
385
+
386
+ **`report`** — share redacted logs (consent-gated) so we can improve compression. A typed-phrase contract is required before anything leaves your machine; `--dry-run` packs locally and uploads nothing.
387
+ ```text
388
+ $ tokenade report --dry-run
389
+ collected 42 transcripts since install · redacted 17 secrets
390
+ wrote ~/.tokenade/last-report.zip (4.2 MB) — nothing uploaded
391
+ ```
392
+
393
+ ### Recovery & disclosure — get folded bytes back
394
+
395
+ Compaction is never lossy-by-surprise: every fold is recoverable.
396
+ ```text
397
+ $ tokenade expand-ref 927a921273b2 # re-emit the exact bytes a banner folded
398
+ $ tokenade expand-fold app-3f2a # expand one folded log run to raw lines
399
+ $ tokenade disclose read <hash> # read a stashed big blob
400
+ $ tokenade search-stash <hash> "timeout" # fuzzy recall inside a stash
401
+ $ tokenade turn-summary --max 5 chat.txt # top-5 salient sentences of a turn
402
+ ```
403
+
404
+ ### Security & maintenance
405
+
406
+ ```text
407
+ $ tokenade scrub-secret 'ak_98_leakedkey' --dry-run # purge a leaked credential everywhere
408
+ $ tokenade scrub-cache # re-apply redaction to all persisted bytes (after upgrade)
409
+ $ tokenade redact secrets.log --dry-run # count secret-shaped values in a file; write nothing
410
+ $ tokenade evict-stale # prune 7-day-stale cache rows + VACUUM
411
+ $ tokenade audit-claude-md # find bloat + dupes across your CLAUDE.md cascade
412
+ $ tokenade mistake from-revert # record a 'bad direction' from a git revert
413
+ ```
414
+
415
+ ### Agent integration & config
416
+
417
+ **`read-mode`** — show (and tune via `TOKENADE_READ_MODE`) how aggressively file reads are folded.
418
+ ```text
419
+ $ tokenade read-mode
420
+ active: task (default)
421
+ ladder: aggressive 0.4× · → task 1.0× · reference 3.0× · entropy
422
+ ```
423
+
424
+ **`style <chat|coding|off>`** — inject a response-style preamble before each prompt. **`unwrap-mcps`** — restore wrapped MCP servers. **`--version`** — print the version.
425
+ ```text
426
+ $ tokenade style coding # terse, code-first replies
427
+ current style: coding
428
+ ```
429
+
430
+ > **User-defined presets:** drop TOML files in `~/.config/tokenade/presets/` to teach Tokenade your own CLIs (helm, ansible, internal scripts) — same compaction, your commands.
431
+
432
+ ---
433
+
434
+ <div align="center">
27
435
 
28
- ## What leaves your machine
436
+ **[tokenade.net](https://tokenade.net)** · Made for people who'd rather spend tokens on shipping than on overhead.
29
437
 
30
- Nothing, except anonymous token-savings counts and an update check. Tokenade
31
- runs locally; its agent hooks live in your editor/agent config (inspectable,
32
- reversible).
438
+ </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenade/cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
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",