Requirements
- PHP 8.2 or higher
- Composer
- Git
gh) is optional but recommended. It is used by the ship command to create a GitHub repository if your project doesn’t already have one.
Installation
Install the CLI globally:$PATH environment variable, you can read more about this in the Composer documentation.
Shell Completions
The CLI supports tab completions for Bash, Zsh, and Fish. To generate and install completions for your shell, run:Authentication
Before using the CLI, you need to authenticate with your Laravel Cloud account. The CLI supports two authentication methods: browser-based OAuth and manual token entry.Browser Authentication
The simplest way to authenticate is through your browser:~/.config/cloud/config.json.
Token Authentication
You can also manage API tokens directly. This is useful for CI/CD environments or when you prefer to provide tokens manually:Quick Start
The fastest way to get an application running on Laravel Cloud is theship command. From inside your project directory, run:
.env variables, creates databases or caches, and configures features like the scheduler, Octane, or WebSockets.
Deploying
To deploy your application, run thedeploy command from your project directory:
Repository Configuration
To avoid specifying your application and environment on every command, you can save defaults for your repository:.cloud/config.json file in your project root that stores the application_id and organization_id. Subsequent commands will use these defaults automatically.
Managing Resources
The CLI provides full CRUD operations for Laravel Cloud resources. Command examples below show the most common operations.Applications
Environments
Instances
Databases
Caches
Object Storage
Domains
WebSockets
Background Processes
Commands
To run a one-off command on an environment:Utility Commands
Open your application in the Laravel Cloud dashboard:JSON Output
Many commands support a--json flag for machine-readable output, which is useful for automation and CI/CD pipelines:

