Map. Verify. Steer your cross-service choreography β a developer-friendly, Swissβarmyβknife style CLI for ContractβasβCode.
This is the Community Edition (CE): zero telemetry, fully offline.
ChoreoAtlas is a ContractβasβCode platform for interactive logic governance following the Discover β Specify β Guide loop. It supports dual contracts (FlowSpec + ServiceSpec) and provides:
- Atlas Scout: discover specs from trace data
- Atlas Proof: validate choreography against runtime behavior
- Atlas Pilot: static linting and guidance
Whitepaper (zhβCN): see ../whitepaper/zh-CN/ChoreoAtlas-Whitepaper-1.1R.md (latest)
Historical: ../whitepaper/zh-CN/ChoreoAtlas-Whitepaper-1.1.md
Looking for Chinese? See README.zh-CN.md
Quick links: Business Website Β· Documentation Portal Β· Pricing Β· Contact
brew install choreoatlas2025/homebrew-choreoatlas/choreoatlas
brew upgrade choreoatlas2025/homebrew-choreoatlas/choreoatlas # ζ΄ζ°ε°ζζ°ηThe formula installs both choreoatlas and a ca helper symlink.
curl -fsSL https://raw.githubusercontent.com/choreoatlas2025/cli/main/scripts/install.sh -o choreoatlas-install.sh
chmod +x choreoatlas-install.sh
./choreoatlas-install.sh # θͺε¨ιζ© /opt/homebrew/bin ζ /usr/local/bin
# Flags: --version vX.Y.Z-ce, --force, --no-symlinkInvoke-WebRequest https://raw.githubusercontent.com/choreoatlas2025/cli/main/scripts/install.ps1 -OutFile choreoatlas-install.ps1
pwsh ./choreoatlas-install.ps1 # ζ―ζ -Version, -Force, -NoSymlink# Pin to a specific release tag
docker run --rm choreoatlas/cli:vX.Y.Z-ce version
docker run --rm ghcr.io/choreoatlas2025/cli:vX.Y.Z-ce version
# Or track the moving latest tag
docker run --rm choreoatlas/cli:latest version
docker run --rm ghcr.io/choreoatlas2025/cli:latest version- Download the asset matching your OS/arch from GitHub Releases (pattern:
choreoatlas_vX.Y.Z-ce_<os>_<arch>.tar.gz|zip). - Download
SHA256SUMS.txtfrom the same release and verify the archive. - Extract the archive and move
choreoatlasinto a directory on your PATH (/opt/homebrew/bin,/usr/local/bin, or%LOCALAPPDATA%\ChoreoAtlas\bin). - Optionally create your own alias/symlink if you skipped the installers:
ln -s choreoatlas /usr/local/bin/ca.
Run choreoatlas version after installation to confirm the build and edition suffix (-ce).
choreoatlas init
choreoatlas lint
choreoatlas validate --trace traces/successful-order.trace.jsoninitgenerates FlowSpec, ServiceSpec, starter trace files, and optional GitHub Actions workflow in the current directory.- Pass
--trace your-trace.jsonto bootstrap from an existing trace. - Use
--ci minimal|comboto inject.github/workflows/choreoatlas.yml.
# Bootstrap an interactive starter project
choreoatlas init
# Static validation (includes JSON Schema validation)
choreoatlas lint --flow examples/flows/order-fulfillment.flowspec.yaml
# Dynamic validation against trace data
choreoatlas validate --flow examples/flows/order-fulfillment.flowspec.yaml --trace examples/traces/successful-order.trace.json
# Generate reports (JSON, JUnit, HTML)
choreoatlas validate --flow examples/flows/order-fulfillment.flowspec.yaml --trace examples/traces/successful-order.trace.json --report-format html --report-out report.html
# Discover dual contracts from trace data (FlowSpec + ServiceSpec files)
choreoatlas discover \
--trace examples/traces/successful-order.trace.json \
--out discovered.flowspec.yaml \
--out-services ./services
# By default, discover enforces JSON Schema + lint gates and only writes on success.
# To bypass (not recommended), add: --no-validate
# Note: discover intentionally does not generate an input block; telemetry (http.* / otel.*)
# is converted into ServiceSpec pre/postconditions. Provide actual path/query/headers/body
# arguments later if needed.
# CI gate mode (combines lint + validate with proper exit codes)
choreoatlas ci-gate --flow examples/flows/order-fulfillment.flowspec.yaml --trace examples/traces/successful-order.trace.json# Mount examples directory and run validation (using Docker Hub)
docker run --rm -v $(pwd)/examples:/examples choreoatlas/cli:latest lint --flow /examples/flows/order-fulfillment.flowspec.yaml
# Generate HTML report (using Docker Hub)
docker run --rm -v $(pwd):/workspace choreoatlas/cli:latest validate \
--flow /workspace/examples/flows/order-fulfillment.flowspec.yaml \
--trace /workspace/examples/traces/successful-order.trace.json \
--report-format html --report-out /workspace/report.htmlCommon oneβliners for dayβtoβday work:
# Create a starter workspace (FlowSpec + ServiceSpec + trace)
ca init
# Lint your FlowSpec (uses embedded JSON Schemas)
ca lint --flow .flowspec.yaml
# Validate against a trace with semantic checks and temporal causality
ca validate --flow .flowspec.yaml --trace trace.json
# Tighten the gate: require 100% steps and 100% conditions
ca validate --flow .flowspec.yaml --trace trace.json \
--threshold-steps 1.0 --threshold-conds 1.0 --skip-as-fail
# Record a baseline from current run
ca baseline record --flow .flowspec.yaml --trace trace.json --out baseline.json
# Gate with thresholds and an existing baseline; tolerate missing baseline by using absolute thresholds
ca validate --flow .flowspec.yaml --trace trace.json \
--baseline ci/baseline.json --baseline-missing treat-as-absolute \
--threshold-steps 0.9 --threshold-conds 0.95
# Generate an HTML report for humans (also supports json|junit)
ca validate --flow .flowspec.yaml --trace trace.json \
--report-format html --report-out report.html
# Discover specs from a trace (FlowSpec + ServiceSpec files)
ca discover --trace trace.json --out discovered.flowspec.yaml --out-services ./services
# Gate is enabled by default; use --no-validate to bypass (not recommended)
# Note: input is not generated by default; telemetry becomes assertions in ServiceSpec.
# Run lint + validate in one go (CI gate)
ca ci-gate --flow .flowspec.yaml --trace trace.json
# Run validation on all traces in a folder
for f in traces/*.json; do ca validate --flow .flowspec.yaml --trace "$f"; done- Tags & releases: all binaries ship as
vX.Y.Z-ce; the suffix is visible inchoreoatlas versionoutput. - Installers & Homebrew: both pull the same release artifacts and create the optional
cahelper when safe. - Containers: multi-arch manifests are published to both Docker Hub (
choreoatlas/cli) and GHCR (ghcr.io/choreoatlas2025/cli) with matchingvX.Y.Z-ceandlatesttags. - Checksums: every release includes
SHA256SUMS.txtfor integrity verification. - Privacy: Community Edition is permanently zero-telemetry β see
docs/privacy.mdfor verification steps.
- No Data Collection: Absolutely no telemetry, analytics, or usage tracking
- Completely Offline: Works without any network connections
- Privacy First: Your contracts and traces never leave your machine
- Verifiable: Check with
strings choreoatlas | grep telemetry(returns nothing)
- FlowSpec: Central choreography specification defining step sequences, service calls, and variable flow
- ServiceSpec: Per-service contracts with operation specifications, preconditions, and postconditions
- Dual Validation: Both static (lint) and dynamic (runtime trace) validation
- Atlas Scout (
discover): Generate FlowSpec from trace exploration - Atlas Proof (
validate): Verify choreography matches actual execution - Atlas Pilot (
lint): Static validation and guidance
- JSON Schema Validation: Structured validation of FlowSpec and ServiceSpec formats
- Multiple Report Formats: JSON, JUnit XML, and HTML reports with CE badge
- Trace-based Discovery: Automatic dual contract generation from trace.json
- Temporal & Causal Validation: Step sequence and dependency verification
- CI/CD Integration: Standardized exit codes for pipeline integration
- Baseline Gating: Coverage thresholds and condition pass rates
info:
title: "Order Fulfillment Process"
version: "1.0.0"
services:
orderService:
spec: "./services/order-service.servicespec.yaml"
inventoryService:
spec: "./services/inventory-service.servicespec.yaml"
graph:
nodes:
- id: "createOrder"
call: "orderService.createOrder"
output:
orderId: "response.orderId"
- id: "checkInventory"
call: "inventoryService.reserveInventory"
depends: ["createOrder"]
input:
orderId: "${orderId}"
output:
reservationId: "response.reservationId"info:
title: "Order Fulfillment Process"
services:
orderService:
spec: "./services/order-service.servicespec.yaml"
flow:
- step: "Create Order"
call: "orderService.createOrder"
output:
orderId: "response.orderId"
- step: "Reserve Inventory"
call: "inventoryService.reserveInventory"
input:
orderId: "${orderId}"service: "OrderService"
version: "1.0.0"
operations:
- operationId: "createOrder"
description: "Create a new order"
preconditions:
"validCustomer": "has(input.customerId) && input.customerId != ''"
"hasItems": "size(input.items) > 0"
postconditions:
"orderCreated": "has(response.body.orderId)"
"statusOk": "response.status == 200"The project includes a complete "Order-Inventory-Fulfillment" e-commerce flow example:
examples/flows/order-fulfillment.flowspec.yaml- Main flow specificationexamples/services/- Service contract specificationsexamples/traces/- Success and failure scenario trace data
Try the examples:
# Clone the repository
git clone https://github.com/choreoatlas2025/cli.git
cd cli
# Run the example
choreoatlas lint --flow examples/flows/order-fulfillment.flowspec.yaml
choreoatlas validate --flow examples/flows/order-fulfillment.flowspec.yaml --trace examples/traces/successful-order.trace.jsonCommands and important flags (defaults shown where relevant):
choreoatlas init
--mode string Bootstrap mode: template|trace
--trace string trace.json path for from-trace mode
--ci string GitHub Actions workflow: none|minimal|combo
--examples Copy examples/* starter assets
--yes Accept defaults without prompts
--force Overwrite existing files
--out string Target directory (default ".")
--title string Override FlowSpec title
choreoatlas lint
--flow string FlowSpec file path (default ".flowspec.yaml")
--schema Enable JSON Schema strict validation (default true)
choreoatlas validate
--flow string FlowSpec file path (default ".flowspec.yaml")
--trace string trace.json file path (required)
--semantic bool Enable semantic validation (CEL) (default true)
--causality string Causality mode: strict|temporal|off (default "temporal")
--causality-tolerance int Causality tolerance in ms (default 50)
--baseline string Baseline file path (optional)
--baseline-missing string Strategy when baseline missing: fail|treat-as-absolute (default "fail")
--threshold-steps float Step coverage threshold (default 0.9)
--threshold-conds float Condition pass threshold (default 0.95)
--skip-as-fail Treat SKIP conditions as FAIL
--report-format string Report format: json|junit|html (optional)
--report-out string Report output path (required when using --report-format)
choreoatlas discover
--trace string trace.json file path (required)
--out string FlowSpec output (default "discovered.flowspec.yaml")
--out-services string ServiceSpec output directory (default "./services")
--title string FlowSpec title
choreoatlas ci-gate
--flow string FlowSpec file path
--trace string trace.json file path
choreoatlas baseline record
--flow string FlowSpec file path (default ".flowspec.yaml")
--trace string trace.json file path (required)
--out string Baseline output file (default "baseline.json")
Notes:
- Default FlowSpec is
.flowspec.yamlin the current directory. - ServiceSpec paths in
services.*.specare resolved relative to the FlowSpec file. - Graph (DAG) format is recommended; legacy
flow:remains supported.
- name: Validate Service Choreography
run: |
choreoatlas ci-gate \
--flow specs/main-flow.flowspec.yaml \
--trace traces/integration-test.trace.json0: All validations passed1: General CLI error (invalid arguments, etc.)2: File not found or parsing error3: Validation failed (spec vs trace mismatch)4: Gate policy violations (threshold not met)
- JSON: Structured data for programmatic processing
- JUnit XML: Direct CI/CD integration
- HTML: Human-readable reports with timeline visualization
CE expects a simple JSON file shaped like:
{
"spans": [
{
"name": "createOrder",
"service": "orderService",
"startNanos": 1693910000000000000,
"endNanos": 1693910000100000000,
"attributes": {"response.status": 201}
}
]
}Causality checks can use temporal ordering by default, or strict parent/child when your attributes include OTLPβstyle otlp.parent_span_id and otlp.span_id fields.
- Start from a trace β discover contracts β refine β validate
ca discover --trace traces/happy.json --out flow.flowspec.yaml --out-services ./services
# Edit and refine the generated FlowSpec/ServiceSpec files
ca lint --flow flow.flowspec.yaml
ca validate --flow flow.flowspec.yaml --trace traces/happy.json --report-format html --report-out report.html- Establish a baseline and add a gate
ca baseline record --flow flow.flowspec.yaml --trace traces/happy.json --out ci/baseline.json
ca validate --flow flow.flowspec.yaml --trace traces/regression.json \
--baseline ci/baseline.json --threshold-steps 0.9 --threshold-conds 0.95- Batch validate
for f in traces/*.json; do ca validate --flow flow.flowspec.yaml --trace "$f"; done- βflowspec cannot have both 'graph' and 'flow' fieldsβ: choose one format.
- βno matching span found in traceβ: verify
service.operationmatchesFlowSpecand trace ordering/causality settings. - βDAG structure validation failedβ: fix cycles, missing nodes, or unreachable nodes in
graph. - Baseline file missing: add
--baseline-missing treat-as-absoluteto rely on thresholds only. - Relative ServiceSpec paths: they are resolved relative to the FlowSpec file location.
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Run linting
make lint
# Clean build artifacts
make clean.
βββ cmd/choreoatlas/ # CLI entry point
βββ internal/
β βββ cli/ # Command line processing
β βββ spec/ # Specification loading and parsing
β βββ validate/ # Static and dynamic validation logic
β βββ trace/ # Trace data processing
β βββ report/ # Report generation
βββ examples/ # Example files
β βββ flows/ # FlowSpec examples
β βββ services/ # ServiceSpec examples
β βββ traces/ # Trace data examples
βββ schemas/ # JSON Schema definitions
| Feature | Community (CE) | Pro-Free | Pro-Privacy | Cloud |
|---|---|---|---|---|
| Core Validation | β Full | β Full | β Full | β Full |
| Discovery (Atlas Scout) | β Full | β Full | β Full | β Full |
| HTML/JSON/JUnit Reports | β Full | β Full | β Full | β Full |
| Telemetry | β Never | β Never | β Required | |
| OTLP Import | β | β | β | β |
| PII Masking | β | β | β | β |
| Advanced Baseline | β | β | β | β |
| Team Collaboration | β | β | β | β |
| Price | Free Forever | $19/user/mo | $39/user/mo | Custom |
- Operating Systems: Linux, macOS, Windows
- Architecture: amd64, arm64
- For Building: Go 1.21+ required
- Disk Space: ~50MB for binary
- Network: Not required (fully offline capable)
We welcome contributions! Please check our Issues page for areas where you can help.
Apache 2.0 - see LICENSE file for details.
- GitHub Repository: https://github.com/choreoatlas2025/cli
- Releases: https://github.com/choreoatlas2025/cli/releases
- Docker Hub: https://hub.docker.com/r/choreoatlas/cli
- Issues & Feature Requests: https://github.com/choreoatlas2025/cli/issues
- Discussions: https://github.com/choreoatlas2025/cli/discussions
ChoreoAtlas CLI β Map, Verify, and Steer your service choreography with ContractβasβCode