cli
The CLI for PlanetScale Database
Documentation
PlanetScale CLI 
PlanetScale is more than a database and our CLI is more than a jumble of commands. The `pscale` command line tool brings branches, deploy requests, and other PlanetScale concepts to your fingertips.

Installation
macOS
`pscale` is available via a Homebrew Tap, and as downloadable binary from the releases page:
brew install planetscale/tap/pscaleOptional: `pscale` requires a MySQL 8 Client in your PATH for certain commands. You can install it by running:
brew install mysql-client@8.4To upgrade to the latest version:
brew upgrade pscaleLinux
`pscale` is available as downloadable binaries from the releases page. Download the .deb or .rpm from the releases page and install with `sudo dpkg -i` and `sudo rpm -i` respectively.
Arch: `pscale-cli-bin`
Windows
`pscale` is available via scoop, and as a downloadable binary from the releases page:
scoop bucket add pscale https://github.com/planetscale/scoop-bucket.git
scoop install pscale mysqlTo upgrade to the latest version:
scoop update pscaleManually
Download the pre-compiled binaries from the releases page and copy to the desired location.
Alternatively, you can install bin which works on all `macOS`, `Windows`, and `Linux` platforms:
bin install https://github.com/planetscale/cliTo upgrade to the latest version
bin upgrade pscaleContainer images
We provide ready to use Docker container images. To pull the latest image:
docker pull planetscale/pscale:latestTo pull a specific version:
docker pull planetscale/pscale:v0.63.0If you like to have a shell alias that runs the latest version of pscale from docker whenever you type `pscale`:
mkdir -p $HOME/.config/planetscale
alias pscale="docker run -e HOME=/tmp -v $HOME/.config/planetscale:/tmp/.config/planetscale --user $(id -u):$(id -g) --rm -it -p 3306:3306/tcp planetscale/pscale:latest"If you need a more advanced example that works with service tokens and differentiates between commands that need a pseudo terminal or non-interactive mode, have a look at this shell function.
MCP Server Integration
Use the hosted PlanetScale MCP server: https://planetscale.com/docs/connect/mcp
GitHub Actions Usage
Use the setup-pscale-action to install and use `pscale` in GitHub Actions.
- name: Setup pscale
uses: planetscale/setup-pscale-action@v1
- name: Use pscale
env:
PLANETSCALE_SERVICE_TOKEN_ID: ${{ secrets.PLANETSCALE_SERVICE_TOKEN_ID }}
PLANETSCALE_SERVICE_TOKEN: ${{ secrets.PLANETSCALE_SERVICE_TOKEN }}
run: |
pscale deploy-request list my-db --org my-orgLocal Development
To run a command:
go run cmd/pscale/main.goAlternatively, you can build `pscale`:
go build cmd/pscale/main.goAnd then use the `pscale` binary built in `cmd/pscale/` for testing:
./cmd/pscale/pscaleThe API client is vendored at `internal/planetscale/`; this repo **no longer depends on
`planetscale-go`**. Read `doc/api-client.md` before touching
API-facing code.
Documentation
Please checkout our Documentation page: planetscale.com/docs
For AI agents and automation, run `pscale agent-guide` (or `pscale --skill` for an
installable skill file) — see AGENTS.md.
For operational workflows (inventory, safety review, schema recommendations), install
Frequently asked questions
What is cli?
cli is The CLI for PlanetScale Database
How do I install cli?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is cli open source?
Yes — it is hosted on GitHub at https://github.com/planetscale/cli and has 665 stars.
Related MCP tools
Query anything (GitHub, Notion, +40 more) with SQL and let LLMs (ChatGPT, Claude) connect to using MCP Go-based implementation. Trusted by 1300+ developers.
Neo4j Labs Model Context Protocol servers
Search infrastructure for AI
Python SQL Parser and Transpiler
A command-line interface for interacting with MCP (Model Context Protocol) servers using both stdio and HTTP transport. Go-based implementation.
Write Model Context Protocol servers in few lines of go code. Docs at https://mcpgolang.com . Created by https://metoro.io
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP