Databases CLI reference
Source: @socra/db-cli@0.0.1.
This reference includes every command, argument, and option declared by this released package. Defaults and accepted values are included where the package declares them. Command-specific validation and permissions also apply; see the API reference for resource contracts.
Use socra db --help, or append --help to any command, to inspect the locally installed version.
socra db
Provision and operate managed PostgreSQL databases
Scroll to see all columns.
| Command | Purpose |
|---|---|
socra db create | Create a managed database |
socra db list | List managed databases |
socra db get | Get a managed database |
socra db connect | Store DATABASE_URL in Socra Secret and return its version reference |
socra db update | Rename a managed database |
socra db delete | Delete a managed database and its isolated runtime resources |
socra db create
Create a managed database
Text
socra db create <name> [options]
Arguments
Scroll to see all columns.
| Argument | Required | Description |
|---|---|---|
name | Yes | Database name |
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
--storage | Value | Persistent storage in GiB (default 10) |
socra db list
List managed databases
Text
socra db list [options]
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
--limit | Value | Maximum rows to return |
--after | Value | Cursor from a previous page |
socra db get
Get a managed database
Text
socra db get <id> [options]
Arguments
Scroll to see all columns.
| Argument | Required | Description |
|---|---|---|
id | Yes | Database id, e.g. db_… |
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
socra db connect
Store DATABASE_URL in Socra Secret and return its version reference
Text
socra db connect <id> [options]
Arguments
Scroll to see all columns.
| Argument | Required | Description |
|---|---|---|
id | Yes | Database id, e.g. db_… |
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
--secret-name | Value | Optional Socra Secret name |
socra db update
Rename a managed database
Text
socra db update <id> [options]
Arguments
Scroll to see all columns.
| Argument | Required | Description |
|---|---|---|
id | Yes | Database id, e.g. db_… |
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
--name | Value | New database name |
socra db delete
Delete a managed database and its isolated runtime resources
Text
socra db delete <id> [options]
Arguments
Scroll to see all columns.
| Argument | Required | Description |
|---|---|---|
id | Yes | Database id, e.g. db_… |
Options
Scroll to see all columns.
| Option | Input | Description |
|---|---|---|
--project | Value | Owning Socra project |
Next step
Return to the Databases overview.