Skip to content

Implement devlog doctor for local setup and configuration diagnostics #8

Description

@gustmrg

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions