Skip to main content

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

#CheckWhat it verifies
1Ollama reachableGET http://localhost:11434 responds 200 within 5 s
2Ollama CLI installedollama binary on $PATH; prints version when found
3Home directory writableCan write a temp file inside ~/.locopilot/
4SQLite database exists~/.locopilot/db.sqlite exists and is non-empty
5Disk space (> 500 MB free)fs.statfsSync reports at least 500 MB available — models take several GB each
6Python 3python3 --version returns Python 3.x
7Training adapterOn Apple Silicon: import mlx_lm works. Everywhere else: import unsloth works.
8Local API server reachableGET /v1/locopilot/health responds 200 — i.e. locopilot start is running
9(Pro) Cloud reachableGET /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

CodeMeaning
0All checks passed
1One or more checks failed

Use it in CI scripts before running an integration suite that depends on a working stack.