Quickstart
Get Sevro running and build your first module in 5 minutes.
1. Start Sevro
The fastest way to run Sevro is with Docker Compose:
git clone https://github.com/jackcaldwell/sevro.git
cd sevro
docker compose up -dThis starts Postgres and the Sevro server on port 8080.
2. Apply migrations and create an API key
# Apply database migrations
docker compose exec sevro /app/sevro migrate
# Create an admin API key (save the token — it's shown once)
docker compose exec sevro /app/sevro bootstrap --name admin --subject adminYou'll see output like:
API key created successfully!
ID: abc-123
Name: admin
Subject: admin
Raw token: sevro_def456...
⚠️ Save this token now — it will never be shown again.3. Configure the CLI
Install the CLI locally and configure it:
go install sevro/cmd/sevro@latest
sevro config init --server http://localhost:8080 --api-key sevro_def456...This saves your config to ~/.sevro/config.yml so you don't need to pass --server and --api-key every time.
4. Define a module
Create a file called todo.yaml:
name: todo
entities:
- ref: todo
label: Todo
description: A todo item
attributes:
- ref: description
label: Description
type: string
is_required: true
- ref: completed
label: Completed
type: boolean
default_value: "false"
methods:
- ref: new
label: New
is_constructor: true
parameters:
- ref: description
label: Description
type: string
is_required: true
actions:
- target: description
expression: "params.description"
- target: completed
expression: "false"
- ref: complete
label: Complete
conditions:
- "record.completed == false"
actions:
- target: completed
expression: "true"
- ref: reopen
label: Reopen
conditions:
- "record.completed == true"
actions:
- target: completed
expression: "false"Apply it:
sevro module apply -f todo.yamlOutput:
{
"id": "module-uuid-here",
"name": "todo",
"action": "created"
}5. Create a record
sevro record execute \
--module <module-id> \
--entity todo \
--method new \
--arg description="Buy groceries"6. List records
sevro record list --module <module-id> --entity todo7. Complete a todo
sevro record execute \
--module <module-id> \
--entity todo \
--method complete \
--record <record-id>What you've built
In just a few commands, you have:
- A running Sevro server with a todo module
- An API that enforces your schema (description is required, completed defaults to false)
- Business logic that prevents completing an already-completed todo
- An audit trail of every change
Next steps
- Self-hosting guide — production deployment
- Module authoring — full reference for entities, attributes, methods
- CEL expressions — conditions, actions, and validation
- CLI reference — every command and flag