doctor is a small diagnostic CLI for OCaml development environments.
Status: early 0.1.0 tool, intended to be useful and conservative rather than complete.
opam, ocaml, dune, OCaml LSP (ocaml-lsp-server or ocamllsp), and ocamlformat.ocaml command with the active opam switch bin directory where possible.dune, ocaml-lsp-server, ocamlformat, and optional utop.code command is available.opam init, opam switch create, or opam install for you.git clone https://github.com/funwithcthulhu/doctor
cd doctor
opam install . --deps-only --with-test
dune build
dune runtestIf your shell has not been synced with the active opam switch, use opam exec -- dune build and opam exec -- dune runtest.
opam pin add doctor . -yWhen testing uncommitted local changes, prefer a path pin so opam reads the working tree instead of git+file://...#main:
opam pin add doctor . -y --kind=pathAfter publication to opam-repository, the expected user flow is:
opam update
opam install doctor
doctor checkdoctor check
doctor version
doctor --helpdoctor version prints:
doctor 0.1.0$ doctor check
OCaml Doctor
[OK] platform detected: macOS
[OK] opam found: 2.2.1
[OK] OCaml found: 5.2.0
[OK] dune found: 3.17.0
[OK] OCaml LSP found: 1.19.0 (ocamllsp)
[WARN] ocamlformat not installed
Suggested fix: opam install ocamlformat
[OK] active switch: 5.2.0
[WARN] VS Code OCaml Platform extension not detected
Suggested fix: Install extension ocamllabs.ocaml-platform in VS Code.
Summary: 6 OK, 2 WARN, 0 ERROR0: no warnings or errors1: one or more warnings, no errors2: one or more errors3: unexpected internal failureBuild:
dune buildRun tests:
dune runtestRun locally without installing:
dune exec doctor -- checkIf dune is not available on PATH, prefix these commands with opam exec --.
Tests use injectable process runners and deterministic fixtures. They should not require the local machine to have opam configured, VS Code installed, or a specific shell setup.
Maintainer release steps are documented in RELEASE.md.