Skip to content

[DX] Add apc doctor command for environment diagnostics #22

@FZ2000

Description

@FZ2000

Problem

There's no way for a user to verify their APC installation is healthy. Common failure scenarios:

  • Python version is too old (requires 3.12+, but error only surfaces when running commands)
  • OS keychain is unavailable (Linux without libsecret, WSL, headless CI)
  • age binary missing (needed for export/import encryption)
  • No LLM configured (silent failure: apc memory sync quietly does nothing)
  • ~/.apc/ directory corrupted / permissions issue

Currently a new user has to discover these issues one by one, command by command.

Suggested Fix

Add apc doctor that prints a system health report:

$ apc doctor

  System Checks
  ─────────────
  ✓ Python 3.12.2 (required: 3.12+)
  ✓ apc cache directory: ~/.apc/ (exists, writable)
  ✓ OS keychain: available (macOS Keychain)
  ✗ age binary: not found — export/import encryption unavailable
    → Install: brew install age
  ✓ LLM configured: anthropic/claude-sonnet-4-6
  
  Detected Tools
  ──────────────
  ✓ claude-code: ~/.claude/
  ✓ cursor: ~/.cursor/
  ✗ gemini-cli: not installed

This is a common pattern in developer CLIs (e.g., brew doctor, flutter doctor, rails doctor) and dramatically improves first-run success rate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions