PlanetScale CLI commands - service-token
Use the PlanetScale CLI to create development branches, open deploy requests, and make non-blocking schema changes directly from your terminal.
Make sure to first set up your PlanetScale developer environment. Once you've installed the
pscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
This command allows you to create, list, and manage access for service tokens.
|Add individual permissions to the specified service token in the organization|
|Create a service token for the organization|
|Delete an entire service token in an organization|
|Delete individual permissions granted to a service token in the organization|
|List the IDs of|
<PASSWORD_ID> represents the ID number of the set of credentials. To find all available credentials and their IDs, run
pscale list <DATABASE_NAME> <BRANCH_NAME>.
Sub-command flag descriptions
Some of the sub-commands have additional flags unique to the sub-command. This section covers what each of those does. See the above table for which context.
|Sub-command flag||Description||Applicable sub-commands|
|The database this project is using.|
|View help for |
|The organization for the current user|
|The API token to use for authenticating against the PlanetScale API.|
|The base URL for the PlanetScale API. Default is |
|Config file. Default is |
|Enable debug mode.|
|Show output in a specific format. Possible values: |
|Disable color output.|
|The service token for authenticating.|
|The service token ID for authenticating.|
service-token command with
add-access sub-command and
This will add the following permissions to the specified access token:
create_branch. The output will show the updated permissions on all databases.
You can find a list of all permissions in our Access control doc.
|DATABASE_NAME||approve_deploy_request, connect_branch, connect_production_branch, create_branch, create_comment, create_deploy_request, delete_branch, read_branch, read_comment, read_deploy_request|
|DATABASE_NAME_2||read_branch, delete_branch, create_branch|