Offline API search
Find signatures, effects, contracts and documentation with sakura doc.
sakura doc looks up functions and types in your project and in the standard library, with no
network. Agents use it to check a signature instead of guessing; people can use it the same way.
Run these commands from a project directory:
sakura doc --search "fn(List<A>) -> Int"
sakura doc std::list::len
sakura doc --json std::list::len--searchtakes a type pattern: the shape of the function you want. The first command finds functions that take a list of anything and return anInt, such asList.len.- An argument containing
::, such asstd::list::len, is an exact symbol ID, the full name of one item. Any other argument searches by name.
The human output shows each match's symbol ID, signature, effect row (the side effects it may perform), contracts and doc comment when it has one.
JSON output
--json prints one JSON object, not JSON Lines: schema_version ("1.0"), kind
("symbol_query"), snapshot, total, symbols and truncated. Each symbol uses the same
shape as the MCP symbol_query tool, with a type field. No match gives total: 0 and exit 0,
and the human command prints “no symbol matches”. Treat that as an empty result, not an error.
Use MCP when an agent needs search alongside checking and edits. The
standard library page is a browsable copy of the same signatures.
sakura doc --index is not implemented.
Last updated