PlanetScale CLI
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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:
Optional: pscale requires a MySQL 8 Client in your PATH for certain commands. You can install it by running:
To upgrade to the latest version:
Linux
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:
To upgrade to the latest version:
Manually
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:
To upgrade to the latest version
Container images
We provide ready to use Docker container images. To pull the latest image:
To pull a specific version:
If you like to have a shell alias that runs the latest version of pscale from docker whenever you type pscale:
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.
Local Development
To run a command:
Alternatively, you can build pscale:
And then use the pscale binary built in cmd/pscale/ for testing:
The 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