doc
js/cli/doc.md
fino doc is the documentation workflow for Fino-style modules and guide
pages. Use it to turn markdown guides and markdown-first TypeScript comments
into generated API references, searchable HTML, and example tests. The same
command also searches generated docs and displays individual symbols from the
generated database.
fino doc build --types runtime-builtins.d.ts js
Use --types runtime-builtins.d.ts when documenting this repository so
synthetic public modules such as fino:ffi and fino:profiler are included.
Generated output is written under docs/, which is ignored by git. Build the
docs before using show, search, or reviewing rendered guide structure.
Invoking fino doc without a subcommand runs the same build path as
fino doc build.
build
Build generated documentation from source files, source directories, glob patterns, and markdown guides. This is the command to run after changing public comments, guide pages, or declaration files:
fino doc build js
fino doc build --format html --title "Fino Runtime" js
fino doc build --include-private --types runtime-builtins.d.ts js
| Name | Value | Description |
|---|---|---|
files... |
strings | Required. Source files, directories, or glob patterns to document. |
--format |
markdown, html, or both |
Output format. Defaults to markdown. |
--title |
string | Title used for generated HTML pages. |
--include-private |
boolean | Include private and internal declarations. |
--types |
string, repeatable | Additional declaration files, directories, or globs to merge into API docs. |
--format=html writes browsable HTML plus the search database. --format=both
writes both markdown and HTML output. --include-private is useful for docs
coverage audits but should not be used for public docs output.
show
Print one documented symbol as Markdown. Use this to inspect how a module, class, method, or generated symbol will read without opening the full HTML site:
fino doc show bench.Group.measure
| Name | Value | Description |
|---|---|---|
symbol |
string | Required. Symbol id or name to display. |
--fino |
boolean | Show from the Fino runtime's own documentation instead of the project's. |
--packages |
boolean | Show from the documentation of the project's direct dependencies. |
--package NAME |
string | Show from one installed package's documentation. Repeatable. |
show reads generated docs data, so run fino doc build first when source
comments have changed.
search
Search generated docs from the command line. Use this when checking whether a concept is discoverable by the words users are likely to type:
fino doc search websocket
fino doc search task parse
| Name | Value | Description |
|---|---|---|
query... |
strings | Required. Search terms. Multiple words are joined into one query. |
--fino |
boolean | Search the Fino runtime's own documentation instead of the project's. |
--packages |
boolean | Search the documentation of the project's direct dependencies. |
--package NAME |
string | Search one installed package's documentation. Repeatable. |
Search returns matching modules, symbols, guides, and sections from the generated docs database.
The runtime's own documentation
--fino points show and search at the documentation for the fino:*
modules, guides, and runtime declarations of the Fino binary you are running,
from any directory and without a project build:
fino doc search --fino websocket
fino doc show --fino mcpServer
Every binary embeds the sources that documentation is generated from, so it
always matches the runtime in use. The first --fino lookup builds it, which
takes about as long as fino doc build over the runtime, and stores it in
$XDG_CACHE_HOME/fino/docs (or ~/.cache/fino/docs), or in the absolute
directory FINO_DOCS_CACHE names. Later lookups from any project reuse it
until the binary changes; the cache keeps the builds of the three most
recently built binaries.
Installed packages' documentation
--packages points show and search at the packages the project depends on
directly, as recorded by fino install in .fino/package-map.json, and
--package NAME at one installed package, direct or not:
fino doc search --packages parse
fino doc show --package zod ZodType
Each result names the package and version it came from. A package is documented from its type declarations when it ships any, otherwise from its TypeScript or JavaScript sources, with its README as a guide. Each release is built once on first use into the same cache as the runtime's documentation and shared by every project that installs it. A package with nothing to document is listed under "Not documented" instead of failing the search.
test
Run runnable fenced examples from documentation comments. This keeps examples in API comments honest without requiring each snippet to be duplicated in a hand-written test file:
fino doc test js
| Name | Value | Description |
|---|---|---|
files... |
strings | Required. Source files, directories, or glob patterns whose documentation examples should be tested. |
Runnable examples are imported into isolated realms. Examples marked with non-runnable metadata are ignored, and examples marked as throwing are expected to reject.