silos db
Create, list, inspect, suspend, resume, and delete databases, and print connection strings, from the command line.
The silos db command group manages databases. A database is the primary unit in
Silos — it has a region, a compute size, a PostgreSQL version, and one or more
branches.
silos db <subcommand> [options]db create
Create a new database.
silos db create my-appWith explicit region, compute size, and Postgres version:
silos db create my-app --region dal --compute small --pg-version 18| Flag | Default | Description |
|---|---|---|
--region <code>, -r | iad | Region as a 3-letter code (for example iad, dal, nyc). |
--compute <size>, -c | xsmall | Compute size: xsmall, small, medium, large, or xlarge. |
--pg-version <version> | 18 | PostgreSQL major version: 16, 17, or 18. |
db list
List your databases.
silos db listScope to a single project:
silos db list --project proj_abc123| Flag | Description |
|---|---|
--project <id>, -p | Only list databases in the given project. |
db get
Show the details of a single database, including its region, status, and endpoint.
silos db get my-appThe positional argument accepts either a database ID (db_...) or a name.
db connection-string
Print a connection string suitable for psql or any Postgres client.
silos db connection-string my-appFor a specific branch:
silos db connection-string my-app --branch preview| Flag | Description |
|---|---|
--branch <name>, -b | Return the connection string for the named branch instead of the default. |
You can pipe it straight into psql:
psql "$(silos db connection-string my-app)"db suspend
Suspend a database. A suspended database keeps its durable state but stops serving compute until it's resumed.
silos db suspend my-appdb resume
Resume a suspended database.
silos db resume my-appSuspend and resume map to the same lifecycle used by scale-to-zero. A database also wakes automatically on the next connection.
db delete
Delete a database and its durable state. This is irreversible.
silos db delete my-appSkip the confirmation prompt in scripts:
silos db delete my-app --force| Flag | Description |
|---|---|
--force, -f | Skip the confirmation prompt. |
silos db delete permanently removes the database, all of its branches, and the
underlying snapshots and WAL. There is no undo.