> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Laravel Cloud CLI — operate Laravel Cloud from your terminal

> How to use laravel/cloud-cli to manage Laravel Cloud apps, environments, databases, domains, and more from the terminal.

## What is the Laravel Cloud CLI?

`laravel/cloud-cli` is a CLI for operating [Laravel Cloud](https://cloud.laravel.com) from your terminal.
Built on Laravel Zero, it lets you run the same operations you would perform in the dashboard using the `cloud` command.

With this CLI, you can centrally manage applications, environments, databases, caches, buckets, domains, WebSockets, and more.

## Requirements

Before installing, make sure the following are in place:

* `PHP 8.2+`
* `Composer`
* `GitHub CLI (gh)` (installed and authenticated)
* `Git`

## Installation

First, set up the CLI locally.

<Steps>
  <Step title="Clone the repository and install dependencies">
    ```bash theme={null}
    gh repo clone laravel/cloud-cli
    cd cloud-cli
    composer install
    ```
  </Step>

  <Step title="Set up a `cloud` alias">
    zsh:

    ```bash theme={null}
    echo 'alias cloud="php '$(pwd)'/cloud"' >> ~/.zshrc
    source ~/.zshrc
    ```

    bash:

    ```bash theme={null}
    echo 'alias cloud="php '$(pwd)'/cloud"' >> ~/.bashrc
    source ~/.bashrc
    ```
  </Step>

  <Step title="Manual setup with an arbitrary path">
    ```bash theme={null}
    alias cloud="php /path/to/cloud-cli/cloud"
    ```
  </Step>
</Steps>

## Authentication

Authenticate before using most commands.

```bash theme={null}
cloud auth
```

`cloud auth` opens the browser and authenticates via OAuth.
If you want to manage tokens for CI or similar, use `cloud auth:token`.

```bash theme={null}
cloud auth:token
```

## Repository configuration

If you don't want to choose the `application` or `environment` every time in your project, run `cloud repo:config`.

```bash theme={null}
cloud repo:config
```

This saves defaults to your Git repository, so you can run commands like `cloud deploy` with fewer arguments.

## Deployment

It's efficient to distinguish between the initial deploy and subsequent deploys.

```bash theme={null}
# First time: create and deploy the app with a guided flow
cloud ship

# Subsequent times: deploy to the existing app
cloud deploy

# Open the dashboard
cloud dashboard
```

## Main command categories

From the command reference in the README, here are the categories you'll use daily.

| Category      | Example commands                                                            | Purpose                               |
| ------------- | --------------------------------------------------------------------------- | ------------------------------------- |
| Auth / Config | `cloud auth`, `cloud auth:token`, `cloud repo:config`                       | Authentication and defaults           |
| Application   | `cloud application:list`, `cloud application:create`                        | Application management                |
| Environment   | `cloud environment:list`, `cloud environment:get`, `cloud environment:logs` | Environment info and logs             |
| Deploy        | `cloud ship`, `cloud deploy`, `cloud deploy:monitor`                        | Deployment management                 |
| Database      | `cloud database-cluster:*`, `cloud database:*`, `cloud database-snapshot:*` | DB clusters, databases, and snapshots |
| Cache         | `cloud cache:list`, `cloud cache:create`, `cloud cache:types`               | Cache management                      |
| Bucket        | `cloud bucket:*`, `cloud bucket-key:*`                                      | Object storage management             |
| Domain        | `cloud domain:list`, `cloud domain:create`, `cloud domain:verify`           | Domain setup and verification         |
| WebSocket     | `cloud websocket-cluster:*`, `cloud websocket-application:*`                | Reverb-related resources              |

## Environment variable management

Manage environment variables with `cloud environment:variables`.
This command handles operations such as append / set / replace together.

```bash theme={null}
cloud environment:variables
```

For CI or team operations, use this command to standardize the configuration change workflow.

## Checking usage

Check billing and resource usage with `cloud usage`.

```bash theme={null}
# Current month usage
cloud usage

# Detailed view
cloud usage --detailed

# Previous period usage
cloud usage --period=previous
```

To narrow by environment, use `cloud usage --environment=<id>`.


## Related topics

- [Cloud Sessions](/en/packages/laravel-copilot-sdk/cloud-sessions.md)
- [Laravel Cloud — a full look at the Laravel-native PaaS](/en/blog/laravel-cloud.md)
- [laravel/agent-skills — Laravel's official AI agent skills](/en/blog/agent-skills-introduction.md)
- [Bundle Copilot CLI](/en/packages/laravel-copilot-sdk/bundle-cli.md)
- [Laravel Cloud Hibernation (auto-sleep)](/en/blog/laravel-cloud-hibernation.md)
