Problem
CLI output currently supports two formats: --json (verbose, high token count) and a human-readable table. For LLM-powered toolchains that consume CLI output programmatically, JSON is wasteful — it duplicates keys on every row and adds structural overhead.
Proposal
Add --toon as a third global output format. TOON (Token-Oriented Object Notation) is a line-oriented, indentation-based data format designed as a compact lossless representation of the JSON data model, optimized for LLM prompt injection.
Design
- Global
--toon flag registered in Commander.js
outputTable: when toonMode is set, prints tabular TOON ([N]{fields}:) instead of cli-table3
outputJson: when --toon and --json both present, reroutes to outputJsonToon which produces TOON key-value format
- No new runtime dependencies — hand-written formatter (~130 lines in
src/lib/output.ts)
Token savings (measured)
projects list on a single project:
- JSON: 989 B / ~250 tokens
- TOON: 129 B / ~32 tokens (7.7× reduction)
Status
Working PR at #215 — this issue tracks the prerequisite checklist before final merge.
Problem
CLI output currently supports two formats:
--json(verbose, high token count) and a human-readable table. For LLM-powered toolchains that consume CLI output programmatically, JSON is wasteful — it duplicates keys on every row and adds structural overhead.Proposal
Add
--toonas a third global output format. TOON (Token-Oriented Object Notation) is a line-oriented, indentation-based data format designed as a compact lossless representation of the JSON data model, optimized for LLM prompt injection.Design
--toonflag registered in Commander.jsoutputTable: whentoonModeis set, prints tabular TOON ([N]{fields}:) instead of cli-table3outputJson: when--toonand--jsonboth present, reroutes tooutputJsonToonwhich produces TOON key-value formatsrc/lib/output.ts)Token savings (measured)
projects liston a single project:Status
Working PR at #215 — this issue tracks the prerequisite checklist before final merge.