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.
Ready to take these commands for a run on the terminal?
pscale [command] [command] to start up the
pscale CLI in your terminal.
|Login, logout, refresh your authentication|
|Create, read, destroy, and update branch backups|
|Create, delete, and manage branches|
|Create a secure connection to the given database and branch|
|Create, read, destroy, and update databases|
|Create, approve, diff, and manage deploy requests|
|Help about any command|
|Modify and manage organization options|
|Create, get, and list service tokens|
|Open a MySQL shell instance to the given database and branch|
|Signup for a new PlanetScale account|
You may use the following flags with the PlanetScale CLI commands.
|The API token to use for authenticating against the PlanetScale API|
|Config file (default is $HOME/.config/planetscale/pscale.yml)|
|Enable debug mode|
|Show output in specific format. Possible values: [human, json, csv] (default "human")|
|Get more information about a command|
|Service Token for authenticating|
|The Service Token name for authenticating|
|Show pscale version. Verify that you're using the latest version|
To add service tokens for your organization, here's a complete list of access permissions that can be granted to a token:
|Token Access Permissions:||What they control:|
|CRUD on Branches of a |
|Connect to development Branches of a |
|Connect to production Branches of a |
|Deploy Requests on Branches of a |
|Comments of Deploy Requests on Branches of a |