# Code Tools Usage Tutorial

The release of Cherry Studio v1.5.7 introduces the easy-to-use, powerful Code Agent feature, which can directly launch and manage multiple AI programming agents. This tutorial will guide you through the complete setup and launch process.

***

### Steps

#### 1. Upgrade Cherry Studio

First, please make sure your Cherry Studio has been upgraded to **v1.5.7** or later. You can go to [GitHub Releases](https://github.com/CherryHQ/cherry-studio/releases) or the official website to download the latest version.

#### 2. Enter the Code Tool interface

Top navigation mode: Click the “+” icon at the top of the interface to create a new blank tab

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-418f066aef26e03d31b30206c9cdfc3ecaa5d2c4%2Fimage%20(2)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-b42e875e93506534a3c5cebc72b95502a0595ad1%2Fimage%20(3).png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In left navigation mode, click the Code Tool button in the left navigation to enter this page
{% endhint %}

#### 3. Select a CLI tool

Choose a Code Agent tool to use based on your needs and the API Key you have. Currently supported options include:

* **Claude Code**
* **Gemini CLI**
* **Qwen Code**
* **OpenAI Codex**

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-ab7bc9ff839720c2777568a48d1ff71a2177741a%2Fimage%20(4).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 4. Select the model for agent invocation

In the model dropdown list, select a model compatible with the CLI tool you chose. *(For detailed model compatibility instructions, please refer to the “Important Notes” below)*

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-b8148d693337e9c06b403b3c46e7e15e0a03e72e%2Fimage%20(5).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 5. Specify the working directory

Click the “Select Directory” button to specify a working directory for the Agent. The Agent will have permission to access all files and subdirectories under this directory, making it easier for it to understand the project context, read files, and execute code.

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-26d4e51e4689e71727cbe6d938f9e74bb4c88f1a%2Fimage%20(6).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 6 Set environment variables

* **Automatic configuration**: Your selections in Step 6 (model) and Step 7 (working directory) will automatically generate the corresponding environment variables.
* **Custom addition**: If your Agent or project requires other specific environment variables (for example `PROXY_URL` and so on), you can add them here manually.

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-7f0ac5497f2acfd266c4212c67f065bb12d19427%2Fimage%20(7).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 7. Update options

* **Built-in executable files**: Cherry Studio has integrated the executable files for all the Code Agents above, so in most cases you can use them directly without needing to be online.
* **Automatic updates**: If you want the Agent to always stay up to date, you can check the **`Check for updates and install the latest version`** option. When checked, the program will check online and update the Agent tool every time it starts.

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-8d32add7b26fbce23a777eb82d2614061fb339fb%2Fimage%20(8).png?alt=media" alt=""><figcaption></figcaption></figure>

#### 8. Start the Agent

After all configurations are complete, click the **`Start`** button. Cherry Studio will automatically call the Terminal tool built into your system, load all environment variables into it, and then run the Code Agent you selected. You can now interact with the AI Agent in the terminal window that appears.

<figure><img src="https://1658303467-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0Ut5BptC3t8CtSU1UWpM%2Fuploads%2Fgit-blob-2a54f0893723d0dfca5a67c4c28c374d5d34a8a5%2Fimage%20(9).png?alt=media" alt=""><figcaption></figcaption></figure>

***

### Important Notes

1. **Model compatibility instructions**:
   * **Claude Code**: You need to choose a model that supports the Anthropic API Endpoint format. The officially supported models currently include:
     * Claude series models
     * DeepSeek V3.1 (official API platform)
     * Kimi K2 (official API platform)
     * Zhipu GLM 4.5 (official API platform)
     * **Note**: At present, many third-party service providers (such as One API, New API, etc.) mostly support only the OpenAI Chat Completions format for the DeepSeek, Kimi, and GLM API interfaces, and may not be directly compatible with Claude Code. You may need to wait for the providers to gradually adapt.
   * **Gemini CLI**: You need to choose a Gemini series model from Google.
   * **Qwen Code**: Models that support the OpenAI Chat Completions API format are supported; it is strongly recommended to use **`Qwen3 Coder`** series models for the best code generation results.
   * **OpenAI Codex**: Supports GPT series models (such as `gpt-4o`, `gpt-5` and so on).
2. **Dependency and environment conflicts**:
   * Cherry Studio has built-in an independent Node.js runtime environment, Code Agent executables, and environment variable configuration, designed to provide a clean out-of-the-box experience.
   * If you encounter dependency conflicts or strange errors when starting the Agent, you can consider temporarily**uninstalling or disabling related dependencies already installed on the system**(such as globally installed Node.js or a specific toolchain) to rule out conflicts.
3. **API Token usage warning**:
   * **Code Agent consumes API Tokens at a very high rate**. When handling complex tasks, the Agent may generate a large number of requests in order to think, plan, and generate code, causing Tokens to be consumed quickly.
   * Please be sure to follow your own API quota and budget,**act within your means**, and closely monitor Token usage to prevent budget overruns.

We hope this tutorial helps you quickly get started with Cherry Studio’s powerful Code Agent feature!
