Sevro

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):

  1. Flags: --server and --api-key
  2. Environment variables: SEVRO_SERVER and SEVRO_API_KEY
  3. 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 config

Global flags

FlagDefaultDescription
--serverhttp://localhost:8080Sevro server URL
--api-key(from config/env)API key for authentication
--outputjsonOutput format: json, yaml, or table
--debugfalsePrint 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
FlagDescription
-f, --filePath to module YAML file (required)

sevro module list

List all modules.

sevro module list [--filter <name>] [--page-size <n>] [--page-token <token>]
FlagDescription
--filterFilter modules by name (substring match)
--page-sizePage size (0 = server default)
--page-tokenPagination 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]
FlagDescription
-o, --outOutput 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]
FlagDescription
--moduleModule ID (required)
--entityEntity ref (required)
--filterCEL filter expression
--expandComma-separated reference fields to expand
--page-sizePage size
--page-tokenPagination 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]
FlagDescription
--moduleModule ID (required)
--entityEntity ref (required)
--methodMethod ref (required)
--recordRecord ID (required for non-constructors)
--argMethod 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.json

sevro 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]
FlagDescription
--nameConnection name (required)
--providerslack, stripe, postgres, smtp, custom_rest (required)
--authnone, api_key, basic, bearer, oauth2 (required)
--configConfig key=value (repeatable)
--credentials-filePath 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]
FlagDescription
--moduleModule ID (required)
--nameWorkflow ref (required)
--inputInput as key=value (repeatable, type-inferred)
--input-jsonPath 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>"
FlagDescription
--entityEntity ID (required)
--methodMethod ref to execute (required)
--secretHMAC secret for signature verification (required)
--transformCEL 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

CodeMeaning
0Success
1Not found
2Already exists
3Validation error
4Unauthenticated
5Permission denied
6Internal server error

On this page