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:Tinker
Thetinker command opens an interactive PHP REPL connected to your Laravel Cloud environment, allowing you to execute PHP code directly against your running application:
Editor mode
If you prefer to write code in your editor, use the--editor option:
code, subl, vim, and phpstorm. If no value is given, the VISUAL or EDITOR environment variable is used.
Non-interactive mode
To execute a single snippet of PHP code without entering the interactive session, use the--code option:
Timeout
By default, code execution will time out after 60 seconds. You can adjust this with the--timeout option:
Utility commands
Open your application in the Laravel Cloud dashboard:Agent skills
The CLI can install Laravel Cloud skills for your AI coding agents. Skills are fetched from thelaravel/agent-skills repository and installed into the appropriate directory for each agent.
Global vs. project installation
By default, skills are installed globally if you are outside a Laravel Cloud project, or to the current project if the Cloud CLI is detected as a local dependency. You can override this behavior:Specifying agents
To install skills for specific agents without being prompted:Overwriting existing skills
If skills have already been installed, use the--force flag to overwrite them:
JSON output
Many commands support a--json flag for machine-readable output, which is useful for automation and CI/CD pipelines:

