CLI Reference
memories doctor
Run deterministic health checks and get exact remediation steps.
memories doctor [options]Run deterministic diagnostic checks across local DB, MCP wiring, project detection, and cloud integration.
Options
| Option | Description |
|---|---|
--fix | Attempt to fix issues found |
--json | Output machine-readable report (stable schema) |
--local-only | Skip cloud health checks and validate local mode only |
--strict | Exit with code 1 when warnings or failures exist |
Checks Performed
- Database file — Verifies the database file exists at the expected path
- Connection — Tests that the database can be opened and queried
- Schema integrity — Runs
PRAGMA integrity_checkto verify data consistency - FTS index — Checks the full-text search index is operational and that no soft-deleted records have leaked into the FTS index
- Write path — Validates insert/update/delete triggers and end-to-end write safety
- MCP wiring — Checks MCP is configured for detected tools
- Cloud integration — Verifies auth/session/workspace health endpoint connectivity
- Git detection — Verifies project detection is working in the current directory
- Orphaned memories — Checks for project-scoped memories with no matching project
- Soft-deleted records — Reports the count of soft-deleted records
Fix Mode
When --fix is passed, the doctor will:
- Permanently purge (hard-delete) all soft-deleted records
- Rebuild the FTS5 full-text search index
memories doctor --fixExamples
Run diagnostics:
memories doctorDiagnose and fix:
memories doctor --fixMachine-readable report for CI/automation:
memories doctor --json --strictLocal-only validation (no login/workspace requirement):
memories doctor --local-only--json now returns:
schemaVersion(current:1.1)checks[]with stableid,code,category,status,message,remediationnextSteps[]aggregated from non-pass checks (deduplicated, priority ordered)