locopilot doctor
Run pre-flight checks.
Source: src/cli/commands/doctor.ts
Synopsis
locopilot doctor
No flags. Always exits with code 1 if any check fails.
Checks
| # | Check | What it verifies |
|---|---|---|
| 1 | Ollama reachable | GET http://localhost:11434 responds 200 within 5 s |
| 2 | Ollama CLI installed | ollama binary on $PATH; prints version when found |
| 3 | Home directory writable | Can write a temp file inside ~/.locopilot/ |
| 4 | SQLite database exists | ~/.locopilot/db.sqlite exists and is non-empty |
| 5 | Disk space (> 500 MB free) | fs.statfsSync reports at least 500 MB available — models take several GB each |
| 6 | Python 3 | python3 --version returns Python 3.x |
| 7 | Training adapter | On Apple Silicon: import mlx_lm works. Everywhere else: import unsloth works. |
| 8 | Local API server reachable | GET /v1/locopilot/health responds 200 — i.e. locopilot start is running |
| 9 | (Pro) Cloud reachable | GET /api/auth/verify with your token returns 200 |
A failed check still proceeds to the next one — doctor is a status report, not a fail-fast gate.
Sample output
LocoPilot Doctor
Platform: darwin / arm64 / Node.js v20.18.0
✔ Ollama reachable
✔ Ollama CLI installed
✔ Home directory writable
✔ SQLite database exists
✔ Disk space (> 500 MB free)
✔ Python 3 (for training adapters)
✔ MLX adapter (mlx-lm)
✔ Local API server reachable
Pro: not logged in — run `locopilot login` to enable cloud features
Free tier ready.
If anything is wrong:
✖ Ollama reachable — fetch failed
✖ Ollama CLI installed — Not found — brew install --cask ollama
...
3 check(s) failed. Fix the issues above and retry.
Exit codes
| Code | Meaning |
|---|---|
0 | All checks passed |
1 | One or more checks failed |
Use it in CI scripts before running an integration suite that depends on a working stack.