@archlang/cli
v0.13.0
Published
Command-line tool for ArchLang projects — validate, format, info, check.
Maintainers
Readme
@archlang/cli
Command-line tool for ArchLang — a typed
language for describing system architecture as text. Validate, format,
inspect, and check .arch workspaces from the terminal or CI.
Install
npm install -g @archlang/cli
# or, no install
npx -y @archlang/cli --helpCommands
archlang validate <path> [--strict] [--json] [--watch]
archlang format <path> [--check | --diff] [--indent=<n>] [--tabs]
archlang info <path> [--json]
archlang check <path> [--strict]
archlang render [<path>] --out=<file.svg|file.png> [--view=board|bpmn|flow|sequence]
[--process=<name>] [--expand=all|<ids>] [--diff-base=<path>] [--scale=<n>]validateloads the workspace and reports diagnostics. Exits non-zero on errors; add--strictto also fail on warnings.formatcanonicalises indentation.--checkexits non-zero if any file needs reformatting (good for CI).--diffprints what would change without writing.infoprints a structured summary of the workspace (modules, processes, types, dependency tree). Pair with--jsonfor scripts.checkruns validate + a stricter set of structural checks.renderexports a diagram to an SVG/PNG file (headless, no browser).--view board(default) renders the module board;bpmn/flow/sequencerender a--process.--diff-base=<path>renders a BPMN diff against an older workspace. Format follows the--outextension; PNG via resvg.
Common flags:
--json— machine-readable output--stdlib=<path>— override the bundled stdlib lookup--help,--version
CI usage
- run: npx -y @archlang/cli validate . --strict
- run: npx -y @archlang/cli format . --checkExit codes are stable; output is grep-friendly in text mode and
JSON-Schema-stable in --json mode.
Editor integrations
The CLI shares its parser and validator with:
- VS Code extension: marketplace.visualstudio.com/items?itemName=archlang.archlang-vscode
- Live online viewer: archlang.dev/viewer
Documentation
archlang.dev/docs/language/book/00-foreword/
License
MIT.
