Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 993 Bytes

File metadata and controls

38 lines (27 loc) · 993 Bytes

A2ML CLI (Prototype)

This CLI is a lightweight wrapper around the ReScript prototype parser.

Commands

  • render <file> — render HTML to stdout

  • validate <file> — validate (checked mode) and exit with status 2 on errors

  • ast <file> — output JSON surface AST

Options

  • --mode lax|checked (default: lax)

  • --out <path> to write output to a file

  • --concat to join output when multiple inputs are provided

  • --stdin to read from stdin (equivalent to -)

  • -h, --help show help

Run

just cli render tests/vectors/module0-basic.a2ml
just cli validate tests/vectors/module0-basic.a2ml
just cli ast tests/vectors/module0-basic.a2ml --out /tmp/ast.json
cat tests/vectors/module0-basic.a2ml | just cli render - --stdin
just cli render tests/vectors/inline-edges.a2ml tests/vectors/inline-formatting.a2ml --concat

Exit Codes

  • 0 success

  • 2 validation errors

Man Page

  • docs/a2ml.1