Skip to content

feat!: make CLI output JSON by default - #106

Merged
y0u-0 merged 1 commit into
mainfrom
feat/json-cli-output
Sep 5, 2026
Merged

feat!: make CLI output JSON by default#106
y0u-0 merged 1 commit into
mainfrom
feat/json-cli-output

Conversation

@y0u-0

@y0u-0 y0u-0 commented Sep 5, 2026

Copy link
Copy Markdown
Member

Behavior

Agents previously needed to select machine mode per command, while help, setup and hub output still required prose parsing. Commands now emit compact JSON by default in terminals and pipes, including structured help, version, setup receipts and failures. Diagnostics use JSONL on stderr.

Existing tool JSON payloads and --json invocations retain their shapes. Batch/field projection preserve their JSONL contracts; batch --json returns an array. Hub emits ready/reused/stopped records. Output defaults to 262,144 bytes per document or JSONL record with explicit truncation; an explicit batch byte ceiling bounds the whole batch. Human-output consumers must migrate, and large-result consumers can paginate, select fields or raise the byte budget.

Help and accepted options share one command registry. Setup receipts preserve planned/applied/manual artifacts and package-manager next steps without source dumps. Errors exclude malformed input and raw upstream exception text from trusted messages and provide safe recovery argv. Collector APIs are unchanged.

See the JSON CLI contract and research for the migration and primary Vercel CLI UX, Google Workspace CLI, GitHub CLI, agent-browser and JSON Lines sources. JSON-only defaults are an intentional Genie decision, not a claimed universal industry standard.

Validation

  • Full pnpm check: lint, types, build, installed release-artifact checks, 1,184 tests and documentation passed.
  • 52 built-CLI transcript checks: all command families, default/explicit JSON, help/version/errors, real filesystem setup, actual hub/reuse/interrupt cleanup, Unicode payloads larger than the pipe buffer, truncation and stream framing.
  • Live Chromium timeline through the built CLI without --json; all four lanes and script entry passed.
  • Packaged Vite browser-to-CLI suite passed: paged renders across commits/reload, freeze/thaw, quiescence, labelled spans and Query subscription evidence. Large paging fixture explicitly opts into its required byte budget.
  • Independent standards/spec reviews caught and resolved missing setup guidance, doctor failure metadata, error leakage and help/limit ambiguities. Regression tests failed before the corrections; cap and receipt mutations also demonstrated detection.

Pre-1.0 minor changeset explicitly declares the default-output migration. No new dependencies or hosted services.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@pkg-pr-new

pkg-pr-new Bot commented Sep 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@genie-react/cli@106
npm i https://pkg.pr.new/genie-react@106

commit: 6a3cadb

@y0u-0
y0u-0 merged commit ef1c58a into main Sep 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant