@domainlang/cli
v0.13.0
Published
Command-line interface for DomainLang - validate, analyze, and manage Domain-Driven Design models
Downloads
460
Maintainers
Readme
@domainlang/cli
Validate, query, and manage DomainLang models from the terminal. Built for local development and CI pipelines that treat architecture decisions as code.
Install
npm install -g @domainlang/cliOr run directly with npx:
npx @domainlang/cli validateGet started
# Scaffold a new DomainLang workspace
dlang init
# Validate the current directory
dlang validate
# Query all bounded contexts
dlang query bcsCommands
| Command | What it does |
| --- | --- |
| dlang init [directory] | Scaffold starter files for a new workspace |
| dlang validate [path] | Validate a single file or an entire workspace |
| dlang query <type> [path] | Query domains, bounded contexts, teams, relationships, and more |
| dlang install | Install dependencies declared in your manifest |
| dlang add <specifier> | Add a model dependency |
| dlang remove <name> | Remove a model dependency |
| dlang update | Refresh dependency state from the lock file |
| dlang upgrade [package] [version] | Upgrade one or all dependencies to the latest version |
| dlang outdated | List dependencies with newer versions available |
| dlang cache-clear | Clear the local dependency cache |
| dlang help | Show available commands |
Use it in CI
Every command supports --json, --quiet, and --no-color for scripted environments.
A minimal CI step:
dlang validate --jsonThis exits non-zero on validation errors and writes structured JSON to stdout, so you can parse results downstream or simply treat it as a gate.
Typical workflow
dlang install # Resolve and lock dependencies
dlang validate # Check for errors
dlang query bcs --classification Core # Inspect your Core contextsDocumentation
Related packages
- @domainlang/language — parser, validator, and query SDK for building custom tooling.
- DomainLang for VS Code — full editor experience with IntelliSense and live validation.
License
Apache-2.0
This project is sponsored by thinkability
