doctor

CI license

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.

What It Checks

What It Does Not Do

Installation From Source

git clone https://github.com/funwithcthulhu/doctor
cd doctor
opam install . --deps-only --with-test
dune build
dune runtest

If your shell has not been synced with the active opam switch, use opam exec -- dune build and opam exec -- dune runtest.

Local Install

opam pin add doctor . -y

When 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=path

After publication to opam-repository, the expected user flow is:

opam update
opam install doctor
doctor check

Usage

doctor check
doctor version
doctor --help

doctor version prints:

doctor 0.1.0

Example Output

$ 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 ERROR

Exit Codes

Development

Build:

dune build

Run tests:

dune runtest

Run locally without installing:

dune exec doctor -- check

If 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.

Contribution Ideas

Release Process

Maintainer release steps are documented in RELEASE.md.