Skip to content

feat(cli): add global --json output flag - #36

Merged
kldzj merged 2 commits into
mainfrom
feat/cli-json-flag
Jul 7, 2026
Merged

feat(cli): add global --json output flag#36
kldzj merged 2 commits into
mainfrom
feat/cli-json-flag

Conversation

@kldzj

@kldzj kldzj commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Adds a persistent --json flag so the CLI can be scripted against
instead of parsing styled text.

  • Every command emits its own JSON object on stdout (reads and mutations)
  • Failures print {"error":"..."} to stderr and still exit non-zero
  • validate --json writes the report to stdout and keeps its non-zero
    exit when there are errors

Tests cover the main commands.

kldzj added 2 commits July 7, 2026 14:07
Every command can emit machine-readable JSON on stdout instead of styled
text. Errors print as {"error":"..."} to stderr with a non-zero exit,
so scripts can read stdout and gate on the exit code.
@kldzj
kldzj merged commit bc9986a into main Jul 7, 2026
1 check passed
@kldzj
kldzj deleted the feat/cli-json-flag branch July 7, 2026 12:09
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