# 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="/files/6FNxXEXrS6menTvV1i7c" 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](/docs/bricks-cli/configuration-management.md) article.

### CLI Reference

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

### 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 
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluebricks.co/docs/bricks-cli/bricks-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
