> For the complete documentation index, see [llms.txt](https://bluebricks.co/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bluebricks.co/docs/bricks-cli/cli-reference.md).

# CLI Reference

The `bricks` command-line interface lets DevOps and Platform teams manage Infrastructure-as-Code at scale -- from creating and publishing blueprints to deploying them across collections.

For installation and setup, see the [CLI Overview](/docs/bricks-cli/bricks-cli.md).

{% hint style="info" %}
Run `bricks <command> --help` from your terminal to see usage details and available flags for any command.
{% endhint %}

## Core Workflow

The commands you will use most often when working with blueprints and deployments.

| Command                                                                | Description                                                  |
| ---------------------------------------------------------------------- | ------------------------------------------------------------ |
| [bricks blueprint](/docs/bricks-cli/cli-reference/bricks_blueprint.md) | Create, publish, version, and manage blueprints and packages |
| [bricks install](/docs/bricks-cli/cli-reference/bricks_install.md)     | Deploy a blueprint to a collection                           |
| [bricks uninstall](/docs/bricks-cli/cli-reference/bricks_uninstall.md) | Destroy a blueprint from a collection                        |
| [bricks run](/docs/bricks-cli/cli-reference/bricks_run.md)             | Plan and apply resources locally or remotely                 |
| [bricks deploy](/docs/bricks-cli/cli-reference/bricks_deploy.md)       | View and manage deployments                                  |
| [bricks updateci](/docs/bricks-cli/cli-reference/bricks_updateci.md)   | Automate artifact and blueprint updates based on Git changes |

## Infrastructure Management

| Command                                                                  | Description                                                   |
| ------------------------------------------------------------------------ | ------------------------------------------------------------- |
| [bricks collection](/docs/bricks-cli/cli-reference/bricks_collection.md) | Create, list, enable, disable, and delete collections         |
| [bricks clouds](/docs/bricks-cli/cli-reference/bricks_clouds.md)         | Manage cloud provider accounts (AWS, GCP, Azure, Self-Hosted) |
| [bricks setup](/docs/bricks-cli/cli-reference/bricks_setup.md)           | Register a customer cloud on Bluebricks                       |

## Authentication

Authenticate interactively or with long-lived API tokens for CI/CD. For a step-by-step guide, see [Authentication](/docs/bricks-cli/authentication.md).

| Command                                                          | Description                                    |
| ---------------------------------------------------------------- | ---------------------------------------------- |
| [bricks login](/docs/bricks-cli/cli-reference/bricks_login.md)   | Connect the CLI to a Bluebricks account        |
| [bricks logout](/docs/bricks-cli/cli-reference/bricks_logout.md) | Disconnect from the current Bluebricks account |
| [bricks whoami](/docs/bricks-cli/cli-reference/bricks_whoami.md) | Display the signed-in user                     |

For non-interactive environments (CI/CD pipelines, scripts), pass the `--api-key` flag or configure a [long-lived token](/docs/bricks-cli/authentication/authenticate-using-long-lived-tokens.md).

## Utility

| Command                                                                                                                      | Description                                                         |
| ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [bricks logger](https://github.com/bluebricks-dev/Bluebricks-Documentation/blob/main/cli-reference/bricks_logger.md)         | Enable, disable, and manage CLI logging                             |
| [bricks telemetry](https://github.com/bluebricks-dev/Bluebricks-Documentation/blob/main/cli-reference/bricks_telemetry.md)   | Enable, disable, and check telemetry settings                       |
| [bricks completion](https://github.com/bluebricks-dev/Bluebricks-Documentation/blob/main/cli-reference/bricks_completion.md) | Generate shell autocompletion scripts (Bash, Zsh, Fish, PowerShell) |
| [bricks version](/docs/bricks-cli/cli-reference/bricks_version.md)                                                           | Print the CLI version                                               |

## Global Flags

Every command accepts the following flags:

```
      --api-key string    API key for authentication (overrides JWT)
      --config string     Config file (default: $HOME/.bricks/config.yaml)
  -h, --help              Print help message
      --non-interactive   Suppress interactive UI elements
  -v, --version           Print CLI version
```
