CLI Reference
Complete reference for the sevro CLI — modules, records, connections, workflows, and configuration.
The sevro CLI is a single binary that talks to a running Sevro server via the Connect-RPC API. It uses API key authentication.
Configuration
The CLI resolves the server URL and API key from three sources (in priority order):
- Flags:
--serverand--api-key - Environment variables:
SEVRO_SERVERandSEVRO_API_KEY - Config file:
~/.sevro/config.yml
# ~/.sevro/config.yml
server: http://localhost:8080
api_key: ply_abc123...sevro config init
Set up CLI configuration interactively or non-interactively.
sevro config init # interactive
sevro config init --server http://... --api-key ply_... # non-interactive
sevro config init --force # overwrite existing configGlobal flags
| Flag | Default | Description |
|---|---|---|
--server | http://localhost:8080 | Sevro server URL |
--api-key | (from config/env) | API key for authentication |
--output | json | Output format: json, yaml, or table |
--debug | false | Print detailed error information |
sevro module
sevro module apply
Create or update a module from a YAML definition file. Idempotent — if a module with the same name exists, it updates; otherwise it creates.
sevro module apply -f module.yaml| Flag | Description |
|---|---|
-f, --file | Path to module YAML file (required) |
sevro module list
List all modules.
sevro module list [--filter <name>] [--page-size <n>] [--page-token <token>]| Flag | Description |
|---|---|
--filter | Filter modules by name (substring match) |
--page-size | Page size (0 = server default) |
--page-token | Pagination token from previous response |
sevro module get
Get a single module by ID.
sevro module get <id>sevro module export
Export a module to YAML. The output is compatible with sevro module apply.
sevro module export <id> [-o output.yaml]| Flag | Description |
|---|---|
-o, --out | Output file path (default: stdout) |
sevro module delete
Delete a module by ID. Prompts for confirmation unless --force.
sevro module delete <id> [--force]sevro record
sevro record list
List records for an entity in a module.
sevro record list --module <id> --entity <ref> [options]| Flag | Description |
|---|---|
--module | Module ID (required) |
--entity | Entity ref (required) |
--filter | CEL filter expression |
--expand | Comma-separated reference fields to expand |
--page-size | Page size |
--page-token | Pagination token |
sevro record get
Get a single record by ID.
sevro record get <id> --module <id> --entity <ref> [--expand <fields>]sevro record execute
Execute a method on a record, or create a new record via a constructor.
sevro record execute --module <id> --entity <ref> --method <ref> [options]| Flag | Description |
|---|---|
--module | Module ID (required) |
--entity | Entity ref (required) |
--method | Method ref (required) |
--record | Record ID (required for non-constructors) |
--arg | Method argument as key=value (repeatable). Values are type-inferred: int → int64, float → float64, "true"/"false" → bool, else string. Use @file.json to load a value from a JSON file. |
Examples:
# Create a todo (constructor — no --record needed)
sevro record execute --module <id> --entity todo --method new --arg description="Buy groceries"
# Complete a todo
sevro record execute --module <id> --entity todo --method complete --record <record-id>
# Pass complex arguments from a file
sevro record execute --module <id> --entity order --method create --arg items=@items.jsonsevro record delete
Delete a record by ID. Prompts for confirmation unless --force.
sevro record delete <id> [--force]sevro connection
sevro connection create
Create an external connection. Never pass credentials on the command line — use --credentials-file.
sevro connection create --name <name> --provider <provider> --auth <type> [options]| Flag | Description |
|---|---|
--name | Connection name (required) |
--provider | slack, stripe, postgres, smtp, custom_rest (required) |
--auth | none, api_key, basic, bearer, oauth2 (required) |
--config | Config key=value (repeatable) |
--credentials-file | Path to JSON file with credentials |
Credentials file formats:
// api_key
{"api_key": "sk_..."}
// basic
{"username": "...", "password": "..."}
// bearer
{"bearer_token": "..."}
// oauth2
{"oauth2": {"client_id": "...", "client_secret": "...", "token_url": "...", "refresh_token": "...", "scopes": ["read"]}}sevro connection list
sevro connection list [--page-size <n>] [--page-token <token>]sevro connection get
sevro connection get <id>Credentials are never returned by the API.
sevro connection delete
sevro connection delete <id> [--force]sevro connection test
Test that a connection's credentials are valid.
sevro connection test <id>sevro workflow
sevro workflow run
Execute a workflow.
sevro workflow run --module <id> --name <workflow_ref> [options]| Flag | Description |
|---|---|
--module | Module ID (required) |
--name | Workflow ref (required) |
--input | Input as key=value (repeatable, type-inferred) |
--input-json | Path to JSON file with full input struct |
sevro workflow status
Check the status of a workflow execution.
sevro workflow status <execution-id>sevro webhook-inbound
sevro webhook-inbound create
Create an inbound webhook that receives external POST requests and maps them to method executions.
sevro webhook-inbound create --entity <entity-id> --method <method-ref> --secret <secret> --transform "<cel>"| Flag | Description |
|---|---|
--entity | Entity ID (required) |
--method | Method ref to execute (required) |
--secret | HMAC secret for signature verification (required) |
--transform | CEL expression mapping body → method arguments (required) |
Example:
sevro webhook-inbound create \
--entity <entity-id> \
--method create_from_webhook \
--secret "my-webhook-secret" \
--transform "{'title': body.title, 'content': body.body}"The transform expression has access to body (the parsed JSON payload) and must return a map[string]any of method arguments. The endpoint URL is POST /hooks/{webhook-id} on your Sevro server.
sevro webhook-inbound list
sevro webhook-inbound list [--page-size <n>] [--page-token <token>]sevro webhook-inbound get
sevro webhook-inbound get <id>sevro webhook-inbound delete
sevro webhook-inbound delete <id> [--force]sevro bootstrap
Create an initial admin API key with direct database access (no server required). Use this for first-time setup.
sevro bootstrap [--db <url>] [--name <name>] [--subject <subject>]sevro migrate
Apply pending database migrations.
sevro migrate [--db <url>]sevro api-key create
Create a new API key with direct database access.
sevro api-key create --name <name> --subject <subject> [--db <url>]Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Not found |
| 2 | Already exists |
| 3 | Validation error |
| 4 | Unauthenticated |
| 5 | Permission denied |
| 6 | Internal server error |