Add a devlog doctor command to validate local setup, configuration, and common runtime prerequisites.
Context:
- DevLog depends on a local filesystem layout under
~/.devlog/
- Summary generation depends on valid config and, when enabled, LLM-related environment variables
- A diagnostic command would make onboarding, support, and troubleshooting much easier
Expected behavior:
- Run a set of health checks and print a human-readable report
- Clearly distinguish:
- successful checks
- warnings
- failures
- Exit non-zero when critical problems are found
Checks should include:
~/.devlog/ exists
config.json exists and can be parsed
- entries/, summaries/, and templates/ directories exist
- core config keys are present and valid
- if
llm.enabled=true, the configured API key environment variable is set
- optionally validate that stored summary files and entry files are readable
Possible enhancements:
--fix to create missing directories or repair safe, trivial issues
--json for machine-readable output
--verbose for more detailed diagnostics
Implementation notes:
- Reuse existing config and store utilities where possible
- Keep the first version focused on safe read-only checks unless
--fix is explicitly used
- Output should be actionable, not just descriptive
Acceptance criteria:
devlog doctor exists and appears in help output
- It detects missing config or directories
- It reports invalid config or missing required environment variables
- It exits with a failing status when critical setup issues are found
- Output gives the user clear next steps to resolve problems
Add a devlog doctor command to validate local setup, configuration, and common runtime prerequisites.
Context:
~/.devlog/Expected behavior:
Checks should include:
~/.devlog/existsconfig.jsonexists and can be parsedllm.enabled=true, the configured API key environment variable is setPossible enhancements:
--fixto create missing directories or repair safe, trivial issues--jsonfor machine-readable output--verbosefor more detailed diagnosticsImplementation notes:
--fixis explicitly usedAcceptance criteria:
devlog doctorexists and appears in help output