hiiu ir
Compile a repo's declared API surface into the contract IR, merging the router's claims with any MSW handlers the repo already has.
hiiu ir [path]
Compiles the facts into the contract IR: every endpoint hiiu believes the app can call, as one document.
It shares its read path with hiiu analyze, so the two
can never describe two different apps. Same constraints: no network, no model,
nothing written, byte-identical across runs.
Arguments and flags
[path] |
The repo or app directory to compile. Default . |
No command-specific flags. Every global flag applies.
What feeds it
Two sources. The router's own claims, and the app's own MSW handlers, which
state templates and contribute as declared endpoints with msw-handler
provenance. Where both name one template, they merge.
Machine-local repairs deliberately do not join this document. The base's own
ir.json is where those land, so that this command stays a pure function of
the repository.
Zero endpoints is a real answer
A repo with no declared API surface compiles to zero endpoints and exits 0.
That is the truth about the app, not a failure to find something.
Exit codes
| Code | When |
|---|---|
0 |
It compiled, including to zero endpoints |
3 |
Not a supported frontend app |
Example
hiiu ir --json | jq '.endpoints[] | .template'