CLI Reference
ducto ships a CLI for database migrations and pricing management.
Commands
ducto migrate <database_url>
Create tables, indexes, and RPC functions.
ducto migrate "postgresql://user:pass@host:5432/db"
Idempotent — safe to run on every deploy.
ducto pricing get
Show the current active pricing config.
Requires SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY environment variables.
ducto pricing set <file>
Update the active pricing config from a JSON or YAML file.
# From file
ducto pricing set config.yaml
# From stdin
ducto pricing set - <<'JSON'
{
"version": 1,
"models": {"_default": "input_tokens * 0.001"}
}
JSON
Requires SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY environment variables.
Environment Variables
| Variable | Required For | Description |
|---|---|---|
SUPABASE_URL | pricing commands | Supabase project URL |
SUPABASE_SERVICE_ROLE_KEY | pricing commands | Supabase service_role key |
DATABASE_URL | Direct PG usage | PostgreSQL connection string |