Skip to main content
The Laravel Cloud CLI provides a powerful command-line interface for managing your applications, environments, and resources on Laravel Cloud. Whether you are deploying from your terminal or integrating with a CI/CD pipeline, the CLI gives you full control over your Laravel Cloud account.

Requirements

  • PHP 8.2 or higher
  • Composer
  • Git
The GitHub CLI (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:
composer global require laravel/cloud-cli
Note: Make sure your global vendor binaries directory is in your $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:
cloud completions
You can also target a specific shell directly:
cloud completions zsh
cloud completions bash
cloud completions fish

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:
cloud auth
This command opens your default browser, prompts you to authorize the CLI, and stores the resulting API token locally. The token is saved in ~/.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:
# Add a token
cloud auth:token --add

# List stored tokens
cloud auth:token --list

# Remove a token
cloud auth:token --remove
If you have tokens for multiple organizations, the CLI will prompt you to select which organization to use when running commands.

Quick start

The fastest way to get an application running on Laravel Cloud is the ship command. From inside your project directory, run:
cloud ship
This guided flow walks you through creating an application, configuring your environment, and deploying — all in a single command. It detects your repository, prompts for a region and application name, and optionally syncs your .env variables, creates databases or caches, and configures features like the scheduler, Octane, or WebSockets.

Deploying

To deploy your application, run the deploy command from your project directory:
cloud deploy
The CLI resolves the target application and environment automatically using your repository configuration. After the deployment starts, the CLI monitors its progress and reports the result in real time. To open your application in the browser after a successful deployment:
cloud deploy --open
You can also monitor an active deployment separately:
cloud deploy:monitor

Repository configuration

To avoid specifying your application and environment on every command, you can save defaults for your repository:
cloud repo:config
This creates a .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

cloud application:list
cloud application:get
cloud application:create
cloud application:update

Environments

cloud environment:list
cloud environment:get
cloud environment:create
cloud environment:update
cloud environment:delete
To update environment variables interactively or by using command options:
cloud environment:variables
To view environment logs:
cloud environment:logs

Instances

cloud instance:list
cloud instance:get
cloud instance:create
cloud instance:update
cloud instance:delete
cloud instance:sizes

Databases

cloud database-cluster:list
cloud database-cluster:get
cloud database-cluster:create
cloud database-cluster:update
cloud database-cluster:delete
You can manage individual databases within a cluster:
cloud database:list
cloud database:get
cloud database:create
cloud database:delete
To connect to a database locally:
cloud database:open
Database snapshots and restores are also available:
cloud database-snapshot:list
cloud database-snapshot:get
cloud database-snapshot:create
cloud database-snapshot:delete
cloud database-restore:create

Caches

cloud cache:list
cloud cache:create
cloud cache:update
cloud cache:delete
cloud cache:types

Object storage

cloud bucket:list
cloud bucket:get
cloud bucket:create
cloud bucket:update
cloud bucket:delete
Bucket keys can be managed separately:
cloud bucket-key:list
cloud bucket-key:get
cloud bucket-key:create
cloud bucket-key:update
cloud bucket-key:delete

Domains

cloud domain:list
cloud domain:create
cloud domain:update
cloud domain:delete
cloud domain:verify

WebSockets

cloud websocket-cluster:list
cloud websocket-cluster:get
cloud websocket-cluster:create
cloud websocket-cluster:update
cloud websocket-cluster:delete
WebSocket applications within a cluster:
cloud websocket-application:list
cloud websocket-application:get
cloud websocket-application:create
cloud websocket-application:update
cloud websocket-application:delete

Background processes

cloud background-process:list
cloud background-process:get
cloud background-process:create
cloud background-process:update
cloud background-process:delete

Commands

To run a one-off command on an environment:
cloud command:run
To list previously executed commands:
cloud command:list
cloud command:get

Tinker

The tinker command opens an interactive PHP REPL connected to your Laravel Cloud environment, allowing you to execute PHP code directly against your running application:
cloud tinker
By default, a multi-line text input is presented in your terminal where you can type and submit PHP code. Each submission is sent to your Cloud environment for execution, and the result is displayed in your terminal. The session remains open so you can continue executing code.

Editor mode

If you prefer to write code in your editor, use the --editor option:
cloud tinker --editor=code
This opens a temporary file in your editor. Every time you save the file, the code is automatically sent to your Cloud environment for execution and the result is displayed in your terminal. The session ends when you close the file. Common editor values include 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:
cloud tinker --code="echo App\Models\User::count();"
This is useful for scripting and CI/CD pipelines.

Timeout

By default, code execution will time out after 60 seconds. You can adjust this with the --timeout option:
cloud tinker --timeout=120

Utility commands

Open your application in the Laravel Cloud dashboard:
cloud dashboard
Open your application in the browser:
cloud browser
Retrieve Laravel Cloud IP addresses by region:
cloud ip:addresses

Agent skills

The CLI can install Laravel Cloud skills for your AI coding agents. Skills are fetched from the laravel/agent-skills repository and installed into the appropriate directory for each agent.
cloud skills:install
The command auto-detects which agents you have configured and prompts you to select which ones to install skills for. Supported agents include Claude, Cursor, Junie, GitHub Copilot, and a generic agent format.

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:
# Install globally (e.g. ~/.claude/skills)
cloud skills:install --global

# Install to the current project (e.g. .claude/skills)
cloud skills:install --project

Specifying agents

To install skills for specific agents without being prompted:
cloud skills:install --agent=claude --agent=cursor

Overwriting existing skills

If skills have already been installed, use the --force flag to overwrite them:
cloud skills:install --force

JSON output

Many commands support a --json flag for machine-readable output, which is useful for automation and CI/CD pipelines:
cloud instance:list --json
cloud environment:variables --json --action=set --key=APP_ENV --value=production
In non-interactive environments (such as GitHub Actions), interactive prompts are disabled automatically.