> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/ai-command-center/ai-producers-working-with-ai-models-and-discovering-data/collibra-cli-commands-for-ai-command-center/install-and-set-up-the-collibra-cli.md). Agents can also search and read this documentation through its [MCP server](https://docs.collibra.com/~gitbook/mcp).

# Install and set up the Collibra CLI

The Collibra CLI is a unified command-line tool that packages API calls, allowing you to manage AI Command Center directly from the terminal. It allows you to manually interact with your environment and seamlessly integrate into automation workflows.

For example, you can use the CLI to [register AI model versions](https://docs.collibra.com/ai-command-center/ai-producers-working-with-ai-models-and-discovering-data/collibra-cli-commands-for-ai-command-center/using-the-cli-to-register-your-ai-model-versions-in-collibra.md). For the available commands, go to [Collibra CLI commands](https://docs.collibra.com/ai-command-center/ai-producers-working-with-ai-models-and-discovering-data/collibra-cli-commands-for-ai-command-center.md).

## Requirements for organizations using SSO

If your organization uses SSO to sign in to Collibra, your authentication path depends on your SSO type:

* **SAML2:** Your standard SSO credentials cannot be used to log in to the CLI. You need a dedicated local account. Ask your Collibra administrator to create a dedicated user account directly in your Collibra environment (bypassing SSO/LDAP), assign it the relevant permissions, and send you an invitation to activate it. Use those local credentials to authenticate with the CLI.
* **OAuth:** The CLI supports OAuth 2.0 authentication directly. Your administrator must first register an OAuth application in your Collibra environment and provide you with a client ID and client secret. For complete setup information, go to [Configure an OAuth application for the CLI](#configure-an-oauth-application-for-the-cli).

### Configure an OAuth application for the CLI

Before CLI users can authenticate with OAuth 2.0, a Collibra administrator must register an OAuth application in your Collibra environment.

#### Prerequisites

* You have a [global role](https://docs.collibra.com/ai-command-center/terminology.md) with the **Product Rights** > **System administration** [global permission](https://docs.collibra.com/ai-command-center/terminology.md).

#### Steps

{% stepper %}
{% step %}
In <i class="fa-gear">:gear:</i> **Settings**, click **OAuth applications**.
{% endstep %}

{% step %}
Click **+ New Application**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The **Select your application type** dialog box appears.
{% endstep %}

{% step %}
In the **User Application** section, click **Register user application**.
{% endstep %}

{% step %}
Enter the required information.

<table><thead><tr><th width="152">Setting</th><th>Description</th></tr></thead><tbody><tr><td>Application name</td><td>A unique name to identify this OAuth application in your Collibra environment.</td></tr><tr><td>Redirect URI(s)</td><td><p>The URI(s) to which Collibra redirects the user after authentication. The CLI uses this URI to receive the authorization code.</p><p>By default, the CLI expects <code>http://localhost:4480/callback</code>. If you set the <code>COLLIBRA_REDIRECT_URI</code> environment variable to a different value, register that same value here instead.</p><p>Click <strong>+ Add URI</strong> to specify multiple redirect URIs.</p></td></tr><tr><td>Enable Proof Key for Code Exchange (PKCE)</td><td>When enabled, adds a security layer that protects the authorization code against interception attacks. It is switched on by default. Switch it off only if your OAuth client configuration requires it.</td></tr></tbody></table>
{% endstep %}

{% step %}
Click **Register**.\ <i class="fa-chevrons-right">:chevrons-right:</i> The client ID and client secret are generated and shown in a dialog box. Save them and provide them to the CLI user when carrying out the following procedure.
{% endstep %}
{% endstepper %}

## Install and set up the CLI

{% stepper %}
{% step %}
Download the CLI from [GitHub](https://github.com/collibra/collibra-cli-releases), and extract it.

1. Download the appropriate file for your operating system and processor:
   * Windows amd64, for most Windows units.
   * Windows arm64, for Surface and others.
   * Linux amd64, for most Linux units.
   * Linux arm64, for Linux units with ARM architecture.
   * darwin-macos all, for Mac.
2. Open your terminal or command prompt.
3. Navigate to the folder where you saved the CLI file you downloaded.\
   For example:
   * Windows: `cd C:\Users\YourUserName\Downloads`
   * Linux: `cd ~/Downloads`
   * Mac: `cd ~/Downloads`
4. Unarchive or unzip the binary file.\
   For example:
   * Windows: `tar -xf collibra-x.x.x-windows_xxx64.zip`
   * Linux: `tar -xf collibra-x.x.x-linux_xxx64.tar.gz`
   * Mac: `unzip collibra-x.x.x-darwin-macos_all.zip`
5. Run the binary file without any arguments to confirm it's working.

   * Windows: `.\collibra`
   * Linux: `./collibra`
   * Mac: `./collibra`

   <i class="fa-chevrons-right">:chevrons-right:</i> A help message is shown.
   {% endstep %}

{% step %}
Set the environment variables.

{% stepper %}
{% step %}
Open your terminal or command prompt.
{% endstep %}

{% step %}
Choose your authentication method and run the corresponding commands for your operating system.\
Replace the placeholder information with your own. If you use a proxy, include the variable `https_proxy`.

**Basic Auth**

| Windows CMD        | <p><code>SET COLLIBRA\_URL=https\://\<YourCollibraEnvironment>.collibra.com</code></p><p><code>SET COLLIBRA\_USERNAME=\<YourUsername></code></p><p><code>SET COLLIBRA\_PASSWORD=\<YourPassword></code></p>                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Windows Powershell | <p><code>$env:COLLIBRA\_URL="https\://\<YourCollibraEnvironment>.collibra.com"</code></p><p><code>$env:COLLIBRA\_USERNAME="\<YourUsername>"</code></p><p><code>$env:COLLIBRA\_PASSWORD="\<YourPassword>"</code></p>       |
| Mac and Linux      | <p><code>export COLLIBRA\_URL='https\://\<YourCollibraEnvironment>.collibra.com'</code></p><p><code>export COLLIBRA\_USERNAME='\<YourUsername>'</code></p><p><code>export COLLIBRA\_PASSWORD='\<YourPassword>'</code></p> |

**OAuth 2.0**

| Windows CMD        | <p><code>SET COLLIBRA\_URL=https\://\<YourCollibraEnvironment>.collibra.com</code></p><p><code>SET COLLIBRA\_CLIENT\_ID=\<YourClientID></code></p><p><code>SET COLLIBRA\_CLIENT\_SECRET=\<YourClientSecret></code></p>                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Windows Powershell | <p><code>$env:COLLIBRA\_URL="https\://\<YourCollibraEnvironment>.collibra.com"</code></p><p><code>$env:COLLIBRA\_CLIENT\_ID="\<YourClientID>"</code></p><p><code>$env:COLLIBRA\_CLIENT\_SECRET="\<YourClientSecret>"</code></p>       |
| Mac and Linux      | <p><code>export COLLIBRA\_URL='https\://\<YourCollibraEnvironment>.collibra.com'</code></p><p><code>export COLLIBRA\_CLIENT\_ID='\<YourClientID>'</code></p><p><code>export COLLIBRA\_CLIENT\_SECRET='\<YourClientSecret>'</code></p> |

{% hint style="info" %}
Optional. Defaults to `http://localhost:4480/callback`. If set, this value must exactly match a Redirect URI registered for the OAuth application in Settings.
{% endhint %}
{% endstep %}
{% endstepper %}

{% hint style="success" %}
Setting the environment variables as described here is temporary and only lasts for the duration of your current terminal session. To make them permanent, add the relevant lines to a configuration file such as `~/.bashrc`, `~/.zshrc`, or `~/.bash_profile`, save the file, and then restart your terminal.
{% endhint %}
{% endstep %}

{% step %}
OAuth 2.0 only: Run the following command to authenticate:

* Windows: `.\collibra login`
* Mac and Linux: `./collibra login`

<i class="fa-chevrons-right">:chevrons-right:</i> Your browser opens. Sign in to your Collibra environment to complete authentication. Your token is stored securely and refreshed automatically for all subsequent CLI commands.

{% hint style="info" %}

* Your token is stored securely: using the OS credential store on Mac and Linux, and DPAPI on Windows.
* Your token is valid for up to one hour of activity. After one hour of inactivity, run `collibra login` again to re-authenticate.
  {% endhint %}
  {% endstep %}

{% step %}
Run the following command to confirm that the CLI setup was successful:

* Windows: `.\collibra info`
* Mac and Linux: `./collibra info`
  {% endstep %}
  {% endstepper %}

## What's next

* [Collibra CLI commands](https://docs.collibra.com/ai-command-center/ai-producers-working-with-ai-models-and-discovering-data/collibra-cli-commands-for-ai-command-center.md)
* [Register an MCP server](https://docs.collibra.com/ai-command-center/ai-producers-working-with-ai-models-and-discovering-data/about-mcp-governance/register-an-mcp-server.md)
