Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The vtctl command
Run Vitess vtctld operations against a Vitess database branch. Commands mirror Vitess vtctldclient where possible.
Usage:
pscale branch vtctld is an alias for pscale branch vtctl.
Most subcommands print JSON. Pass --format json when you script them so progress messages don’t mix with the JSON.
Available sub-commands
Flags shared by many sub-commands
Global flags
List tablets
Discover tablet aliases:
Matching API:
GET /v1/organizations/:org/databases/:db/branches/:branch/tablets.
Shard tablet controls
Useget-shard to inspect tablet controls and denied tables. Use set-shard-tablet-control only for an emergency fix or after a finished MoveTables workflow — the same guidance as Vitess SetShardTabletControl.
Service tokens need
write_branch_topology for development branches and write_production_branch_topology for production branches to update shard tablet controls. The same accesses apply to PlannedReparentShard.* Flag is requiredYou must pass at least one of
--remove, --denied-tables, or --disable-query-service.
Matching APIs: GET .../vtctld/shard, PUT .../vtctld/shard/tablet-control, POST .../vtctld/shard/refresh-state.

