> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# Install and configure the Sigma CLI

> Install and configure the Sigma CLI on your machine. Set up authentication, profiles, and settings to manage Sigma REST API access.

To use the Sigma CLI, you must install it on your machine. After installation, you can configure authentication, profiles, and more to manage your usage of the Sigma REST API.

The Sigma CLI is an external command line interface tool, the use of which is governed by the CLI license. Review the [Sigma CLI Notice](/docs/notice-for-sigma-cli-license) before using the Sigma CLI to connect with or access your Sigma organization.

## System and user requirements

Installing the Sigma CLI requires the following:

* A compatible macOS, Linux, or Windows operating system
* Internet access
* To install the Sigma CLI using Homebrew, you must install <a href="https://brew.sh/" target="_blank">Homebrew</a>
* To generate API client credentials, you must be assigned the **Admin** account type
* To authenticate a profile for the Sigma CLI with OAuth, you must be assigned an [account type](/docs/account-type-and-license-overview) with the **Use Sigma API with OAuth** permission enabled

## Install the Sigma CLI

You can install the Sigma CLI using the provided shell installer or using <a href="https://brew.sh/" target="_blank">Homebrew</a>.

### Shell installer

The Sigma CLI shell installer downloads and installs the latest release binary for your platform.

To install the Sigma CLI using the shell installer, run the following command:

```shell
curl --proto '=https' --tlsv1.2 -LsSf https://assets.sigmacomputing.com/sigma-cli/releases/latest/sigma-cli-installer.sh | sh
```

The binary installs to `~/.sigma-cli/bin/sigma`.

### Homebrew

To install the Sigma CLI using Homebrew, run the following command:

```shell
brew install sigmacomputing/tap/sigma-computing-cli
```

The binary installs to the Homebrew `bin/` directory and is automatically added to your PATH.

### Add the Sigma CLI to your PATH

If the Sigma CLI is not automatically added to your PATH after installation, you can add the install directory to your shell profile manually:

1. In your shell profile (`~/.zshrc` for Zsh or `~/.bashrc` for Bash), add the following:

   ```shell
   export PATH="$HOME/.sigma-cli/bin:$PATH"
   ```

2. After saving the file, restart your shell.

The Sigma CLI becomes available in your shell session as `sigma`.

### Verify installation

To confirm the Sigma CLI is installed and accessible, run the following command:

```shell
sigma --version
```

If the command returns a version number, such as `0.1.1`, the Sigma CLI is installed.

## Configure a profile in the Sigma CLI

To manage multiple sets of credentials, such as when separating production and staging access, you can configure profiles in the Sigma CLI using either OAuth or API client credentials.

### Configure a profile using OAuth

To configure a profile for the Sigma CLI using OAuth, create a profile and log in to your Sigma organization:

1. Run the login command:

   ```shell
   sigma auth login
   ```

2. Select **Create new profile**.

3. For **Authentication method**, select **OAuth**.

4. Enter the URL for your Sigma organization. For example, `https://app.sigmacomputing.com/example-organization`.

5. Enter a name for the new profile. For example, `staging`.

6. A new browser tab opens, prompting you to sign in to your Sigma organization. Sign in, then return to the terminal.

The profile is created in the Sigma CLI. You can authenticate to the Sigma REST API using the credentials securely stored in the profile.

To run Sigma CLI commands using the credentials stored in a profile, add `-p <profile-name>` to the command. For example, to check the authentication status of the `staging` profile, run the following command:

```shell
sigma -p staging auth status
```

### Configure a profile using API client credentials

To configure a profile for the Sigma CLI using Sigma REST API client credentials, create a profile and add your credentials to it:

1. Identify the base URL for your Sigma organization and generate client credentials by following the steps in [Generate client credentials](/reference/generate-client-credentials).

2. Run the login command:

   ```shell
   sigma auth login
   ```

3. Select **Create new profile**.

4. For **Authentication method**, select **API key**.

5. Enter a name for the new profile. For example, `staging`.

6. Select the API base URL you identified in step 1.

7. Enter the credentials you generated in step 1.

The profile is created in the Sigma CLI. You can authenticate to the Sigma REST API using the credentials securely stored in the profile.

To run Sigma CLI commands using the credentials stored in a profile, add `-p <profile-name>` to the command. For example, to check the authentication status of the `staging` profile, run the following command:

```shell
sigma -p staging auth status
```

### Verify authentication and user

After configuring multiple profiles and credentials in the Sigma CLI, you can verify authentication and identity details using the following commands:

To check the status of your current credentials, run the following command:

```shell
sigma auth status
```

To print the current bearer token, run the following command:

```shell
sigma auth token
```

To confirm which user is authenticated, run the following command:

```shell
sigma api whoami get
```