CLI Reference
betterspec doctor
Check betterspec health and diagnose issues
betterspec doctor
Run diagnostic checks on your betterspec setup and optionally attempt to fix any issues found.
Usage
betterspec doctorOptions
| Option | Description |
|---|---|
--fix | Attempt to automatically fix detected issues |
-C, --cwd <path> | Run as if betterspec was started in <path> |
Checks performed
- Config valid —
betterspec/config.yamlexists and parses without errors. - Directory structure — Required directories (
changes/active,changes/archive,capabilities) exist. - No orphaned changes — No change directories reference missing or deleted specs.
Examples
$ betterspec doctor
Checking betterspec health...
[pass] Config valid
[pass] Directory structure intact
[fail] Orphaned change: fix-auth references missing spec auth-flow.md
1 issue found. Run with --fix to attempt repair.Auto-fix issues:
$ betterspec doctor --fix
Checking betterspec health...
[pass] Config valid
[fixed] Created missing directory: betterspec/capabilities
[pass] No orphaned changes
1 issue fixed. All checks passing.