# Setup and Installation with Telerik CLI

The Telerik command-line interface (CLI) is a .NET global tool that automates common Telerik development tasks from the command line. Use the Telerik CLI to configure the Telerik NuGet package source, create new projects from Telerik templates, and update Telerik UI for WPF packages without opening Visual Studio.

The Telerik CLI requires the .NET Software Development Kit (SDK), version 6.0 or later, and a valid Telerik account with an active Subscription or Trial license.

## Command Reference

The following table lists all Telerik CLI commands with their purpose and usage.

| Command                                 | Description                                                                            | Usage                                                                                                                                |
| --------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `dotnet tool install -g Telerik.CLI`    | Installs the Telerik CLI as a .NET global tool.                                        | Run once to install the CLI on your machine.                                                                                         |
| `dotnet tool update -g Telerik.CLI`     | Updates the Telerik CLI to the latest version.                                         | Run periodically to get the latest features and fixes.                                                                               |
| `telerik setup wpf`                     | Runs the full Telerik UI for WPF developer-machine setup in one command.               | Run to authenticate, configure the Telerik NuGet feed, download your license key, and register the Telerik MCP server configuration. |
| `telerik nuget config`                  | Configures the Telerik NuGet server to your package sources.                           | Run to set up the `https://nuget.telerik.com/v3/index.json` feed in your NuGet configuration.                                        |
| `telerik license get-key`               | Downloads your Telerik license key and saves it as `telerik-license.txt`.              | Run to download your license key file.                                                                                               |
| `telerik mcp config`                    | Installs and configures the Telerik MCP Server for your IDE.                           | Run to set up AI coding assistance in Visual Studio, VS Code, or Cursor.                                                             |
| `telerik login`                         | Authenticates with your Telerik account. Use `--no-browser` for manual authentication. | Run to store credentials for subsequent commands.                                                                                    |
| `telerik whoami`                        | Displays the currently logged-in Telerik user account email.                           | Run to verify your authentication state.                                                                                             |
| `telerik logout`                        | Logs out from the Telerik CLI.                                                         | Run to log out the credentials from your Telerik account.                                                                            |
| `telerik migrate analyze --product wpf` | Scans a WPF project for Telerik API breaking changes between two versions.             | Run before upgrading to see which of your usages need to change.                                                                     |

## How to Install the Telerik CLI

The [Telerik CLI NuGet package](https://www.nuget.org/packages/Telerik.CLI) is hosted on `nuget.org`.

To install the Telerik CLI .NET tool globally on your machine, run the following command in your preferred command shell:

```powershell
dotnet tool install -g Telerik.CLI
```

The `dotnet tool install` command provides a few ways for you to install .NET tools on your machine.

* To install the Telerik CLI globally, use the `-g` option.
* To install the Telerik CLI in a custom location, use the `--tool-path` option.
* To install the Telerik CLI in the current folder only, omit the `-g` and `--tool-path` options.

### Verify Telerik CLI Installation

To verify the installation:

```powershell
dotnet tool list -g
```

The installation is verified when the list includes `telerik.cli` with its installed version and the `telerik` command.

### Update Telerik CLI

To update to the latest version:

```powershell
dotnet tool update -g Telerik.CLI
```

> note The Telerik CLI requires .NET SDK 6.0 or later. Download the .NET SDK from <a href="https://dotnet.microsoft.com/download" target="_blank">the official .NET SDK download page</a>.

## Set Up Telerik Environment

To prepare your development machine for Telerik UI for WPF in one step, run the `setup` command in a terminal:

```powershell
telerik setup wpf
```

The `setup` command runs the following steps in sequence to prepare your environment for Telerik UI for WPF:

1. [`telerik login`](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli#log-in-to-your-telerik-account) to authenticate with your Telerik account.
2. [`telerik nuget config`](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli#set-up-telerik-nuget-feed) to add the Telerik NuGet package source.
3. [`telerik license get-key`](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli#get-license-key) to download and store your license key.
4. [`telerik mcp config`](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli#install-mcp-server) to register the Telerik MCP server configuration for the detected IDEs.

When the CLI is running in an interactive terminal, `telerik setup` prompts you through each stage. To use the command in an automated environment, pass `--no-interactive`.

When the setup completes successfully, the Telerik CLI displays the following confirmation message:

```text
Telerik UI for WPF setup complete! Your environment is configured and ready.
```

### Common `telerik setup` Options

Use the following options to customize the setup flow:

* `--scope user|project` to choose whether the Telerik NuGet source is stored in the user-level or project-level `NuGet.Config` file.
* `--nuget-path <path>` to specify the path to the `NuGet.Config` file or project directory. This option is required when `--scope project` is used.
* `--force` to overwrite an existing Telerik NuGet source configuration without prompting.
* `--no-browser` to use manual authentication when browser-based sign-in is blocked.
* `--interactive` or `--no-interactive` to control whether the command prompts for each step.
* `--json` to return machine-readable output.

For example, to configure a project-local `NuGet.Config` file without prompts:

```powershell
telerik setup wpf --scope project --nuget-path . --force --no-interactive
```

## Log In to Your Telerik Account

Most Telerik CLI commands are related to your Telerik identity. It's recommended to log in first, so that all the other commands work without the need for additional authentication:

```powershell
telerik login
```

The `login` command opens `https://identity.telerik.com` in a browser window where you need to provide your Telerik account credentials. The browser performs a few redirects to complete the login.

If this browser integration fails due to security or network restrictions, you can authenticate manually by using the `--no-browser` option.

### Using `--no-browser` (Manual Authentication)

If automatic browser-based authentication is blocked (for example, by corporate network policies, restricted browsers, or headless CI environments), use the `--no-browser` switch to perform a manual login flow:

```powershell
telerik login --no-browser
```

When you run `telerik login --no-browser` the CLI will:

1. Print a short URL and a one-time code in the terminal.
2. Instruct you to open the URL on any device or browser with network access (for example, your desktop browser or a browser on another machine).
3. Ask you to enter the one-time code and sign in to your Telerik account in the browser.

After successful authentication, the browser will display a confirmation message and you can return to the CLI. The CLI will detect the completed sign-in and store the session token locally.

The Telerik CLI stores a session token in `%AppData%\Telerik`. The session token is valid for one month.

### Check Login State

To see which Telerik user is logged in the CLI, use the `whoami` command:

```powershell
telerik whoami
```

The CLI will output your Telerik user account email.

### Log Out from Your Telerik Account

To log out from the Telerik CLI, use the `logout` command.

```powershell
telerik logout
```

## Get License Key

To download or update your [Telerik UI for WPF license key file](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key), use the `license get-key` command:

```powershell
telerik license get-key
```

The `license get-key` command downloads your up-to-date Telerik license key and creates a `telerik-license.txt` file in your operating system user's folder.

## Install MCP Server

To install the Telerik MCP servers, use the `mcp config` command:

```powershell
telerik mcp config
```

By default, the command creates or updates the global `%USERPROFILE%\.mcp.json` configuration file for Visual Studio and registers all currently available Telerik MCP servers for Telerik products.

### Install WPF MCP Server

You can also fine-tune the process with the following options:

* Specify which Telerik products you are interested in, for example, just `wpf`.
* `--ide` specifies your preferred IDE. The supported values are `visualstudio`, `vscode`, `cursor`, and `all`.

For example, run the following command to configure only the WPF MCP server for Visual Studio:

```powershell
telerik mcp config wpf --ide visualstudio
```

This command installs and configures only the Telerik WPF MCP server and targets only Visual Studio by creating or updating the `.mcp.json` file with the WPF MCP entry.

### JSON Output for Scripts and CI

Use `--json` to return machine-readable output:

```powershell
telerik mcp config wpf --ide visualstudio --json
```

Example output:

```json
{
  "exitCode": 0,
  "message": "MCP servers registered successfully.",
  "data": {
    "registeredIdes": [
      "Visual Studio"
    ],
    "registered": [
      {
        "ide": "Visual Studio",
        "configPath": "C:\\Users\\username\\.mcp.json"
      }
    ]
  },
  "success": true
}
```

## Create Telerik WPF App

To create a [new WPF app that includes Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-extensions/extensions-project-creation) with the help of the [Telerik UI for WPF project templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates), use the `create` command:

```powershell
telerik create wpf
```

Use the `--interactive` option to be prompted for each project setting, including the project name, target .NET version, theme, template or Xaml/NoXaml approach.

The `create` command automatically [creates a new project using Telerik UI for WPF Project Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-extensions/extensions-project-creation). It also installs the **Telerik.WPF.Templates** NuGet package automatically.

### Project Templates

The [Telerik.WPF.Templates NuGet package](https://www.nuget.org/packages/Telerik.WPF.Templates) is available at [NuGet.org](https://www.nuget.org/) and provides the standard [Visual Studio project templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates) with a pre-configured Telerik UI for WPF library. By default, the Telerik.WPF.Templates NuGet package is installed during the execution of the Telerik.CLI `setup` command.

To install the templates separately, use the `dotnet new install` command:

```powershell
dotnet new install Telerik.WPF.Templates
```

The package installs the following project templates:

1. WPF Desktop Blank App (C#)
2. WPF Desktop Blank App (VB)
3. WPF Desktop Calendar App (C#)
4. WPF Desktop Calendar App (VB)
5. WPF Desktop Excel-Inspired App (C#)
6. WPF Desktop Excel-Inspired App (VB)
7. WPF Desktop Mail App (C#)
8. WPF Desktop Mail App (VB)
9. WPF Desktop Outlook-Inspired App (C#)
10. WPF Desktop Outlook-Inspired App (VB)
11. WPF Desktop Word-Inspired App (C#)
12. WPF Desktop Word-Inspired App (VB)

## Set Up Telerik NuGet Feed

To [configure the Telerik NuGet server as a package source](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/package-source-setup), use the `nuget config` command:

```powershell
telerik nuget config
```

By default, the `nuget config` command updates your [global `NuGet.Config` file](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior). The newly added Telerik NuGet feed name is `TelerikNuGetV3`. The command generates a new API key that you can delete and revoke from the [API Keys page in your Telerik account](https://www.telerik.com/account/downloads/api-keys).

> note Telerik NuGet API keys expire in two years.

You can use the `nuget config` command with the following options:

* `--scope project` and `--path` that points to the folder that contains the `NuGet.Config` file to modify. The default `--scope` value is `user`.
* `--api-key` to provide an existing Telerik NuGet API key inline, otherwise the CLI generates a new one.
* `--force` to overwrite any existing Telerik credentials in the `NuGet.Config` file.

For example, run the following command to update the project-level configuration in the current folder and overwrite existing Telerik credentials:

```powershell
telerik nuget config --scope project --path . --force
```

## Analyze Breaking Changes When Upgrading

To scan a Telerik UI for WPF project for API breaking changes before upgrading to a newer version, use the `migrate analyze` command. Replace `./MyWpfApp.csproj` with the path to your project file:

```powershell
telerik migrate analyze --product wpf --project ./MyWpfApp.csproj
```

The command reports every affected file, the exact line and column, and guidance on how to update the code. For more usage examples and output formats, see [Detecting Breaking Changes with the Telerik CLI migrate Command](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli-migrate-analyzer).

## Help

To get help about the tool or a specific command in the Telerik CLI, use the `-h` option:

```powershell
telerik -h

telerik setup -h

telerik nuget -h

telerik nuget config -h
```

## Uninstall Telerik CLI

To uninstall the Telerik CLI:

```powershell
dotnet tool uninstall -g Telerik.CLI
```

## Prerequisites

The following table lists the requirements to run the Telerik CLI.

| Requirement      | Minimum version          | Notes                                          |
| ---------------- | ------------------------ | ---------------------------------------------- |
| .NET SDK         | 6.0                      | Required to install and run .NET global tools. |
| Operating system | Windows, macOS, or Linux | Any OS supported by the .NET SDK.              |
| Telerik account  | N/A                      | Active Subscription or Trial license required. |

## See Also

* [Detecting Breaking Changes with the Telerik CLI migrate Command](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli-migrate-analyzer)
* [Set up the Telerik NuGet Package Source](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/package-source-setup)
* [Continue with the First Steps for Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Restore Telerik NuGet Packages in Your CI Workflow](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-keys)
