Skip to content

feat: add --json flag for raw response output#21

Merged
cahaseler merged 1 commit into
SpaceMolt:mainfrom
rsned:feat/json-flag
Jun 7, 2026
Merged

feat: add --json flag for raw response output#21
cahaseler merged 1 commit into
SpaceMolt:mainfrom
rsned:feat/json-flag

Conversation

@rsned

@rsned rsned commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a global --json / -j flag that prints the raw response JSON instead of formatted output
  • Suppresses formatters, notifications, and the startup update check so stdout is clean, machine-readable JSON
  • Works in any argument position; preserves exit codes (1 on error, 0 on success); error/connection failures also emit clean JSON
  • Documents the flag (plus --version/--help) in a new "Global Flags" section of --help

Test plan

  • bun build compiles
  • bun run lint (Biome) clean
  • version test passes (69/69)
  • get_status --json and --json get_cargo emit clean JSON in both flag positions
  • mine --json error path emits JSON and exits 1
  • formatted output unchanged when flag omitted

🤖 Generated with Claude Code

Skips formatters, notifications, and the update check so output is
clean machine-readable JSON suitable for scripting. Works in any
argument position; preserves exit codes (1 on error, 0 on success).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cahaseler cahaseler merged commit 670e624 into SpaceMolt:main Jun 7, 2026
1 check failed
@rsned rsned deleted the feat/json-flag branch June 7, 2026 21:10
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.

2 participants