AI documentation CLI
Ooko ships ooko-doc, a zero-network command that reads the API catalogue generated with the library. It lets coding agents request only the symbol or section needed for a task instead of loading the complete documentation site.
Query the installed API
Run the CLI from a consumer project after installing Ooko:
npx --no-install ooko-doc list
npx --no-install ooko-doc show OButton
npx --no-install ooko-doc show OButton props
npx --no-install ooko-doc show useOokoValidation returns
npx --no-install ooko-doc show OForm usage
npx --no-install ooko-doc guide installationshow <symbol> returns the contract without the narrative usage section, and a hint naming how to get it. Request show <symbol> usage, or add --detailed for the contract and usage together.
Output is minified JSON by default to reduce token usage. Add --pretty for readable indentation. The command performs no network access; --no-install prevents npx from downloading a missing package.
Add the instruction to the consumer repository
Add a short instruction to the consumer repository's agent guide, such as AGENTS.md:
## Ooko UI
For Ooko UI API questions, run `npx --no-install ooko-doc list` first.
Then run `npx --no-install ooko-doc show <symbol> [section]` and inspect only the required section.The generated catalogue is also exposed as ooko-ui/api.json for tooling that needs the complete schema. Prefer the CLI for agents because section filtering produces substantially smaller results.
Agent workflow
- For a new consumer project, read
ooko-doc guide installation(plugin andooko-ui/style.cssregistration), thenooko-doc guide getting-started. - Run
ooko-doc listto find the public symbol and the available guides. - Query the symbol or one section such as
props,events,slots,parameters, orreturns. - Read the
usagesection for the example, accessibility notes, and edge cases, such as howOFormresolves validation rules byname. - Use the returned public import and contract without inspecting internal source or
distfiles.
Attributes and listeners that are not props, such as type="submit" on OButton, fall through to the element named by a component's nativeElement.
The API tables in this VitePress site and api.json are generated from the same TypeScript, runtime-default, and SCSS sources. The usage section and the guides are the component, composable, and guide pages of this site, with demo sources inlined.