Skip to content

hiiu components

Query the app's own design system. Rank the modules components come from, search one by name or prop, and read the tokens the stylesheets declare.

hiiu components catalog [path]
hiiu components search <query> [path]
hiiu components tokens [path]

Three subcommands over the design-system layer. Running hiiu components with no subcommand is a usage error at exit 2, not a help dump with exit 0.

catalog

hiiu components catalog [path]
[path] The repo or app directory to survey. Default .

Ranks the modules the app's JSX imports components from, and lists what it imports from each, with usage examples harvested from the app's own code. It reads no node_modules.

It proposes. Which module is the design system is a question the wizard puts to a human, so a low confidence result is a successful run rather than a failure to detect anything.

hiiu components search <query> [path]
<query> Name, prop or usage to look for. Required
[path] The repo or app directory to search. Default .

Looks a component up in that catalog and prints the import statement to write, how widely it is used, and its harvested examples. This is the command an agent reaches for constantly, and the reason hiiu needs no MCP server: a shell command works in any agent and can be named in a generated AGENTS.md.

No match is a true answer, so it exits 0. An empty query is exit 2.

tokens

hiiu components tokens [path]
[path] The repo or app directory to survey. Default .

The token dictionary from the app's own stylesheets: the custom properties it declares, with last declaration winning and uses counted, plus the hex literals written raw.

Its limits are stated rather than implied. .css and hex only in v0; Sass, Tailwind theme objects and functional colour syntax are named future work. Caps on how much it scans drop visibly into the output, and an app with no stylesheets is an empty dictionary at exit 0.

Every global flag applies to all three.

Exit codes

Code When
0 Surveyed or searched, including finding nothing
2 No subcommand, or an empty query
3 Not a supported frontend app

Example

hiiu components search Button --json | jq '.matches[0].import'