cartoon-wrap 0.1.0 → 0.1.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.
Files changed (2) hide show
  1. package/README.md +60 -0
  2. package/package.json +21 -7
package/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # cartoon
2
+
3
+ **Token-optimized output for any CLI.** Prefix `cartoon` onto a command and
4
+ its output becomes [TOON](https://github.com/toon-format/toon) — a compact
5
+ structured format built for LLM agents. Same exit codes, same behavior,
6
+ ~70%+ fewer tokens on test runs.
7
+
8
+ This package installs the `cartoon` binary (prebuilt per platform via
9
+ optionalDependencies — no Rust toolchain needed).
10
+
11
+ ```bash
12
+ npm install -g cartoon-wrap
13
+ ```
14
+
15
+ ## Use
16
+
17
+ ```bash
18
+ cartoon pytest # asymmetric test report in TOON
19
+ cartoon npx jest src/ # same for jest
20
+ cartoon python -m unittest # same for unittest
21
+ cartoon aws ec2 describe-instances --output json # any JSON CLI → TOON
22
+ cartoon --fast pytest # opt-in: parallel via pytest-xdist
23
+ cartoon stats --since 7d # how many tokens you've saved
24
+ cartoon logs --last --stdout # full raw output of the newest run
25
+ ```
26
+
27
+ Failing test run, before (~4800 tokens) vs after (~300 tokens):
28
+
29
+ ```
30
+ runner: pytest
31
+ summary:
32
+ total: 48
33
+ passed: 45
34
+ failed: 2
35
+ skipped: 1
36
+ duration_s: 3.2
37
+ failures[2]{id,loc,msg}:
38
+ "tests/test_auth.py::test_expiry","tests/test_auth.py:42",assert exp < now
39
+ "tests/test_user.py::test_create","tests/test_user.py:88","KeyError: 'email'"
40
+ ```
41
+
42
+ ## Guarantees
43
+
44
+ - Exit codes always mirrored — `cartoon pytest && deploy` behaves like
45
+ `pytest && deploy`.
46
+ - If parsing fails, the original output passes through untouched.
47
+ - A transform must pay for itself (tokens counted, footer included) or the
48
+ original is emitted byte-identically.
49
+ - Every run's full raw output is archived locally and linked via a
50
+ `raw_log:` footer — nothing is ever lost.
51
+
52
+ ## For coding agents
53
+
54
+ Teach Claude Code, Codex, Cursor & co. to wrap commands automatically —
55
+ skills and a Claude Code plugin ship in the repo:
56
+ [github.com/abhijitbansal/cartoon](https://github.com/abhijitbansal/cartoon#for-agents-claude-code-codex-copilot-cursor-).
57
+
58
+ Full documentation: [github.com/abhijitbansal/cartoon](https://github.com/abhijitbansal/cartoon)
59
+
60
+ MIT
package/package.json CHANGED
@@ -1,17 +1,31 @@
1
1
  {
2
2
  "name": "cartoon-wrap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Token-optimized TOON output wrapper for any CLI (installs the `cartoon` binary)",
5
5
  "license": "MIT",
6
- "repository": "github:abhijitbansal/cartoon",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/abhijitbansal/cartoon.git"
9
+ },
10
+ "homepage": "https://github.com/abhijitbansal/cartoon",
11
+ "keywords": [
12
+ "llm",
13
+ "agents",
14
+ "tokens",
15
+ "toon",
16
+ "cli",
17
+ "pytest",
18
+ "jest",
19
+ "test-output"
20
+ ],
7
21
  "bin": {
8
22
  "cartoon": "bin/cartoon.js"
9
23
  },
10
24
  "optionalDependencies": {
11
- "cartoon-wrap-darwin-arm64": "0.1.0",
12
- "cartoon-wrap-darwin-x64": "0.1.0",
13
- "cartoon-wrap-linux-arm64": "0.1.0",
14
- "cartoon-wrap-linux-x64": "0.1.0",
15
- "cartoon-wrap-win32-x64": "0.1.0"
25
+ "cartoon-wrap-darwin-arm64": "0.1.1",
26
+ "cartoon-wrap-darwin-x64": "0.1.1",
27
+ "cartoon-wrap-linux-arm64": "0.1.1",
28
+ "cartoon-wrap-linux-x64": "0.1.1",
29
+ "cartoon-wrap-win32-x64": "0.1.1"
16
30
  }
17
31
  }