CLI for managing PlanetScale databases, branches, deploy requests, backups, and secure local connections.
$brew install planetscale/tap/pscale
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
PlanetScale CLI is the shell interface for managing PlanetScale databases, branches, deploy requests, and access credentials. It also exposes raw API calls and secure local connection flows for database work that would otherwise require the web console.
What It Enables
- Create, inspect, delete, back up, dump, and restore databases and branches, then diff schemas, refresh branch metadata, or manage safe migration settings.
- Review and deploy schema changes with deploy requests, or run Vitess workflow and keyspace operations for traffic switching and data verification.
- Open secure local connections or shells to supported branches, create branch passwords or Postgres roles, and use
pscale apifor authenticated calls not covered by first-class commands.
Agent Fit
- Global
--format human|json|csvsupport and JSON-backed resource printers make most inspect and mutation commands straightforward to parse in scripts. - The command set supports real inspect, change, and verify loops because you can list resources, mutate them, then re-query state or drop to the raw API without changing auth context.
- Unattended runs should avoid browser login, branch selection prompts, and confirmation gates by using tokens, explicit
--organd resource arguments, and--forcewhere required.
Caveats
- Command coverage depends on database kind: deploy requests, workflows, connect, and several keyspace operations are Vitess-only, while role management is Postgres-only.
- Some connection and shell workflows depend on local
mysqlorpsqlclients, andpscale shellis interactive unless you explicitly allow non-interactive use.