@butttons/dora 1.6.1 → 1.7.0

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 (3) hide show
  1. package/README.md +61 -2
  2. package/dist/index.js +692 -199
  3. package/package.json +6 -1
package/README.md CHANGED
@@ -54,7 +54,21 @@ sudo mv dora /usr/local/bin/
54
54
  # Download dora-windows-x64.exe and add to PATH
55
55
  ```
56
56
 
57
- ### Option 2: Build from Source
57
+ ### Option 2: Install via npm
58
+
59
+ Requires [Bun](https://bun.sh) runtime installed.
60
+
61
+ ```bash
62
+ bun install -g @butttons/dora
63
+ ```
64
+
65
+ Or run without installing:
66
+
67
+ ```bash
68
+ bunx @butttons/dora
69
+ ```
70
+
71
+ ### Option 3: Build from Source
58
72
 
59
73
  ```bash
60
74
  # Install Bun (if not already installed)
@@ -445,7 +459,52 @@ Quick reference for all commands with common flags:
445
459
 
446
460
  ## Output Format
447
461
 
448
- All commands output valid JSON to stdout. Errors go to stderr with exit code 1.
462
+ All commands output [TOON](https://github.com/toon-format/toon) (Token-Oriented Object Notation) by default. TOON is a compact, human-readable encoding of JSON that minimizes tokens for LLM consumption. Pass `--json` to any command for JSON output.
463
+
464
+ ```bash
465
+ # Default: TOON output
466
+ dora status
467
+
468
+ # JSON output
469
+ dora --json status
470
+ dora status --json
471
+ ```
472
+
473
+ Errors always go to stderr as JSON with exit code 1.
474
+
475
+ ### TOON vs JSON size comparison
476
+
477
+ Measured on dora's own codebase (79 files, 3167 symbols):
478
+
479
+ | Command | JSON | TOON | Savings |
480
+ |---|---|---|---|
481
+ | `status` | 206 B | 176 B | 15% |
482
+ | `map` | 68 B | 62 B | 9% |
483
+ | `ls src/commands` | 2,258 B | 975 B | **57%** |
484
+ | `ls` (all files) | 6,324 B | 2,644 B | **58%** |
485
+ | `file src/index.ts` | 6,486 B | 6,799 B | -5% |
486
+ | `symbol setupCommand` | 130 B | 130 B | 0% |
487
+ | `refs wrapCommand` | 510 B | 549 B | -8% |
488
+ | `deps (depth 2)` | 2,158 B | 1,332 B | **38%** |
489
+ | `rdeps (depth 2)` | 1,254 B | 802 B | **36%** |
490
+ | `adventure` | 110 B | 97 B | 12% |
491
+ | `leaves` | 142 B | 129 B | 9% |
492
+ | `exports` | 488 B | 511 B | -5% |
493
+ | `imports` | 1,978 B | 1,998 B | -1% |
494
+ | `lost` | 1,876 B | 1,987 B | -6% |
495
+ | `treasure` | 893 B | 577 B | **35%** |
496
+ | `cycles` | 14 B | 11 B | 21% |
497
+ | `coupling` | 35 B | 31 B | 11% |
498
+ | `complexity` | 2,716 B | 932 B | **66%** |
499
+ | `schema` | 6,267 B | 4,389 B | **30%** |
500
+ | `query` | 692 B | 464 B | **33%** |
501
+ | `docs` | 1,840 B | 745 B | **60%** |
502
+ | `docs search` | 277 B | 171 B | **38%** |
503
+ | `docs show` | 820 B | 870 B | -6% |
504
+ | `graph` | 2,434 B | 1,894 B | **22%** |
505
+ | `changes` | 1,112 B | 1,026 B | 8% |
506
+
507
+ Commands with uniform arrays of objects (ls, complexity, docs, treasure) see 35-66% reduction. Nested or non-uniform outputs (file, refs, exports) are roughly equal or slightly larger.
449
508
 
450
509
  ## Debug Logging
451
510