> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/en-us/cherry-studio/preview/code-cli.md).

# Coding Partner

\[Coding Companion] is used to install, configure, and launch common programming command-line tools. Cherry Studio recognizes its own managed installations and also detects CLIs already available in the system login environment; system tools are still maintained by the original package manager.

<figure><img src="/files/1e9e797906049848314f6a54d455b6ae6ae3ac93" alt="编码搭档页面中的安装状态、版本检查和 Code CLI 提供方"><figcaption><p>First confirm that the tool is installed and the version is available, then configure the model connection and project directory.</p></figcaption></figure>

## What the page can do

* Check whether the tool is installed and whether updates are available;
* Install or update Cherry Studio managed copies of tools;
* Detect tools already in the system PATH;
* Choose a provider and model for CLIs that need model services;
* Keep the native login flow for CLIs that sign in with their own accounts;
* Choose the working directory and the terminal detected by the system, then start.

The page currently includes tools such as Claude Code, OpenAI Codex, Gemini CLI, OpenCode, Qwen Code, Kimi Code, Qoder CLI, and GitHub Copilot CLI. The items actually visible will change with product updates; refer to the list on the page.

## Usage flow

{% stepper %}
{% step %}

### 1. Open \[Coding Companion] in the left navigation

Select the tool you need and first check whether its status is Not Installed, Managed by Cherry Studio, or From System.
{% endstep %}

{% step %}

### 2. Complete installation or sign in

If it is not installed, click \[Install]. For CLIs whose own tool provides account login, follow the page prompts to complete native login; you do not need to select a provider from Cherry Studio.
{% endstep %}

{% step %}

### 3. Configure model connection

For tools that require Cherry Studio model services, choose a compatible provider and model. The page filters by the interface type required by the CLI; incompatible providers will not be listed.
{% endstep %}

{% step %}

### 4. Choose directory and terminal

The working directory determines where the CLI starts. The terminal can only be selected from the system-detected list; custom terminal executable paths are no longer provided.
{% endstep %}

{% step %}

### 5. Start and verify

Click \[Start] and run a read-only check in the terminal. After confirming the account, model, and directory are correct, perform file modifications or commands.
{% endstep %}
{% endstepper %}

## Claude Code model modes

When configuring Claude Code, \[Model] offers two modes:

* \[General]: all requests use the same model, making setup simple;
* \[Detailed]: set Fable, Opus, Sonnet, Haiku, and Subagent separately in \[Model Role Mapping]. The \[Actual Request Model] in the table is the model each role ultimately uses; when needed, you can also enable \[1M] context for the corresponding role.

Use \[Detailed] only when you really need different models for roles such as background subtasks, summarization, or titles. Empty roles will follow the main model. After making changes, first use a small task to verify that each role can request successfully.

## Use case: start a coding tool in the project directory

| Choose              | Suggested starting point                                                          | Applicable scenario                        | Notes                                                                        |
| ------------------- | --------------------------------------------------------------------------------- | ------------------------------------------ | ---------------------------------------------------------------------------- |
| Installation source | If a system version already exists, use the system version first                  | The team already centrally manages the CLI | Updates and uninstallation are still handled by the original package manager |
| Model connection    | First choose a connection that has already been verified to work in Cherry Studio | CLIs that need model services              | Tools with built-in account login use the native login flow                  |
| Working directory   | Select only the current project directory                                         | Modify code, run checks                    | After starting, first confirm the terminal's path                            |
| First command       | Read-only view of project status                                                  | Verify the account, model, and directory   | Allow file writes only after confirming everything is correct                |

### Completion criteria

The page can identify the installation source; the terminal opens in the correct directory; the minimal read-only command succeeds; the account or model shown by the tool matches expectations.

## Be clear about the installation source

| Sources               | What Cherry Studio will do                               | How you should maintain it                                      |
| --------------------- | -------------------------------------------------------- | --------------------------------------------------------------- |
| Cherry Studio managed | Install, update, and uninstall the managed copy          | Manage it in \[Coding Companion] or \[Environment Dependencies] |
| System PATH           | Detect and use directly, without overwriting             | Update or uninstall with the original package manager           |
| Built into the app    | Use directly; no system-level uninstallation is provided | Updated along with Cherry Studio                                |

{% hint style="warning" %}
After uninstalling the Cherry Studio managed copy, if an executable with the same name still exists in the system, the page will automatically fall back to the system version. When the version or behavior changes, first confirm which source is currently being used.
{% endhint %}

<details>

<summary>Why can't I find an already installed terminal or CLI?</summary>

Cherry Studio detects tools from the login environment and standard locations. Make sure the command can run in the login terminal, then restart the app to refresh the environment. Portable or non-standard paths currently need to be launched manually from that terminal.

</details>


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/en-us/cherry-studio/preview/code-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
