Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

PlanetScale CLI

$ pscale Official Med Risk
PlanetScale · Database & Data · Apache-2.0 · macos / linux / windows

PlanetScale CLI manages databases, non-blocking schema branches, deploy requests, service tokens, and local proxy tunnels. Features consistent --format json output, service-token auth via env vars, and safe deploy-request workflows.

FCRS-1.0 Score
88 /100
Good
Medium Confidence
Zero-Friction Install
brew install planetscale/tap/pscale
CLI vs MCP Decision CLI Preferred vs MCP

pscale offers mature branch diffing, deploy request linting, and --format json automation that maps directly to Git/PR agent workflows.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports --format json and --format csv, service-token env vars, and deterministic Cobra subcommands.

  • Supports --format json across commands and PLANETSCALE_SERVICE_TOKEN env auth
Trust & Safety 22 / 25

Branch + deploy-request model prevents direct DDL writes to production branches when safe migrations are enabled.

  • branch diff and deploy-request workflow separate schema staging from prod
Setup & Portability 14 / 15

Single Go binary via Homebrew, Scoop, apt/rpm, and GitHub Releases across all major OSes.

  • Cross-platform static Go binary
Utility & Efficiency 13 / 15

Simplifies Vitess branching, schema diffing, and local pscale connect proxying.

  • Handles branching, diffs, and secure local proxies without manual MySQL TLS setup
Maintenance & Lineage 8 / 10

Official planetscale/cli maintained by PlanetScale under Apache-2.0.

  • Official planetscale/cli repository
Docs & Verifiability 8 / 10

Well-structured command reference and workflow guides.

  • Official reference at planetscale.com/docs/reference/planetscale-cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

OAuth token stored in ~/.config/planetscale/access-token, or service tokens passed via PLANETSCALE_SERVICE_TOKEN and PLANETSCALE_SERVICE_TOKEN_ID.

Side Effects
Read-Only Remote Write Destructive Billing Impact
Cost & Quotas

CLI is Apache-2.0 open-source; PlanetScale managed databases are billed per plan.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# PlanetScale CLI Agent Rules
- Always pass `--format json` and explicit `--org <org>` flags.
- Develop schema changes on a branch via `pscale branch create` and inspect with `pscale branch diff`.
- NEVER run `pscale database delete` or auto-deploy `deploy-request deploy` to `main` without human sign-off.

Agent-Ready Command Recipes

Safe Read-Only Queries

List databases in JSON format
pscale database list --org <org> --format json

Enumerates PlanetScale databases and status in machine-readable JSON.

Inspect schema diff between branch and main
pscale branch diff <db> <branch> --org <org> --format json

Previews DDL differences safely before opening a deploy request.

Controlled Writes & Previews

Create a development schema branch
pscale branch create <db> agent-schema-change --org <org> --format json

Creates an isolated development branch for schema edits without touching production.

Strengths for Agents

  • + --format json works consistently across database, branch, and deploy-request commands.
  • + Branch + branch diff + deploy-request lifecycle aligns naturally with safe agent PR workflows.
  • + Service token env vars (PLANETSCALE_SERVICE_TOKEN) avoid interactive browser login in CI.

Caveats & Pitfalls

  • ! pscale shell is interactive by default unless SQL is piped via stdin.
  • ! pscale connect runs a persistent foreground tunnel process.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI