@toon-ui/cli
v2.0.1
Published
CLI utilities for validating and inspecting ToonUI files.
Maintainers
Readme
@toon-ui/cli
@toon-ui/cli gives you terminal tooling for ToonUI validation and AST inspection.
Use it when you want:
- CI validation
- quick debugging of generated ToonUI
- AST inspection without writing scripts
Install
pnpm add -D @toon-ui/cliOr run it ad hoc:
pnpm dlx @toon-ui/cli validate example.toonCommands
Validate a file
toon-ui validate example.toonInspect the parsed AST
toon-ui inspect example.toonExample input
form "Crear producto":
field name text "Nombre" required
field price number "Precio" required
button primary "Crear producto" submitServer integration
@toon-ui/cli is useful in server-side workflows and CI, not as a runtime dependency for production rendering.
Example validation script:
{
"scripts": {
"validate:toon": "toon-ui validate samples/create-product.toon"
}
}Example CI step:
pnpm dlx @toon-ui/cli validate ./fixtures/example.toonFrontend integration
There is no direct frontend integration.
This package does NOT render UI and does NOT belong in browser code.
Pair it with:
@toon-ui/corefor server/runtime utilities@toon-ui/reactor@toon-ui/toon-uifor frontend rendering
Typical workflow
- Your model emits a
toon-uiblock. - You save that block into a fixture file.
- You run
toon-ui validate fixture.toon. - You inspect the AST with
toon-ui inspect fixture.toon. - You fix either the prompt or the generated output.
Boundary
@toon-ui/cli owns:
- file-based validation
- AST inspection
- local debugging ergonomics
It does NOT own:
- prompt composition
- rendering
- chat orchestration
