OCP-INDEX(1)
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.WHENis eitheralways,neverorauto. π--context=FILEPOSβ will analyse the context at givenFILE[:LINE[,COL]]to give appropriate answers w.r.t open modules, etc. To read from stdin, specify just:, or alternativelyFILENAME:-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.cmtis 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:LISTis 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:LISTis a comma-separated list oftypes,valuesand methods,exceptions,constructs(record fields and sum type constructors),modulesand classes,sigs(module and class types),keywords. The default isv,e,c,m,k. π
π COMMON OPTIONS π
--help[=FMT] (default=auto)β show this help in formatFMT. The valueFMTmust be one ofauto,pager,grofforplain. Withauto, the format ispagerorplainwhenever theTERMenv var isdumbor 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