If you have already pushed your code to Platform.sh, then you should already have a local repository that you can build from.
Otherwise, it will be necessary to download a local copy of your project first.
Get project ID
You will need the your project ID. You can retrieve this ID at any time using the CLI command
Get a copy of the repository locally
Next, use the CLI to download the code in your Platform.sh project using the command
platform get <project id>
Next you can now connect to its services and build it on your machine.