Skip to content

PlanetScale CLI commands - deploy-request

Use the PlanetScale CLI to create development branches, open deploy requests, and make non-blocking schema changes directly 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 deploy-request command

This command allows you to create, review, diff, and manage deploy requests.

Usage:

Copied
pscale deploy-request <SUB-COMMAND> <FLAG>
Note

Your database must have a production branch before you can create a deploy request.

Available sub-commands

Sub-commandSub-command flagsDescription
close <DATABASE_NAME> <DR_NUMBER>Close the specified deploy request
create <DATABASE_NAME> <BRANCH_NAME>--deploy-to <BRANCH_NAME>Create a new deploy request
deploy <DATABASE_NAME> <DR_NUMBER>Deploy the specified deploy request
diff <DATABASE_NAME> <DR_NUMBER>--webShow the diff of the specified deploy request
list <DATABASE_NAME>--webList all deploy requests for a database
review <DATABASE_NAME> <DR_NUMBER>--web, --approve, --comment <COMMENT>Approve or comment on a deploy request.
show <DATABASE_NAME> <DR_NUMBER>--webShow the specified deploy request

* Flag is required

The value <DR_NUMBER> represents the deploy request number (not to be confused with id). To see a deploy request number, run pscale deploy-request list <DATABASE_NAME>.

You can also find the number in the PlanetScale dashboard in the URL of the specified deploy request: https://app.planetscale.com/<ORGANIZATION>/<DATABASE>/deploy-requests/<DR_NUMBER>.

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
--deploy-to <BRANCH_NAME>Specify that the new deploy request deploy to a specified branch. Default is main.create
--webPerform the action in your web browserdiff, list, show
--approveApprove a deploy requestreview
--comment <COMMENT>Leave a comment on a deploy requestreview

Available flags

FlagDescription
--hGet help with the deploy-request command
--org <ORGANIZATION_NAME>Specify the organization for the deploy request you're acting upon

Global flags

CommandDescription
--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 https://api.planetscale.com/.
--config <CONFIG_FILE>Config file. Default is $HOME/.config/planetscale/pscale.yml.
--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.

Examples

The deploy-request command with review subcommand and --comment flag

Command:

Copied
pscale deploy-request review <DATABASE_NAME> 1 --comment 'Lets wait on this.'

Output:

A comment is added to the deploy request <DATABASE_NAME>/1.

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 August 1, 2022
Help us improve this page
PrivacyTerms© 2022 PlanetScale Inc.