Ploy CLI is a powerful tool for managing and deploying your cloud applications.
To install Ploy CLI, run:
curl -fsSL https://raw.githubusercontent.com/ploycloud/ploy-server-cli/main/install.sh | bashThis script will automatically download and install the latest version of Ploy CLI.
- Go to the releases page and download the latest version for your operating system and architecture.
- Rename the downloaded file to
ploy. - Make the file executable:
chmod +x ploy - Move the file to a directory in your PATH, e.g.,
sudo mv ploy /usr/local/bin/
ploy [command]Available Commands:
ploy services start: Start global services (MySQL, Redis, Nginx Proxy)ploy services stop: Stop global servicesploy services restart: Restart global services
ploy sites start: Start all sitesploy sites stop: Stop all sitesploy sites restart: Restart all sites
ploy start: Start the current siteploy stop: Stop the current siteploy restart: Restart the current siteploy logs [container]: View logs from containersploy exec [container] [command]: Execute commands inside a container
ploy wp [wp-cli commands]: Execute WP-CLI commands for the current WordPress site
ploy deploy: Deploy a repository to PloyCloudploy list: List all deploymentsploy status: Check the status of a deployment
ploy version: Display the current version of Ploy CLIploy update: Update Ploy CLI to the latest version
For more information on a specific command, run:
ploy [command] --help-
Start global services:
ploy global start
-
Deploy a repository:
ploy deploy https://github.com/username/repo.git
-
Start all sites:
ploy sites start
-
Execute a WP-CLI command:
ploy wp plugin list
-
View logs for a specific container:
ploy logs nginx
Ploy CLI uses a configuration file to store your API key and default region. You can set these values by creating
a ~/.ploy/config.yaml file with the following content:
api_key: your-api-key-here
region: us-west-2Alternatively, you can set environment variables:
export PLOY_API_KEY=your-api-key-here
export PLOY_REGION=us-west-2To contribute to Ploy CLI development:
-
Clone the repository:
git clone https://github.com/ploycloud/ploy-server-cli.git cd ploy-cli -
Install dependencies:
go mod download
-
Build the project:
go build -o ploy
-
Run tests:
go test ./...
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any issues or have questions, please open an issue on GitHub.