⚠️ This project is archived. A better approach has been found to accomplish the same goal. This repository is kept for reference purposes only and is no longer maintained.
One command to rule them all — get Qwen Code + Claude Code playing nice on your Linux box. We wire up the Claude Code router to Qwen's API (API key, compatible mode) so you can code without the setup headache.
This project is no longer maintained. The approach documented here has been superseded by a better solution. The code remains available for historical reference and learning purposes.
Clone → sudo ./install.sh → qwen-claude install → Done.
- One installer —
./install.shsets up theqwen-claudeCLI tool globally. - Ubuntu, Debian, Arch, Fedora — (and their derivatives). Your distro's probably covered.
- Dual Authentication — Choose between API Key (dashscope-intl.aliyuncs.com) or Bearer Token (portal.qwen.ai, recommended). See docs/AUTHENTICATION.md for details.
- Router config — Writes
~/.claude-code-router/config.jsonand your shell env soccrjust works. - Unified CLI — Manage everything with
qwen-claude. - Easy Refresh —
qwen-claude refreshhandles token updates and service restarts automatically. - Uninstaller —
qwen-claude uninstallnukes our config.
| Distro | How we do it |
|---|---|
| Ubuntu / *buntu-based | NodeSource for Node 20+, npm for Qwen/Claude/router |
| Debian | Same vibe as Ubuntu |
| Arch / Arch-based | AUR (yay/paru): qwen-code, claude-code, claude-code-router |
| Fedora | dnf + Node from Fedora repos |
- Bash
- Internet
sudo(or root) for packages- A GitHub account (for Qwen OAuth)
git clone https://github.com/cativo23/qwen-claude-setup.git
cd qwen-claude-setup
sudo ./install.sh
qwen-claude installWhat happens:
- Detects your OS and runs the right distro script.
- Installs Qwen Code, Claude Code, Claude Code Router (or tells you what to install).
- Credentials — Choose your authentication method (API Key or Bearer Token) and provide credentials.
- Config — Writes router config and appends to
~/.bashrcor~/.zshrc.
-
Reload your shell
source ~/.bashrc # or source ~/.zshrc
-
Start the router
ccr start # or ccr code for the full experience
Credentials live in ~/.claude-code-router/config.json. Router default port: 3456.
- Authentication options — API Key vs Bearer Token comparison
- Installation guide — Full walkthrough
- Troubleshooting — Token issues, permissions, router drama
- Example config — What the router config looks like
qwen-claude-setup/
├── install.sh # The one you run
├── common.sh # Shared logic
├── distros/
│ ├── ubuntu.sh
│ ├── debian.sh
│ ├── arch.sh
│ └── fedora.sh
├── scripts/
│ └── uninstall.sh # Nuke our config
├── docs/
│ ├── installation.md
│ └── troubleshooting.md
├── examples/
│ └── config.json.example
└── CHANGELOG.md
To remove everything we added (router config, env vars):
./scripts/uninstall.shWe don’t touch your system/AUR packages — uninstall qwen-code, claude-code, etc. with your package manager if you want them gone.
PRs and issues welcome. Check CONTRIBUTING.md for the deets.
MIT — LICENSE. Use it, fork it, vibe with it.