Skip to main content

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. Usage:

Available sub-commands

Service token automation: org

Legend: ✅ supported · 🚫 unavailable with a service token · 👤 interactive login only. org show fails with not authenticated yet. Please run 'pscale auth login' under a valid service token. That is the no-current-org state. Do not run pscale auth login. Use org list --format json, then set PLANETSCALE_ORG or pass --org on resource commands. Setup and commands to avoid: CLI overview · Service tokens

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.

Available flags

Global flags

Examples

The org command with switch sub-command

Command:
Output: 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 Discord community to see how others are using PlanetScale.