A2UI icon indicating copy to clipboard operation
A2UI copied to clipboard

feat(tools): add CLI MVP with validation command

Open cypherdavy opened this issue 1 week ago • 0 comments

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 commander and ajv.
  • Schema Validation

    • Adds a validate command to check A2UI JSON files against the v0.9 specification.
  • Integrity Checks

    • Adapts logic from the existing eval validator to verify referential integrity (for example, ensuring updateComponents reference valid surfaceId values).

Usage


cd tools/cli
npm install
npm run build


node bin/a2ui validate path/to/file.json

cypherdavy avatar Dec 18 '25 06:12 cypherdavy