Log in to PlanetScale

setup & auth

// what it does

Opens your browser to confirm a device code and stores the session locally, so every later command — branch, connect, deploy-request — is authenticated. Your default organization is recorded in ~/.config/planetscale/pscale.yml. Run it once per machine when setting up.

// shell

$ pscale auth login

// gotcha

The browser flow can't run in CI or over SSH. For automation, skip login entirely and authenticate with a service token (--service-token-id / --service-token flags or the PLANETSCALE_SERVICE_TOKEN_ID / PLANETSCALE_SERVICE_TOKEN environment variables).

// resources