> ## Documentation Index
> Fetch the complete documentation index at: https://doc.onetoken.one/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen Code

> Use any Onetoken-hosted LLM with Qwen Code.

## Quick setup

### 1. Install globally

Node.js **≥ 20**, then:

```shell theme={null} theme={null}
npm install -g @qwen-code/qwen-code
qwen --version
```

See the [official repo](https://github.com/QwenLM/qwen-code) for details.

### 2. Environment variables

Add your Onetoken key and base URL (create keys on the [Keys page](https://onetoken.one/token)).

In `~/.zshrc` (example):

```shell theme={null} theme={null}
export OPENAI_API_KEY="your_onetoken_key"
export OPENAI_BASE_URL="https://onetoken.one/v1"
export OPENAI_MODEL="your_model"
```

<Tip>
  On Mac, press `⌘ + ⇧ + .` in your home folder to show dotfiles, then edit `.zshrc` in TextEdit (or any editor).
</Tip>

### 3. Apply

Run `source ~/.zshrc`.

### 4. Run

```shell theme={null} theme={null}
qwen
```

After launch, run `/about` to confirm version and model:

<img src="https://mintcdn.com/onetoken-9a3c590a/Y02IerIYTPVRQQ-L/images/QwenCode/1.webp?fit=max&auto=format&n=Y02IerIYTPVRQQ-L&q=85&s=a04d88dfdbdfcf3927669c0acb0479ff" alt="about" width="1990" height="2034" data-path="public/cn/Qwen-code.png" data-path="images/QwenCode/1.webp" />

<Note>
  Some users report occasional stalls—consider a **limited quota** on your [key](https://onetoken.one/token) to cap spend.
</Note>

You’re ready to use Qwen Code normally.
