Skip to main content

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

VariableRequired ForDescription
SUPABASE_URLpricing commandsSupabase project URL
SUPABASE_SERVICE_ROLE_KEYpricing commandsSupabase service_role key
DATABASE_URLDirect PG usagePostgreSQL connection string