Skip to content

Complete machine-readable CLI output - #6

Merged
zhou-wang-git merged 1 commit into
mainfrom
codex/complete-json-output
Jul 17, 2026
Merged

Complete machine-readable CLI output#6
zhou-wang-git merged 1 commit into
mainfrom
codex/complete-json-output

Conversation

@zhou-wang-git

Copy link
Copy Markdown
Member

What changed

  • add machine-readable output to init and capture
  • return structured JSON usage and runtime errors
  • reject unknown and extra inspect and verify arguments
  • document the published npm Quick Start and JSON/exit-code contract

Why

BugBundle's automation contract was incomplete: some commands supported JSON while init, capture, and error paths still emitted plain text. Loose argument parsing could also silently accept invalid invocations.

This makes the CLI predictable for scripts and AI tools while preserving existing human-readable output.

Impact

  • normal CLI output remains unchanged
  • --json callers receive parseable stdout on success and structured stderr on failure
  • invalid options and extra bundle paths now exit with code 2 instead of being ignored

Validation

  • pnpm check
  • pnpm build
  • real capture/verify dogfood with exit-code capture, secret redaction, ZIP content scan, and integrity verification

@zhou-wang-git
zhou-wang-git marked this pull request as ready for review July 17, 2026 13:33
@zhou-wang-git
zhou-wang-git merged commit 5aad513 into main Jul 17, 2026
6 checks passed
@zhou-wang-git
zhou-wang-git deleted the codex/complete-json-output branch July 17, 2026 13:33
@zhou-wang-git zhou-wang-git mentioned this pull request Jul 17, 2026
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