OCP-INDEX(1)

πŸ“¦
version 1.4.0 Β· 2 versions
, in alpine 3.24

okay bestie, welcome to the OCP-INDEX(1) page from the Ocp-index Manual β€” it's giving "tiny but mighty OCaml interface explorer," and honestly? iconic. πŸ’–

πŸ’– NAME πŸ’–

ocp-index β€” explore the interfaces of installed OCaml libraries. That's the whole assignment, and it slays.

✨ SYNOPSIS ✨

ocp-index [COMMAND] …

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ocp-index is a simple and light-weight documentation extractor for OCaml β€” for command-line or integrated use (e.g. for completion). It gathers information from .cmi files (like ocamlbrowser) and .cmt/.cmti files, including structure, location, type, and ocamldoc comments when available. No cap, it just pulls the receipts. πŸ’…

πŸŽ€ COMMANDS πŸŽ€

Here's the command fam, bestie:

  • complete [OPTION]… STRING β€” output completions for a given prefix. ✨
  • locate [OPTION]… STRING β€” get the location where an identifier was defined. πŸ“
  • print [OPTION]… STRING [FORMAT] β€” print information about an identifier with a custom format. πŸ–¨οΈ
  • type [OPTION]… STRING β€” print the type of an identifier. πŸ”Ž

πŸ’… OPTIONS πŸ’…

These are the flags, and yes, every single one is invited to the group chat:

  • --build=DIR β€” set the current project build dir (default: try to guess). πŸ—οΈ
  • -c WHEN, --color=WHEN β€” colorize the output. WHEN is either always, never or auto. 🌈
  • --context=FILEPOS β€” will analyse the context at given FILE[:LINE[,COL]] to give appropriate answers w.r.t open modules, etc. To read from stdin, specify just :, or alternatively FILENAME:- to still specify a filename which will be used to detect e.g. the owning library scope. 🧚
  • -F MODULES, --full-open=MODULES β€” like --open, but if the .cmt is available, load even the elements that would be restricted by the interface. Useful for the current file. πŸ”₯
  • -h LIST, --hide=LIST β€” kinds of elements not to show in answers: LIST is a comma-separated list of element kinds (see --show). πŸ™ˆ
  • -I DIRS β€” OCaml directories to (recursively) load the libraries from. πŸ“š
  • --no-build β€” don't include the build directory of the current project in lookups. 🚫
  • --no-opamlib β€” don't include the OPAM library directory (opam var lib) in lookups. 🚫
  • --no-stdlib β€” don't include the OCaml standard library directory (ocamlc -where) in lookups. 🚫
  • -O MODULES, --open=MODULES β€” consider the given (comma-separated list of) modules as opened for lookup. 🫢
  • --root=DIR β€” set the current project root (default: try to guess). 🌱
  • -s LIST, --show=LIST β€” kinds of elements to show in answers: LIST is a comma-separated list of types, values and methods, exceptions, constructs (record fields and sum type constructors), modules and classes, sigs (module and class types), keywords. The default is v,e,c,m,k. πŸ‘‘

🌈 COMMON OPTIONS 🌈

  • --help[=FMT] (default=auto) β€” show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined. 🫢
  • --version β€” show version information. 🌟

⭐ EXIT STATUS ⭐

ocp-index exits with the following status, bestie:

  • 0 β€” on success. βœ…
  • 123 β€” on indiscriminate errors reported on standard error. πŸ’€
  • 124 β€” on command line parsing errors. 😭
  • 125 β€” on unexpected internal errors (bugs). πŸ›

That's the whole page, bestie β€” footer check: Ocp-index version 1.4.0, page tag OCP-INDEX(1), with no date line in the original to quote. Go explore those installed OCaml library interfaces. Periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from
  • alpine 3.24: ocp-index-doc 1.4.0-r3 Β· LGPL-2.1-only WITH OCaml-LGPL-linking-exception AND GPL-3.0-only
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms