Overview
Managed Postgres with APIs your app can call directly.
Each database project is its own Postgres database. Use it with any Postgres client, or call its APIs from your app without writing a backend.
Create one
clouzark db create my-app-db # creates the database and links this directory to it
clouzark db ls
clouzark db link # link an existing database insteadConnect
clouzark db url # postgres:// connection string
clouzark db keys # REST URL, anon key, and service keyUse the connection string from server code, ORMs, and migration tools. Use the keys with the REST API, Auth, Storage, and Realtime.
| Key | Where it's safe | Row-level security |
|---|---|---|
| Anon key | Browsers and mobile apps | Applies |
| Service key | Server-side only | Bypassed |
Never ship the service key or the connection string to a browser.
Run SQL
clouzark db query "select count(*) from orders"
clouzark db query -f report.sql --json
cat seed.sql | clouzark db querydb query runs as the database owner, so it bypasses row-level security. The dashboard also has an SQL editor, a table editor, and CSV import and export.
Back up
clouzark db dump -f schema.sql # schema only
clouzark db dump --full -f backup.sql # schema and data
clouzark db dump --data-only -f data.sqldb dump runs your local pg_dump, so Postgres client tools must be installed.