Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cubby.pro/llms.txt

Use this file to discover all available pages before exploring further.

cubby db

Manage Neon Postgres databases for your apps. These commands require a Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) plan. SQLite apps do not use these commands — SQLite databases are auto-managed with no additional CLI needed.

Subcommands

CommandDescription
cubby db exportExport database as SQL or CSV
cubby db branchCreate or delete a database branch
cubby db branchesList database branches
cubby db snapshotCreate a point-in-time snapshot
cubby db snapshotsList snapshots
cubby db restoreRestore from a snapshot

cubby db export

Export a Neon database as SQL or CSV. Output goes to stdout by default, or to a file with --output.

Usage

cubby db export [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired
--format-fExport format (sql or csv)sql
--output-oOutput file path (defaults to stdout)

Examples

# Export as SQL to stdout
cubby db export --app my-app

# Export as SQL to a file
cubby db export --app my-app --output backup.sql

# Export as CSV
cubby db export --app my-app --format csv

# Pipe to another tool
cubby db export --app my-app | psql local-db

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.
SQLite apps: The cubby db export CLI command is for Neon Postgres apps only. To export a SQLite database, use the Export Data button in the dashboard. SQLite export requires the app to be running.
Stopped apps: If your app was stopped due to a plan downgrade, you can still export your Neon database from the dashboard regardless of your current plan.

cubby db branch

Create or delete a Neon database branch. Branches let you experiment with schema or data changes without affecting your main database.

Usage

cubby db branch [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired
--branch-nameName for the new branchAuto-generated
--deleteDelete a branch by name

Examples

# Create a branch with auto-generated name
cubby db branch --app my-app

# Create a named branch
cubby db branch --app my-app --branch-name feature-test

# Delete a branch
cubby db branch --app my-app --delete feature-test

Output

On success, the command prints the branch name and a connection string you can use to connect directly to the branch.

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.

cubby db branches

List all database branches for an app.

Usage

cubby db branches [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired

Examples

cubby db branches --app my-app

Output

NAME                                CREATED                   DEFAULT
main                                Apr 1, 2026, 10:30 AM     yes
feature-test                        Apr 2, 2026, 02:15 PM

2 branch(es)

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.

cubby db snapshot

Create a point-in-time snapshot of your Neon database. Use snapshots as restore points before risky migrations or data changes.

Usage

cubby db snapshot [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired

Examples

# Create a snapshot before running a migration
cubby db snapshot --app my-app

Output

Snapshot created
  Snapshot ID: snap-abc123
  Timestamp:   2026-04-02T14:30:00Z
  App:         my-app

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.

cubby db snapshots

List all database snapshots for an app.

Usage

cubby db snapshots [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired

Examples

cubby db snapshots --app my-app

Output

ID                        NAME                                CREATED
snap-abc123               pre-migration-backup                Apr 1, 2026, 10:30 AM
snap-def456               weekly-backup                       Mar 25, 2026, 08:00 AM

2 snapshot(s)

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.

cubby db restore

Restore a Neon database from a snapshot. This is a non-destructive operation — it creates a new branch at the snapshot point. Your original data is unchanged.

Usage

cubby db restore [flags]

Flags

FlagShortDescriptionDefault
--app-aApp nameRequired
--snapshot-sSnapshot ID to restore fromRequired

Examples

# Restore from a specific snapshot
cubby db restore --app my-app --snapshot snap-abc123

Output

Restore complete
  Branch:     restore-snap-abc123
  Connection: postgres://...
  Restored:   from snapshot snap-abc123

Note: This is a non-destructive restore. A new branch was created
at the snapshot point. Your original data is unchanged.

Tier

Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) required.

Troubleshooting

”403 Forbidden” or “PLAN_LIMIT_REACHED”

Your plan does not include Neon Postgres. Upgrade to Builder (9.99/mo)orPro(9.99/mo) or Pro (19.99/mo) at app.cubby.pro/billing.

”App not found”

Check your app name with:
cubby apps

“No database configured”

This app uses SQLite, not Neon Postgres. The cubby db commands only work with Neon Postgres apps. SQLite databases are auto-managed and do not require CLI commands.

”Not logged in”

Authenticate first:
cubby login