CLI Command Reference
This file is auto-generated from CLI command definitions. Do not edit manually. Run
nx generate-docs riviere-clito regenerate.
Complete documentation for all Riviere CLI commands.
Installation
npm install @living-architecture/riviere-cliUsage
riviere builder <command> [options] # Graph building commands
riviere query <command> [options] # Graph query commandsExit Codes
0: Success (including warnings)1: Error or failed validation/consistency
Builder Commands
Commands for constructing architecture graphs.
add-component
Add a component to the graph
riviere builder add-component [options]Required:
| Flag | Description |
|---|---|
--type <type> | Component type (UI, API, UseCase, DomainOp, Event, EventHandler, Custom) |
--name <name> | Component name |
--domain <domain> | Domain name |
--module <module> | Module name |
--repository <url> | Source repository URL |
--file-path <path> | Source file path |
--route <route> | UI route path |
--api-type <type> | API type (REST, GraphQL, other) |
--http-method <method> | HTTP method |
--http-path <path> | HTTP endpoint path |
--operation-name <name> | Operation name (DomainOp) |
--entity <entity> | Entity name (DomainOp) |
--event-name <name> | Event name |
--subscribed-events <events> | Comma-separated subscribed event names |
--custom-type <name> | Custom type name |
--description <desc> | Component description |
--line-number <n> | Source line number |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
# Add an API endpoint
riviere builder add-component --type API --name "place-order" \
--domain orders --module api --repository ecommerce \
--file-path src/api/orders.ts --api-type REST \
--http-method POST --http-path /orders
# Add a UseCase
riviere builder add-component --type UseCase --name "place-order" \
--domain orders --module checkout --repository ecommerce \
--file-path src/usecases/PlaceOrder.ts
# Add a DomainOp
riviere builder add-component --type DomainOp --name "order-begin" \
--domain orders --module domain --repository ecommerce \
--file-path src/domain/Order.ts --entity Order --operation-name begin
# Add an Event
riviere builder add-component --type Event --name "order-placed" \
--domain orders --module events --repository ecommerce \
--file-path src/events/OrderPlaced.ts --event-name "order-placed"add-domain
Add a domain to the graph
riviere builder add-domain [options]Required:
| Flag | Description |
|---|---|
--name <name> | Domain name |
--description <description> | Domain description |
--system-type <type> | System type (domain, bff, ui, other) |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder add-domain --name orders --system-type domain \
--description "Order management"
riviere builder add-domain --name checkout-bff --system-type bff \
--description "Checkout backend-for-frontend"add-source
Add a source repository to the graph
riviere builder add-source [options]Required:
| Flag | Description |
|---|---|
--repository <url> | Source repository URL |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder add-source --repository https://github.com/org/orders-service
riviere builder add-source --repository https://github.com/org/payments-api --jsoninit
Initialize a new graph
riviere builder init [options]Required:
| Flag | Description |
|---|---|
--name <name> | System name |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
--source <url> | Source repository URL (repeatable) |
--domain <json> | Domain as JSON (repeatable) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder init --source https://github.com/org/repo \
--domain '{"name":"orders","description":"Order management","systemType":"domain"}'
riviere builder init --name "ecommerce" \
--source https://github.com/org/orders \
--source https://github.com/org/payments \
--domain '{"name":"orders","description":"Order management","systemType":"domain"}' \
--domain '{"name":"payments","description":"Payment processing","systemType":"domain"}'link
Link two components
riviere builder link [options]Required:
| Flag | Description |
|---|---|
--from <component-id> | Source component ID |
--to-domain <domain> | Target domain |
--to-module <module> | Target module |
--to-type <type> | Target component type (UI, API, UseCase, DomainOp, Event, EventHandler, Custom) |
--to-name <name> | Target component name |
--link-type <type> | Link type (sync, async) |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder link \
--from "orders:api:api:postorders" \
--to-domain orders --to-module checkout --to-type UseCase --to-name "place-order" \
--link-type sync
riviere builder link \
--from "orders:checkout:domainop:orderbegin" \
--to-domain orders --to-module events --to-type Event --to-name "order-placed" \
--link-type asynclink-external
Link a component to an external system
riviere builder link-external [options]Required:
| Flag | Description |
|---|---|
--from <component-id> | Source component ID |
--target-name <name> | External target name |
--target-domain <domain> | External target domain |
--target-url <url> | External target URL |
--link-type <type> | Link type (sync, async) |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder link-external \
--from "payments:gateway:usecase:processpayment" \
--target-name "Stripe" \
--target-url "https://api.stripe.com" \
--link-type sync
riviere builder link-external \
--from "shipping:tracking:usecase:updatetracking" \
--target-name "FedEx API" \
--target-domain "shipping" \
--link-type asynclink-http
Find an API by HTTP path and link to a target component
riviere builder link-http [options]Required:
| Flag | Description |
|---|---|
--path <http-path> | HTTP path to match |
--to-domain <domain> | Target domain |
--to-module <module> | Target module |
--to-type <type> | Target component type |
--to-name <name> | Target component name |
--method <method> | Filter by HTTP method (GET, POST, PUT, PATCH, DELETE) |
--link-type <type> | Link type (sync, async) |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder link-http \
--path "/orders" --method POST \
--to-domain orders --to-module checkout --to-type UseCase --to-name "place-order"
riviere builder link-http \
--path "/users/{id}" --method GET \
--to-domain users --to-module queries --to-type UseCase --to-name "get-user" \
--link-type syncvalidate
Validate the graph for errors and warnings
riviere builder validate [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder validate
riviere builder validate --json
riviere builder validate --graph .riviere/my-graph.jsonfinalize
Validate and export the final graph
riviere builder finalize [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
--output <path> | Output path for finalized graph (defaults to input path) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder finalize
riviere builder finalize --output ./dist/architecture.json
riviere builder finalize --jsonenrich
Enrich a DomainOp component with entity, state changes, and business rules
riviere builder enrich [options]Required:
| Flag | Description |
|---|---|
--id <component-id> | Component ID to enrich |
--entity <name> | Entity name |
--state-change <from:to> | State transition (repeatable) |
--business-rule <rule> | Business rule (repeatable) |
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder enrich \
--id "orders:checkout:domainop:orderbegin" \
--entity Order \
--state-change "Draft:Placed" \
--business-rule "Order must have at least one item"
riviere builder enrich \
--id "payments:gateway:domainop:paymentprocess" \
--state-change "Pending:Processing" \
--state-change "Processing:Completed" \
--business-rule "Amount must be positive" \
--business-rule "Currency must be valid"component-summary
Show component counts by type and domain
riviere builder component-summary [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder component-summary
riviere builder component-summary --jsoncomponent-checklist
List components as a checklist for linking/enrichment
riviere builder component-checklist [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
--type <type> | Filter by component type |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder component-checklist
riviere builder component-checklist --type DomainOp
riviere builder component-checklist --type API --jsoncheck-consistency
Check for structural issues in the graph
riviere builder check-consistency [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere builder check-consistency
riviere builder check-consistency --jsonQuery Commands
Commands for analyzing and querying graphs.
entry-points
List entry points (APIs, UIs, EventHandlers with no incoming links)
riviere query entry-points [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query entry-points
riviere query entry-points --jsondomains
List domains with component counts
riviere query domains [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query domains
riviere query domains --jsontrace
Trace flow from a component (bidirectional)
riviere query trace <componentId> [options]Arguments:
| Argument | Description |
|---|---|
<componentId> | Component ID to trace from |
Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query trace "orders:api:api:postorders"
riviere query trace "orders:checkout:usecase:placeorder" --jsonorphans
Find orphan components with no links
riviere query orphans [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query orphans
riviere query orphans --jsoncomponents
List components with optional filtering
riviere query components [options]Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
--domain <name> | Filter by domain name |
--type <type> | Filter by component type |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query components
riviere query components --domain orders
riviere query components --type API --json
riviere query components --domain orders --type UseCasesearch
Search components by name
riviere query search <term> [options]Arguments:
| Argument | Description |
|---|---|
<term> | Search term |
Required:
| Flag | Description |
|---|---|
--graph <path> | Custom graph file path (default: .riviere/graph.json) |
Optional:
| Flag | Description |
|---|---|
--json | Output result as JSON |
Examples:
riviere query search order
riviere query search "place-order" --json