> 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/using-the-cli-to-register-your-ai-model-versions-in-collibra.md). Agents can also search and read this documentation through its [MCP server](https://docs.collibra.com/~gitbook/mcp).

# Using the CLI to register your AI model versions in Collibra

Use the Collibra CLI to register AI model versions directly from your terminal. For all CLI commands for AI Command Center, 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).

**AI framework and library detection**

* The CLI scans your local Python projects, including all subdirectories, to identify AI models. It automatically detects common AI frameworks (for example TensorFlow, PyTorch, and scikit-learn) and libraries (for example pandas and numpy).

**Automated manifest management**

* A `collibra.yaml` manifest file is automatically created the first time you successfully complete the registration process. It is updated during each subsequent registration to ensure your local project remains synchronized with Collibra. The manifest serves as a persistent record of which AI models have been registered, storing metadata such as AI use case IDs and base model associations, to prevent redundant registrations in future scans.

**On-demand help**

* The CLI has a `--help` flag to retrieve built-in reference documentation. Run `./collibra --help` to view a list of all available commands and flags.

**Streamlined registration flow**

* You initiate the entire governance workflow with a single command. This process scans your source code for AI model patterns and loads existing YAML manifest files to filter out any models that have already been registered or rejected. The CLI then guides you through the model version registration process, where you can also register new AI Use Cases and Base Models or link your versions to existing assets.

## Requirements and permissions

* You have installed and set up the CLI.
* You have a [global role](https://docs.collibra.com/ai-command-center/terminology.md) with the **Product Rights** > **AI Governance** [global permission](https://docs.collibra.com/ai-command-center/terminology.md).
* You have a resource role that has the following resource permissions on the target domain for any new assets you create during the process:

  * **Asset** > **Add**
  * **Asset** > **Remove**
  * **Asset** > **Attribute** > **Add**

  <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><ul><li>For any AI Use Case assets you create during the process, you need to assign one of these resource roles on the specified target domain, which has to be of the type Business Asset Domain. AI Command Center comes with an out-of-the-box "AI Use Cases" domain for this purpose.</li><li>For any AI Base Model assets you create during the process, you need to assign one of these resource roles on the specified target domain, which has to be of the type Technology Asset Domain. AI Command Center comes with an out-of-the-box "AI Models and Agents" domain for this purpose.</li></ul></div>

## Register an AI model version to your Collibra environment

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

{% step %}
The Collibra CLI operates relative to your current working directory. Therefore, run the following command to navigate to the root of your Python project: `cd /path/to/your/ml-project`
{% endstep %}

{% step %}
Run the command: `collibra ai-gov register`\ <i class="fa-chevrons-right">:chevrons-right:</i> The CLI guides you through registering AI model versions and linking them to a new or existing (in Collibra) AI base model and AI use case.
{% endstep %}
{% endstepper %}

### Let's go through the registration process

In addition to registering your AI model versions in Collibra, the process enables you to register an AI use case and an AI base model, or link to an existing AI base model. Let's go through the typical process.

#### Step 1: Detecting AI model versions

When you run the command: `collibra ai-gov register`, the CLI scans the current or specified directory and all subdirectories for AI frameworks and libraries, and loads the `collibra.yaml` manifest file if one exists. A manifest file is automatically created the first time you successfully complete the registration process. It is updated during each subsequent registration.

<img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-66d9d289a98b19ca53ef069bbd0dd82ebd0e0f15%2Fcli-scanning.png?alt=media" alt="" width="25%">

* If no new AI models are detected, you can run `collibra ai-gov register --rescan` to scan for any previously rejected models.
* If AI model versions are detected, but they already exist in the manifest (meaning no new models), the process terminates.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-18075737d60c1117aca7d7544a6edfcc66932e4a%2Fcli-no-new-models.png?alt=media" alt="" width="50%">
* If new AI model versions are detected, the CLI attempts to retrieve linked AI use case information from the manifest.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-17f75b6f7e065a009d1becaf3847a2165f5fa34b%2Fcli-models-found.png?alt=media" alt="" width="25%">

#### Step 2: Fetching an AI use case

* If an AI Use Case asset ID already exists in the manifest, the CLI fetches the details directly via API.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-e77f8d95a637a8653624fff81d3188ea3e7f487e%2Fcli-asset-auto-detect.png?alt=media" alt="" width="50%">

  This only occurs if the manifest already contains an existing AI use case. An API call is executed to fetch the AI Use Case asset (and related AI Base Model asset) by ID, from the manifest.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-381087e09ba1b3c2fbf6c085a6945e2019ad4108%2Fcli-base-model.png?alt=media" alt="" width="50%">
* If an AI Use Case asset ID does not already exists in the manifest, you can search for an AI Use Case asset in Collibra or choose to create a new one. The following example image shows the search.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-b09443bd52abb75f73e5c4cde7a188fca89c2d4b%2Fcli-search-for-aiuc.png?alt=media" alt="" width="50%">

  If you chose to create a new AI Use Case asset, you need to select a domain for the asset.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-64ed60f9c077661f45cddc1b70502a1517d1867e%2Fcli-select-domain.png?alt=media" alt="" width="50%">

  If the list of domains cannot be fetched, you can select the default domain:

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-2e715471d5d905b7ae3ddce59d590cde042e1605%2Fcli-no-domains.png?alt=media" alt="" width="50%">

  After selecting a domain, the CLI shows a confirmation status like the following example.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-8d0247eda94dcd71c3a8c348b3ef36b45a1937ed%2Fcli-domain-selected.png?alt=media" alt="" width="50%">

#### Step 3: Fetching an AI base model

* Search for an AI Base Model asset in Collibra.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-bc89db05fd3aca5c5d022fd76ace38b023fe9d12%2Fcli-search-base-model.png?alt=media" alt="" width="50%">

  Select one from a pre-populated list of AI Base Model assets.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-afd25cc5fae01d644dd640b7a42d57d681d9fbfb%2Fcli-select-base-model.png?alt=media" alt="" width="50%">
* Or, if none of the found AI Base Model assets are what you need, you can continue searching.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-616a441f568f1ff6bf96a05adf167cb5a5429fc2%2Fcli-no-good-base-models.png?alt=media" alt="" width="50%">

  If the search doesn't yield helpful results, you can create a new AI Base Model asset.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-cd31f533b711f98af93194369f17eac4e10ee533%2Fcli-create-base-model.png?alt=media" alt="" width="50%">

  The CLI confirms that a new AI Base Model asset will be created:

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-279abc5bd7ba5e26232adbb386ba14a8c3e2d58f%2Fcli-base-model-created.png?alt=media" alt="" width="50%">

  Select a domain for the new AI Base Model asset

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-04968ce054c5d56ab67076964fa2e1d3f55cf6fb%2Fcli-select-base-model-domain.png?alt=media" alt="" width="50%">

  If domains can't be found, choose the default domain.

  <img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-2893dc0f013a1fa7daf280136412f6f2b91a66bd%2Fcli-base-model-domain.png?alt=media" alt="" width="50%">

#### Step 4: Fetching an AI model version

Select one or more AI Model Version assets to link to your selected AI Base Model asset.

![](https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-a1546d7bf16c5dad4f7ae7069dea03da8c63b8ab%2Fcli-select-model-version.png?alt=media)

A final review screen shows the proposed registration.

![](https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-fa30aea272a41c665f725de8539704638af031a9%2Fcli-model-version-review.png?alt=media)

If you want to edit the names and descriptions of the new assets before finalizing the registration, arrow down and press **Enter** on the asset you want to edit.

![](https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-6d6bcc09a2d0b42bb2daf6649c496ccd6f9697cb%2Fcli-review-edit.png?alt=media)

#### Step 5: Finalize

When you enter `y` to confirm the registration, the CLI imports the assets to Collibra.

<img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-67e662f607c4e9582e406b0beb5a49fa8c9b0ba9%2Fcli-sync.png?alt=media" alt="" width="50%">

If this was a first-time registration, the CLI generates a new collibra.yaml manifest file. If it's not a first-time registration, the CLI updates the existing manifest file.

A successful registration summary is shown.

<img src="https://172513724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRUJ2Awbxzd1UAaQbb7Dc%2Fuploads%2Fgit-blob-d682f9bd3ae215e7a748a225e020a6cd4965d79e%2Fcli-success.png?alt=media" alt="" width="50%">
