Command-line interface for Evolith governance, standards validation, and AI agent integration.
- Governance: ADR management, standards tracking, agent installation
- Validation: Repository compliance against Evolith standards
- AI Integration: MCP server for AI agent tool calling
- Observability: Structured logging, metrics, error reporting
The CLI is published to npm registry and compatible with all JavaScript package managers.
npm install -g @evolith/smart-clipnpm add -g @evolith/smart-cliyarn global add @evolith/smart-cliDownload the latest binary from GitHub Releases and add to your PATH.
smart-cli --version
# smart-cli version 1.1.0Permission errors on macOS/Linux:
# If you get EACCES errors, try:
sudo npm install -g @evolith/smart-cli --unsafe-permUsing nvm (Node Version Manager):
# Ensure global bin path is in PATH
export PATH=$(npm config get prefix)/bin:$PATHcd your-project
smart-cli initThis creates an evolith.yaml file with default configuration.
smart-cli validateOutput:
✓ Validating repository...
✓ Repository is compliant with Evolith standards
smart-cli agents install
# Select "standard" template when promptedValidate repository compliance against Evolith standards.
smart-cli validate [options]
Options:
--satellite <path> Path to satellite repository (default: cwd)
--core <path> Path to Evolith Core
--format <format> Output format: json, table, yaml, markdown
--output <file> Write output to file
--ruleset <id> Validate specific ruleset (acl, open-core, inheritance)
--engine <engine> Policy evaluation engine: native or opa (default: native)Dual-Engine Policy Evaluation:
The CLI supports evaluating policies using either the built-in TypeScript engine (native) or Open Policy Agent WebAssembly modules (opa). See Core ADR-0041 for details.
Examples:
# Basic validation
smart-cli validate
# JSON output for automation
smart-cli validate --format json
# Table output for humans
smart-cli validate --format table
# Validate specific ruleset
smart-cli validate --ruleset aclManage Architecture Decision Records.
smart-cli adr <command>
Commands:
create Create new ADR
list List all ADRs
get Show ADR details
update Update existing ADR
matrix Show ADR matrixExamples:
# Create new ADR
smart-cli adr create
# List all ADRs
smart-cli adr list
# Get specific ADR
smart-cli adr get ADR-0002Manage governance standards.
smart-cli standards <command>
Commands:
init Initialize standards directory
list List all standards
get Show standard details
validate Validate against standards
export Export standard to markdown/jsonExamples:
# Initialize standards
smart-cli standards init
# List standards
smart-cli standards listInstall and manage Evolith agents.
smart-cli agents <command>
Commands:
install Install new agent
list List installed agents
remove Remove agent
validate Validate agent ruleset
upgrade Upgrade agentExamples:
# Interactive install
smart-cli agents install
# List agents
smart-cli agents listView and manage command history.
smart-cli history [options]
Options:
--list List recent commands
--get <id> Show command details
--search <query> Search commands
--stats Show statistics
--clear Clear historyExamples:
# Show last 20 commands
smart-cli history
# Show statistics
smart-cli history --stats
# Search commands
smart-cli history --search validateGenerate shell completion scripts.
smart-cli completion --install <shell>
Supported shells: bash, zsh, fishExamples:
# Install bash completion
smart-cli completion --install bash
# Install zsh completion
smart-cli completion --install zshThe Evolith CLI includes an MCP server for AI agent integration.
smart-cli mcp serveThe server communicates via stdio JSON-RPC.
Use the smoke test before releases or MCP protocol changes:
npm run mcp:smokeThe smoke verifies initialize, tools/list, resources/list, prompts/list, and a real tools/call through the built CLI.
| Tool | Description |
|---|---|
evolith-validate |
Validate repository compliance |
evolith-agent-install |
Install new agent |
evolith-agent-list |
List installed agents |
evolith-agent-validate |
Validate agent ruleset |
evolith-agent-upgrade |
Upgrade an existing agent |
evolith-agent-remove |
Remove an agent |
evolith-architecture-validate |
Validate architecture (F1/F2/F3) with optional deep analysis |
evolith-sdlc-handoff |
Generate phase handoff artifact manifest |
evolith-sdlc-status |
Show SDLC phase gate status |
evolith-config-get |
Get configuration value from evolith.yaml |
evolith-config-set |
Set configuration value in evolith.yaml |
evolith-metrics |
Get MCP server metrics |
evolith-moscow-create |
Create a new MoSCoW prioritization analysis |
evolith-moscow-load |
Load an existing MoSCoW analysis |
evolith-moscow-update |
Update an item in a MoSCoW analysis |
evolith-moscow-remove |
Remove an item from a MoSCoW analysis |
evolith-moscow-list |
List all MoSCoW analyses for a repository |
evolith-moscow-validate |
Validate a MoSCoW analysis for correctness |
evolith-moscow-report |
Generate a markdown report from a MoSCoW analysis |
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"evolith": {
"command": "smart-cli",
"args": ["mcp", "serve"]
}
}
}Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"evolith": {
"command": "smart-cli",
"args": ["mcp", "serve"]
}
}
}When integrated with an AI agent, you can have conversations like:
You: Validate my repository
Agent: Let me run the validation...
await mcp.callTool('evolith-validate', {
path: '/user/project',
format: 'summary'
})
Result: ✓ Repository is compliant with Evolith standards
Rules checked: 12
All gates passed
You: Show me the SDLC status
Agent: Let me check the phase gate status...
await mcp.callTool('evolith-sdlc-status', {
path: '/user/project'
})
Result: Phase 1 — 3 gates passed, 0 failed
All evidence artifacts present
Evolith uses an evolith.yaml file in the repository root:
coreRef:
version: "1.0.0"
path: "../../evolith"
governance:
version: "1.0"
adrRegistry:
- id: "ADR-0001"
status: "accepted"
product:
name: "my-project"
type: "library"
runtime: "typescript"All commands support multiple output formats:
# JSON (default for automation)
smart-cli validate --format json
# Table (human-readable)
smart-cli validate --format table
# YAML (pipeline integration)
smart-cli validate --format yaml
# Markdown (documentation)
smart-cli validate --format markdownIf evolith is not found after installation, ensure npm's global bin is in your PATH:
# Add to ~/.bashrc or ~/.zshrc
export PATH="$(npm config get prefix)/bin:$PATH"Ensure the MCP server is running:
smart-cli mcp serve &Check your evolith.yaml exists and is valid:
cat evolith.yaml
smart-cli validate --verbosecd sdk/cli
npm install
npm run build
npm link # Link globally for testing# Run all tests
npm test
# Run with coverage report
npm run test:covCoverage (as of v0.0.3-beta): 88.7% statements · 89.8% lines · 77.0% branches · 83.6% functions · 1 369 tests
sdk/cli/
├── src/
│ ├── commands/ # CLI commands (adr, validate, agents, etc.)
│ ├── application/ # Use cases
│ ├── domain/ # Business logic (services, entities)
│ ├── infrastructure/# External integrations (catalog, CLI)
│ └── core/ # Shared (DI, observability, errors, MCP)
├── shell/ # Shell completion scripts
├── templates/ # Configuration templates
└── docs/ # Documentation
- SMART CLI Demo Guide - Comprehensive guide covering all commands, SDLC flow, product types, MCP integration, and architecture validation
- Vision - CLI vision and roadmap
- Data Models - Domain data models
- MCP Integration - MCP server integration details
- Fork the repository
- Create a feature branch
- Make changes with tests
- Submit a pull request
ISC