Ever wanted to automate a complex task with pscale CLI and needed a way to wait until asynchronous operations like branch creations or deploy request merges finished? This is a collection of helper scripts around the PlanetScale CLI to synchronously
- wait for branch creation to be completed
- wait for deploy requests to be successfully merged (and get an update on the current migration status)
- connection string creation/parsing and extending scope of service tokens
- examples on how to make use of those scripts (branches, credentials, deploy requests)
- run pscale from a Docker container and still use your local config files, service tokens and port forwarding
In case you like to see those helper scripts in action without any further manual configuration, just
- Create a copy of this repo by clicking on the green 'Use this template' button or just here. Both private and public repo visibility work.
-
Create a PlanetScale account: If you have not done already, sign up here for a PlanetScale account, you can have one database for free. Do not create a database yet though, this step will be automated as part of the first Action workflow.
-
Switch to the Actions tab in your repo
- Start the workflows manually, in the displayed order.
- When you run the workflows, follow the output where it will ask you to authenticate to PlanetScale by clicking the displayed links.



