> For the complete documentation index, see [llms.txt](https://docs.mobb.ai/mobb-user-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mobb.ai/mobb-user-docs/getting-started/mobb-cli/add-scm-token-mode.md).

# Add SCM Token Mode

## Overview

Mobb supports on-premise repositories as explained in the [system requirements](/mobb-user-docs/getting-started/system-requirements.md). However, to analyze an on-premise repository, the SCM token must be added to your Mobb account to grant Mobb access to read and write to your repository (To run analysis and commit fixes). This task can either be done on the Mobb UI as explained [here](https://docs.mobb.ai/mobb-user-docs/getting-started/mobb-cli/pages/ODIGrQgokzN0U2FfqmFL#id-2.-hosted-code-platforms-coming-soon), or via the Mobb CLI.

To add the SCM token via the CLI, you can use the `add-scm-token` mode. To learn more about what's required for this mode, you can run the following command:

```
npx mobbdev@latest add-scm-token --help
```

### Output

```
cli.mjs add-scm-token

Add your SCM (Github, Gitlab, Azure DevOps) token to Mobb to enable automated fixes.

Options:
  --scm-type       SCM type                                 [required] [choices: "GitHub", "GitLab", "Ado", "Bitbucket"]
  --url            URL of the repository (used in GitHub, GitLab, Ado, Bitbucket)                    [string] [required]
  --token          SCM API token                                                                     [string] [required]
  --organization   Organization name in SCM (used in Azure DevOps)                                              [string]
  --refresh-token  SCM refresh token (used in GitLab)                                                           [string]
  --api-key        Mobb authentication api-key                                                                  [string]
  --ci             Run in CI mode, prompts and browser will not be opened                     [boolean] [default: false]
  --help           Show help                                                                                   [boolean]
```

### Parameters:

**--scm-type**\
Description: SCM type \[required] \[choices: "GitHub", "GitLab", "Ado", "Bitbucket"]

**--url**\
Description: URL of the repository (used in GitHub, GitLab, Ado, Bitbucket) \[string] \[required]

**--token**\
Description: SCM API token \[string] \[required]

**--organization**\
Description: Organization name in SCM (used in Azure DevOps) \[string]

**--refresh-token**\
Description: SCM refresh token (used in GitLab) \[string]

**--api-key**\
Description: Mobb authentication api-key \[string]

**--help**\
Description: Show help \[boolean]


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://docs.mobb.ai/mobb-user-docs/getting-started/mobb-cli/add-scm-token-mode.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.
