Skip to content

Commit 6335f9b

Browse files
committed
feat(doctor): add --json output flag for programmatic consumption
Adds a `--json` flag to `mcpm doctor` so external tools can parse the health check status programmatically without scraping Rich-formatted text. The default Rich-text output is unchanged for human users. Implementation: refactored the existing doctor() function into a thin dispatcher that calls _collect_findings() (8 _check_* helpers, each returning a structured dict) then routes to either _render_text() (the existing Rich output, unchanged) or _render_json() (json.dumps of the findings dict). Net change: +193 LOC source (the file went from 193 to 386 LOC because the existing inline-print logic became per-section render helpers + per-section check helpers; no behavior change in the default text path), +160 LOC tests (13 tests covering both modes).
1 parent bdd5ed9 commit 6335f9b

2 files changed

Lines changed: 437 additions & 125 deletions

File tree

0 commit comments

Comments
 (0)