Skip to content

PlanetScale CLI commands: org

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

Getting Started

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.

The org command

This command allows you to list, show, and switch organizations.


pscale org <SUB-COMMAND> <FLAG>

Available sub-commands

Sub-commandSub-command flagsDescription
listList all currently active organizations with timestamps
showDisplay the currently active organization
switch <ORGANIZATION_NAME>--save-config <PATH>Switch the currently active organization

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 flagDescriptionApplicable sub-commands
--save-config <PATH>Path to store the organization. By default, the configuration is automatically deduced based on where pscale is executed.switch

Available flags

-h, --helpView help for org command

Global flags

--api-token <TOKEN>The API token to use for authenticating against the PlanetScale API.
--api-url <URL>The base URL for the PlanetScale API. Default is
--config <CONFIG_FILE>Config file. Default is $HOME/.config/planetscale/pscale.yml. Local override inside a Git repository is $CWD/.pscale.yml in the project's root.
--debugEnable debug mode.
-f, --format <FORMAT>Show output in a specific format. Possible values: human (default), json, csv.
--no-colorDisable color output.
--service-token <TOKEN>The service token for authenticating.
--service-token-id <TOKEN_ID>The service token ID for authenticating.


The org command with switch sub-command


pscale org switch <ORGANIZATION_NAME>


Successfully switched to organization <ORGANIZATION_NAME> (using file: /Users/name/.config/planetscale/pscale.yml)

Need help?

Get help from the PlanetScale support team, or join our GitHub discussion board to see how others are using PlanetScale.

Was this page useful?
Last updated on Help us improve this page