Skip to content

Add JSON output for basectl check#48

Merged
codeforester merged 1 commit into
masterfrom
hpr/basectl-check-json
May 25, 2026
Merged

Add JSON output for basectl check#48
codeforester merged 1 commit into
masterfrom
hpr/basectl-check-json

Conversation

@codeforester
Copy link
Copy Markdown
Owner

Summary

  • Add basectl check --format json
  • Preserve the default human-readable logging behavior on stderr
  • Emit structured check results to stdout for automation
  • Keep existing exit-code semantics:
    • 0 when all checks pass
    • 1 when any requirement is missing
  • Validate unsupported output formats
  • Mark the TODO item complete

JSON Output

Example:

{
  "ok": true,
  "checks": [
    {"name":"homebrew","ok":true,"message":"Homebrew is installed."},
    {"name":"xcode_command_line_tools","ok":true,"message":"Xcode Command Line Tools are installed."},
    {"name":"python","ok":true,"message":"Python formula 'python@3.13' is installed via Homebrew."},
    {"name":"bats","ok":true,"message":"BATS formula 'bats-core' is installed via Homebrew."},
    {"name":"base_virtualenv","ok":true,"message":"Virtual environment exists at '/Users/rameshhp/.base.d/base/.venv'."}
  ]
}

@codeforester codeforester merged commit 4a86277 into master May 25, 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