@tokenade/cli 0.8.10 → 0.8.11
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 +20 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -141,24 +141,27 @@ When reporting, please include your OS, `tokenade --version`, your coding agent,
|
|
|
141
141
|
| Command | What it does |
|
|
142
142
|
|---|---|
|
|
143
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
144
|
| `raw <cmd...>` | Run a command **without** compaction (aliases: `bypass`, `noproxy`). |
|
|
146
145
|
| `filter <cmd...>` | Filter stdin as if it were produced by `<cmd>`. |
|
|
147
146
|
| `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
147
|
| `shell-init` | Print the shell proxy fragment for your shell (`--shell …`, `--all`). |
|
|
149
148
|
| `shellwrap` | TTY-aware alias target for csh/tcsh + cmd.exe. |
|
|
150
149
|
|
|
151
|
-
###
|
|
150
|
+
### Read & compact content
|
|
152
151
|
|
|
153
|
-
`
|
|
152
|
+
`read <file|->` is the content entry point: it auto-detects a blob's format and
|
|
153
|
+
dispatches to the right compactor. Point it at a file (or `-` for stdin) carrying
|
|
154
|
+
JSON, YAML, CSV/TSV, NDJSON, logs, unified diffs, stack traces, env dumps,
|
|
155
|
+
markdown, lockfiles, SQL, OpenAPI/GraphQL, build & CI output, and many more —
|
|
156
|
+
the format is detected automatically. Live command output is compacted the same
|
|
157
|
+
way through `wrap`.
|
|
154
158
|
|
|
155
|
-
|
|
|
159
|
+
| Command | What it does |
|
|
156
160
|
|---|---|
|
|
157
|
-
|
|
|
158
|
-
|
|
|
159
|
-
|
|
|
160
|
-
|
|
|
161
|
-
| **Web & docs** | `web` · `serp` (aliases `google`/`bing`/`ddg`) · `snapshot` · `stealth` · `curl` · `docs` · `pdf` · `notebook` |
|
|
161
|
+
| `read <file\|->` | Auto-detect a blob's format and compact it (**the content entry point**). |
|
|
162
|
+
| `web <file\|->` | Compact an HTML page → markdown (real web content). |
|
|
163
|
+
| `serp <file\|->` | Compact raw SERP HTML (aliases: `google`/`bing`/`ddg`). |
|
|
164
|
+
| `snapshot <file\|->` | Compact a Playwright accessibility-tree snapshot. |
|
|
162
165
|
|
|
163
166
|
**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. Filters shipped INSIDE a repo (`.tokenade/filters/`) apply only after you approve them once with `trust-filters` — a cloned project can't silently rewrite your outputs.
|
|
164
167
|
|
|
@@ -210,7 +213,7 @@ When reporting, please include your OS, `tokenade --version`, your coding agent,
|
|
|
210
213
|
|
|
211
214
|
## Examples & recipes
|
|
212
215
|
|
|
213
|
-
Real commands, real (trimmed) output — so both humans **and coding agents** know exactly what each command does and when to reach for it.
|
|
216
|
+
Real commands, real (trimmed) output — so both humans **and coding agents** know exactly what each command does and when to reach for it. `read` (and every format-aware entry point) reads a file **or `-` for stdin**, so you can pipe: `some-noisy-cmd | tokenade read -`.
|
|
214
217
|
|
|
215
218
|
### Setup & account
|
|
216
219
|
|
|
@@ -345,20 +348,20 @@ $ tokenade execute --lang python --script 'print(sum(range(101)))'
|
|
|
345
348
|
5050
|
|
346
349
|
```
|
|
347
350
|
|
|
348
|
-
**`
|
|
351
|
+
**`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
352
|
```text
|
|
350
353
|
$ eval "$(tokenade shell-init)" # add to ~/.zshrc — git/cargo/kubectl/… auto-compact
|
|
351
354
|
```
|
|
352
355
|
|
|
353
|
-
###
|
|
356
|
+
### Read & compact content
|
|
354
357
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
+
`read` auto-detects a blob's format and dispatches to the right compactor.
|
|
359
|
+
It reads a file or `-` (stdin); live command output is folded the same way
|
|
360
|
+
through `wrap`:
|
|
358
361
|
|
|
359
362
|
```sh
|
|
360
|
-
tokenade
|
|
361
|
-
some-noisy-cmd | tokenade
|
|
363
|
+
tokenade read <file> # auto-detect and compact
|
|
364
|
+
some-noisy-cmd | tokenade read - # …or pipe stdin
|
|
362
365
|
|
|
363
366
|
tokenade add-compactor --file my-rules.toml # teach Tokenade a new compactor
|
|
364
367
|
tokenade add-compactor --list # list the ones you've added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenade/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11",
|
|
4
4
|
"description": "Tokenade \u2014 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",
|