Reading the Docs
On this page
kli docs prints kli documentation straight to your terminal, fetched live as Markdown from the docs site. It always addresses the kli project, and what it prints is whatever the published docs currently say: there is no copy bundled with your installed kli, so the text never goes stale.
Subcommands
| Invocation | Effect |
|---|---|
kli docs | Print the kli docs index — the list of pages. |
kli docs <section>/<page> |
Print one page as Markdown, e.g. kli docs extend/lisp-extensions/anatomy. |
kli docs search <query> |
Print ranked search hits for <query>, each with the page path to fetch. |
kli docs help (--help, -h) | Print usage and exit. |
A page path is the part of a docs URL after the project, with no leading slash and no .md suffix. The page at docs.kleisli.io/kli/config/capabilities is kli docs config/capabilities. Search hits print their paths in the same form, so a hit feeds straight back into kli docs <path>.
Where it fetches from
kli docs reads from https://docs.kleisli.io by default. The project is always kli; the subcommand never addresses another project's docs.
| Variable | Default | Effect |
|---|---|---|
KLI_DOCS_BASE |
https://docs.kleisli.io | Origin to fetch the index, pages, and search from instead of the default — a private mirror or a local docs server. A trailing slash is ignored. |
KLEISLI_BASE_URL | unset |
Honoured as a fallback origin when KLI_DOCS_BASE is unset. |
The docs are fetched on demand, so they track the published site rather than the version of kli you have installed. A failed fetch — an unknown path, an unreachable origin, a non-200 response — reports the problem on standard error and exits non-zero, leaving standard output empty.