Skip to content

PlanetScale CLI

Use the PlanetScale CLI to create development branches, open deploy requests, and make non-blocking schema changes directly from your terminal.

Getting Started

Make sure to first set up your PlanetScale developer environment. Once you've installed the pscale CLI, you'll be able to interact with PlanetScale and manage your databases.

PlanetScale CLIPlanetScale CLI

Ready to take these commands for a run on the terminal?

Available Commands

Use pscale [command] [command] to start up the pscale CLI in your terminal.

audit-logList audit logs
authLogin, logout, refresh your authentication
backupCreate, read, destroy, and update branch backups
branchCreate, delete, and manage branches
completionGenerate completion script for your shell
connectCreate a secure connection to the given database and branch
databaseCreate, read, destroy, and update databases
deploy-requestCreate, approve, diff, and manage deploy requests
helpHelp about any command
orgModify and manage organization options
passwordCreate, list, and delete branch passwords
regionList regions
service-tokenCreate, get, and list service tokens
shellOpen a MySQL shell instance to the given database and branch
signupSign up for a new PlanetScale account


You may use the following flags with the PlanetScale CLI commands.

--api-token stringThe API token to use for authenticating against the PlanetScale API
--config stringConfig file (default is $HOME/.config/planetscale/pscale.yml)
--debugEnable debug mode
-f, --format stringShow output in specific format. Possible values: [human, json, csv] (default "human")
-h, --helpGet more information about a command
--no-colorDisable color output
--service-token stringService Token for authenticating
--service-token-id stringThe Service Token ID for authenticating
--versionShow pscale version. Verify that you're using the latest version

Service tokens in organizations

To add service tokens for your organization, here's a complete list of access permissions that can be granted to a token:

Token Access PermissionsWhat they control


CRUD on Branches of a Database
connect_branchConnect to development Branches of a Database
connect_production_branchConnect to production Branches of a Database


Deploy Requests on Branches of a Database

Comments of Deploy Requests on Branches of a Database

Need help?

Get help from PlanetScale's support team, or join our GitHub Discussion board to see how others are using PlanetScale.

Was this page useful?
Last updated on January 20, 2022
Help us improve this page
PrivacyTerms© 2022 PlanetScale Inc.