Skip to content
Produce documentation for libraries installed with OPAM
OCaml JavaScript CSS Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Produce documentation for OPAM packages.

  • Depending on : opam, cow, compiler-libs.common, unix, ocamlfind
  • Requires: system compiler version >= 4.01


Compile the library and and install it by running:

make install

This will create a new OPAM switch called doc, using a system compiler switch with two small wrappers scripts which will call bin-doc after each invocation of the compiler.

Now you can generate the documentation for any package using:

opam doc PKG1 ... PKGn

The packages will be installed in the doc switch, and their documentation will be served on You will need to either opam install async cohttp or have Python installed for the local webserver to work.

Set the OPAMDOC_BASE_URI environment variable to the URI that you wish to replace by in the generated HTML.

You can’t perform that action at this time.