← clify home · catalogue

opam-ocaml API for agents (unofficial) — JSON over curl | clify

opam.ocaml.org is the official OCaml package repository site. This CLI lists all opam packages (by name or by last update), and fetches package and version details, dependencies and reverse dependencies, from the server-rendered HTML.

Host: opam.ocaml.org. Call these verified read commands with plain curl; no install, key, or account. Use the public JSON API with plain curl. No install, key, account, or browser is needed. Example: curl 'https://clify-dev.netlify.app/sites.json'. Start with /search?q=weather, then call /abc/COMMAND. Responses are one JSON object. The hosted MCP and GitHub repo are also available.

Commands

list-packages

List every opam package alphabetically by name, with latest version and description. The full list comes back in one response; filter it yourself to search. Params: none

curl 'https://clify-dev.netlify.app/opam-ocaml/list-packages'

list-recent-packages

List opam packages sorted by their most recent publish date, newest first, with latest version and description. Params: none

curl 'https://clify-dev.netlify.app/opam-ocaml/list-recent-packages'

get-package

Get details of the latest version of an opam package: synopsis, description, author, license and latest version. Params: name*

curl 'https://clify-dev.netlify.app/opam-ocaml/get-package'

list-package-versions

List all published versions of an opam package, with links to each version's detail page. Params: name*

curl 'https://clify-dev.netlify.app/opam-ocaml/list-package-versions'

get-package-version

Get details of a specific version of an opam package: synopsis, description, author, license, source URL/checksums and other metadata. Params: name*, version*

curl 'https://clify-dev.netlify.app/opam-ocaml/get-package-version'

get-package-dependencies

List the dependency formula entries (dependencies, optional deps and conflicts) of a specific opam package version, with version constraints. Params: name*, version*

curl 'https://clify-dev.netlify.app/opam-ocaml/get-package-dependencies'

list-package-dependents

List the packages that require a given opam package (reverse dependencies, 'Required by'), with their version constraints. Params: name*

curl 'https://clify-dev.netlify.app/opam-ocaml/list-package-dependents'