# Bricks CLI Overview

Bluebricks command line, named `bricks`, enables engineers to engage with Bluebricks API using the command line interface.

`bricks` is suitable for CI/CD workflows and provides various functionalities such as collection setup and management, blueprint creation, and installation.

<figure><img src="https://454695563-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FL1aVoJ67VgVl8Uv83TuE%2Fuploads%2Fgit-blob-826cc019a593d6fcc81024aea9c7086913c56145%2FScreenshot%202024-07-01%20at%2015.07.46.png?alt=media" alt=""><figcaption></figcaption></figure>

### Install `bricks` Command Line

{% tabs %}
{% tab title="macOS" %}
Install homebrew, open the terminal, and paste the below command:

```
brew install bluebricks-co/bricks/bricks
```

{% endtab %}

{% tab title="Linux and CI/CD Tools" %}
Open the terminal, and paste the below command:

```
/bin/bash -c "$(curl -fsSL https://brickscli.s3.eu-west-1.amazonaws.com/releases/latest/install.sh)"
```

{% endtab %}

{% tab title="Windows 11+" %}
Open the PowerShell, and paste the below command:

```
iwr -useb https://brickscli.s3.eu-west-1.amazonaws.com/releases/latest/install.ps1 | iex
```

{% endtab %}
{% endtabs %}

### Test your Installation

After installing, you can test your installation by running `bricks --help`.

Additionally, authenticate bricks CLI with your Bluebricks account, use `bricks login` , and then test your connectivity status by running `bricks whoami`.

### Configuration

The CLI allows external configuration. Discover how to adjust the runtime settings and accommodate various runtimes in the [Configuration Management](https://bluebricks.co/docs/bricks-cli/configuration-management) article.

### CLI Reference

For the full list of commands, flags, and usage examples, see the [CLI Reference](https://bluebricks.co/docs/bricks-cli/cli-reference).

### CLI Logging and Troubleshooting

The Bricks CLI logs its activity locally for debugging purposes and does not ship logs to a remote location. By default, the Bricks CLI logger is off and can be enabled using the `bricks logger enable` command.

Logs are written to the following path and are chunked into 2MB file sizes:

```
~/.bricks/bricks-cli.log
```

The severity level is set to "info" and cannot be changed.

Each command logs its activity to the file using the following scheme:

```
{
  "level": "info",
  "time": "2024-07-01T15:33:42+03:00",
  "message": ">>> starting bricks"
  ... // additional parameters, message specifics 
}
```
