A2UI
A2UI copied to clipboard
feat(tools): add CLI MVP with validation command
Description
This PR introduces an initial MVP for the A2UI command-line interface, published as @a2ui/cli.
The goal of this change is to provide a simple, developer-friendly CLI that helps validate and work with A2UI messages locally. The implementation consolidates earlier experimental work into a single, cohesive tool under tools/cli.
Features
-
CLI Scaffolding
- Establishes a standard TypeScript-based CLI structure using
commanderandajv.
- Establishes a standard TypeScript-based CLI structure using
-
Schema Validation
- Adds a
validatecommand to check A2UI JSON files against the v0.9 specification.
- Adds a
-
Integrity Checks
- Adapts logic from the existing eval validator to verify referential integrity (for example, ensuring
updateComponentsreference validsurfaceIdvalues).
- Adapts logic from the existing eval validator to verify referential integrity (for example, ensuring
Usage
cd tools/cli
npm install
npm run build
node bin/a2ui validate path/to/file.json