Ranvier CLI
The Ranvier CLI provides schematic and trace tooling for the Ranvier Typed Decision Engine.
Install
Usage
Create a new scaffold with macro-first baselines:
Common Commands
Generate a schematic JSON from a workspace example:
Compare schematic structure between two git refs:
Diff report now includes transition-level change sets:
- added/removed transitions
- modified transition signatures
- Bus capability policy changes (
bus_allow/bus_deny) - schema version metadata (
base_schema_version,head_schema_version)
Schema compatibility policy:
schema_versionis embedded in exported Schematic JSON.schematic diffrequires matching base/headschema_versionvalues.- CLI accepts only supported schema major versions (current major derived from
1.0).
Enforce schematic policy rules against diff result:
Run policy check using repository policy file (.ranvier/policy.toml):
Build a status page HTML from a schematic JSON file:
Generate a status page directly from an example:
Generate trace projection artifacts from a schematic:
Generate projection artifacts from a timeline capture:
Generate projection artifacts directly from an example:
Run the repository smoke check for projection-from-example:
pwsh ./cli/scripts/smoke_projection_from_example.ps1
Run projection drift check (example -> timeline -> projection equivalence):
pwsh ./cli/scripts/projection_drift_check.ps1
ranvier test — Headless Collection Runner
Run API collections from the CLI with assertion evaluation, capture chaining, and CI-friendly output.
Usage
Flags
| Flag | Short | Default | Description |
|---|---|---|---|
--collection |
-c |
(required) | Path or glob to .ranvier-bundle.json collection files |
--env |
-e |
Environment variables file (.env or .json) |
|
--target |
-t |
http://localhost:3000 |
Base URL of the target server |
--timeout |
30000 |
Per-request timeout in milliseconds | |
--output |
-o |
Write JUnit XML report to the given path | |
--verbose |
-v |
false |
Print request/response details for each step |
--bail |
false |
Stop on first assertion failure | |
--filter |
-f |
Run only requests whose name matches the given pattern | |
--dry-run |
false |
Parse and validate collection without executing requests |
CI Integration
# GitHub Actions example
- name: Run API tests
run: |
ranvier test \
--collection "./tests/api/**/*.ranvier-bundle.json" \
--env ./tests/api/.env.ci \
--target http://localhost:3000 \
--output ./test-results/api-junit.xml \
--bail
# Upload JUnit results
- name: Publish test results
uses: dorny/test-reporter@v1
if: always()
with:
name: API Tests
path: ./test-results/api-junit.xml
reporter: java-junit
Glob support allows running multiple collections in one invocation:
Capture chaining lets later requests reference values extracted from earlier responses using {{capture.field}} syntax in request templates.
Notes
- The CLI expects example names from the workspace when used in repository mode.
- Projection artifacts feed the inspector endpoints
/trace/publicand/trace/internal. - Policy file format uses
[schematic]section; repository baseline isranvier/.ranvier/policy.toml.example. - GitHub Actions PR comment template is available at
.github/workflows/templates/schematic-diff-policy-pr-comment.yml.