CLI validation
Arch3 now provides an official CLI for validating files and fixture folders.
Commands
Validate one file:
npm run arch3 -- validate examples/fixtures/valid/full.arch3.json
Validate a directory recursively:
npm run arch3 -- validate examples/fixtures
Validate only structural schema rules:
npm run arch3 -- validate examples/fixtures --schema-only
Validate the official fixture catalog:
npm run arch3 -- fixtures
Render PlantUML from a source file:
npm run arch3 -- render examples/fixtures/valid/full.arch3 --layer components --expand checkout-api
Regenerate official PlantUML snapshots:
npm run arch3 -- snapshots examples/fixtures/valid/full.arch3
Format a source file as JSON:
npm run arch3 -- format examples/fixtures/valid/full.arch3 --to json
Format a source file as Arch3 DSL:
npm run arch3 -- format examples/fixtures/valid/full.arch3.json --to arch3
Lint a file or directory with Arch3 conventions:
npm run arch3 -- lint examples/fixtures
Watch a directory and re-run validation continuously:
npm run arch3 -- watch examples/fixtures
Watch a directory and re-run lint continuously:
npm run arch3 -- watch examples/fixtures --lint
Inspect the AST of an Arch3 DSL file:
npm run arch3 -- ast examples/fixtures/valid/full.arch3
Create a package release note with Changesets:
npm run changeset
Output model
The CLI prints:
PASSfor valid filesFAILfor invalid files- issue details with
code,path, andmessage - PlantUML text when using
render - committed
.pumlsnapshots when usingsnapshots - normalized JSON or Arch3 DSL when using
format - advisory warnings when using
lint - continuous feedback when using
watch - explicit AST output when using
ast
Recommended use
- use
validateduring local authoring - use
fixturesin automation and CI - use
--schema-onlywhen checking canonical shape separately from semantics