Skip to content

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:

sh
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 installation

show <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:

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 ​

  1. For a new consumer project, read ooko-doc guide installation (plugin and ooko-ui/style.css registration), then ooko-doc guide getting-started.
  2. Run ooko-doc list to find the public symbol and the available guides.
  3. Query the symbol or one section such as props, events, slots, parameters, or returns.
  4. Read the usage section for the example, accessibility notes, and edge cases, such as how OForm resolves validation rules by name.
  5. Use the returned public import and contract without inspecting internal source or dist files.

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.