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

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

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.