Add doctor and config diagnostics commands#123
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive diagnostics and configuration inspection commands to fizzy-cli:
Summary:
The PR implements three main features: fizzy doctor for complete CLI health diagnostics, fizzy config show to display effective configuration, and fizzy config explain to explain configuration precedence. These commands help users understand setup health, diagnose issues, and troubleshoot configuration problems without guessing.
Changes:
- Adds
fizzy doctorcommand with comprehensive health checks (CLI version, runtime, config validity, profile store, API connectivity, authentication, board access, shell completion, skill installation, and agent integration) - Adds
fizzy config showandfizzy config explaincommands to inspect configuration precedence and resolved values - Exports
GlobalConfigPaths()from config package to support diagnostics - Improves mock test handler to generically strip account prefixes while preserving "my" and "signup" paths
- Updates documentation, README, help metadata, and embedded skill docs to surface new commands
- Regenerates SURFACE.txt command snapshots
- Includes comprehensive test coverage for both new commands
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/commands/doctor.go | Main diagnostics command (~1373 lines) with checks for installation, config, auth, API, board access, shell integration, and agent setup |
| internal/commands/doctor_test.go | Comprehensive tests for doctor command including healthy setup, credential checks, config validation, and profile sweep scenarios |
| internal/commands/config_cmd.go | Config show/explain commands (~543 lines) with precedence resolution and human-readable output |
| internal/commands/config_cmd_test.go | Tests for config show and explain commands with precedence validation |
| internal/config/config.go | Exports GlobalConfigPaths() as public API for doctor diagnostics |
| internal/commands/test_helpers_test.go | Improves mock handler to generically strip account-scoped SDK paths |
| SURFACE.txt | Auto-generated command surface snapshots updated with new commands |
| skills/fizzy/SKILL.md | Embeds references to new diagnostic commands |
| README.md | Adds quickstart steps and troubleshooting section for new commands |
| internal/commands/help.go | Adds help metadata and examples for new commands |
| internal/commands/quickstart.go | Includes new commands in quickstart suggestions |
| internal/commands/commands.go | Adds "doctor" and "config" to utilities command group |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
8ce7ae4 to
c7b4f8f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- doctorTargetsFromProfileStore now falls through to local/global YAML config for api_url and board when the profile store lacks values, matching the precedence in resolveDoctorEffectiveConfig() - doctorStoredTokenSourceForProfile no longer gates YAML tokens on account name match, matching the unconditional fallback behaviour in config.Load() and doctorTokenSourceWithValue() - configShowData verbose path uses "profiles" key (not "saved_profiles") so renderConfigShowHuman finds the profile list
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This adds a comprehensive diagnostics workflow to
fizzy-cliso users can understand the health of their install, configuration, authentication, profile setup, and agent integrations without guessing. The goal is to make setup and troubleshooting much easier, especially now that Fizzy supports multiple profiles, layered config precedence, and agent-specific setup.What’s included
fizzy doctorfor full CLI health diagnosticsfizzy doctor --profile NAMEto check one saved profile explicitlyfizzy doctor --all-profilesto sweep every saved profilefizzy config showto display the effective configfizzy config explainto explain precedence and why each value wonNotes
doctoris read-only and provides remediation hints / next steps instead of attempting auto-fixconfig showfocuses on the resolved valuesconfig explainfocuses on precedence and overridden candidatesSummary by cubic
Adds
fizzy doctorfor a full, read‑only health check and newfizzy configtools to show and explain effective configuration. Also fixes precedence and verbose output issues indoctor --all-profilesandconfig show.New Features
fizzy doctorwith--profile NAME,--all-profiles,--verbose,--json: runs install/config/profile store/credentials/API URL & reachability/auth/account access/default board/shell completion/agent skill checks; includes filesystem and insecure HTTP warnings; shows remediation hints and next steps; per‑profile results when sweeping; Claude integration issues are warnings.fizzy config showandfizzy config explain: display effective values and why they won (flags/env/profile/local/global); never prints tokens, only whether configured and storage source; lists saved profiles.help, README, and skill docs updated to surface diagnostics.doctorandconfig.Bug Fixes
doctor --all-profilesnow falls back to local/global YAML forapi_urlandboardwhen the profile store lacks values, matching effective precedence.config.Load().config show --verbosecorrectly shows saved profiles by using theprofileskey so the human renderer finds the list.Written for commit 12ad2e3. Summary will update on new commits.