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, and to manage organization members. Usage:

Available sub-commands

* Flag is required

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)

The org command with member sub-commands

Command:
Members can be identified by email or by the USER_ID shown by org member list, which is paginated at 100 members per page. Changing another member’s role or removing them requires the organization admin role, and you cannot change your own role or remove the last admin. You can remove yourself without being an admin.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.