Qwen + Claude Code Router bootstrapper
Project description
This is looking like a high-quality production tool. Since this is now a public package on PyPI, I’ve updated the README.md to prioritize the standard installation method while keeping the technical details that make your project look professional.
🚀 Qwen-Claude Bridge
Qwen-Claude is a high-performance automation CLI that bridges the gap between Qwen’s authentication and the Claude Code Router (CCR). It automates the extraction of OAuth tokens and manages configuration synchronization, allowing you to use Qwen models within Claude Code seamlessly.
✨ Features
- 🔄 Automated Token Sync: Extracts the latest Qwen OAuth access token and injects it directly into your CCR configuration.
- 🛡️ Smart Schema Validation: Ensures your
config.jsonis always valid and correctly points to the Qwen portal. - ⚡ Dependency Guard: Automatically verifies that
qwen,ccr, andclaudeCLIs are installed and accessible in your PATH. - 🪟 Windows Optimized: Built-in support for Windows execution logic, handling
.ps1,.bat, and.cmdwrappers natively. - 🤖 Intelligent Fallback: Detects expired sessions, triggers an interactive login when needed, and resumes the workflow.
🛠️ Installation
Install the package directly from PyPI:
pip install qwen-claude
Required Global Tools
The bridge coordinates with the following Node.js-based tools. Ensure they are installed on your system:
| Tool | Purpose | Install Command |
|---|---|---|
| Qwen CLI | Auth Provider | npm install -g @qwen-code/qwen-code@latest |
| CCR | Router Engine | npm install -g @musistudio/claude-code-router |
| Claude | AI Interface | npm install -g @anthropic-ai/claude-code |
🚀 Usage
Launch the bridge using the qc command. This will validate your environment, refresh tokens if necessary, and start your Claude Code session:
qc
Checking Version
To check your current version of the bridge:
qc -v
# OR
qc --version
Workflow Overview
- Verify: Checks for the presence of required global binaries.
- Validate: Ensures
~/.claude-code-router/config.jsonmatches the standard schema. - Refresh: If the token expires in < 120 seconds, it triggers a refresh via the Qwen CLI.
- Inject: Updates the CCR configuration with the new
access_token. - Execute: Restarts the CCR service and enters the Claude Code environment.
⚙️ Configuration
The bridge initializes your router using a pre-defined schema optimized for Qwen 3 Coder:
{
"Providers": [
{
"name": "qwen",
"api_base_url": "https://portal.qwen.ai/v1/chat/completions",
"models": ["qwen3-coder-plus"]
}
],
"Router": {
"default": "qwen,qwen3-coder-plus",
"think": "qwen,qwen3-coder-plus"
}
}
📁 Project Structure
QWEN_CLAUDE
├── .github/
│ └── workflows/
│ └── publish.yml # CI/CD Pipeline
├── src/
│ └── qwen_claude/
│ ├── __init__.py # Version metadata
│ ├── cli.py # Automation logic
│ └── schema.json # Default CCR configuration
├── CODE_OF_CONDUCT.md # Community standards
├── CONTRIBUTING.md # Contribution guidelines
├── LICENSE # MIT License
├── pyproject.toml # Build & Entry points
└── README.md # Documentation
🤝 Contributing
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make to Qwen-Claude are greatly appreciated.
To maintain a high standard of code and community health, please follow these steps:
- Read the Guidelines: Before starting, please review our CONTRIBUTING.md for technical instructions and our CODE_OF_CONDUCT.md to understand our community standards.
- Fork & Clone: Fork the repository to your own GitHub account and clone it locally.
- Create a Branch: Dedicated to your fix or feature (
git checkout -b feature/AmazingFeature). - Develop & Test: Make your changes and ensure the logic remains robust.
- Commit & Push: Commit your changes with clear messages (
git commit -m 'Add some AmazingFeature') and push to your fork. - Open a Pull Request: Submit your PR against the
mainbranch. We will review it as soon as possible!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qwen_claude-0.1.3.tar.gz.
File metadata
- Download URL: qwen_claude-0.1.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
103080fd69fbb67aa573af56c50889063e1bd122850e34e63a0cecb1544a7b8f
|
|
| MD5 |
20cda5d0a31a30b5c1ee18401b5650e2
|
|
| BLAKE2b-256 |
68dab02f96b1eb87ccc41b25193e286ecf17f14b71ed28ed12737e1c6760f332
|
Provenance
The following attestation bundles were made for qwen_claude-0.1.3.tar.gz:
Publisher:
publish.yml on SaadKamran0804/qwen-claude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qwen_claude-0.1.3.tar.gz -
Subject digest:
103080fd69fbb67aa573af56c50889063e1bd122850e34e63a0cecb1544a7b8f - Sigstore transparency entry: 913441440
- Sigstore integration time:
-
Permalink:
SaadKamran0804/qwen-claude@6239e3d8130db9bfa15b533437a5a803b805f61d -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/SaadKamran0804
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6239e3d8130db9bfa15b533437a5a803b805f61d -
Trigger Event:
release
-
Statement type:
File details
Details for the file qwen_claude-0.1.3-py3-none-any.whl.
File metadata
- Download URL: qwen_claude-0.1.3-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
84d78d29d58daefa643553b80817458e039a2574305f64d48e9ff162c6fe2788
|
|
| MD5 |
71d948922495299e71d6d928109f7241
|
|
| BLAKE2b-256 |
b8f8a48b923cd029a0ca1cb355b83cb2b6a703827076a61b4edc0b8f0bbe2b43
|
Provenance
The following attestation bundles were made for qwen_claude-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on SaadKamran0804/qwen-claude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qwen_claude-0.1.3-py3-none-any.whl -
Subject digest:
84d78d29d58daefa643553b80817458e039a2574305f64d48e9ff162c6fe2788 - Sigstore transparency entry: 913441544
- Sigstore integration time:
-
Permalink:
SaadKamran0804/qwen-claude@6239e3d8130db9bfa15b533437a5a803b805f61d -
Branch / Tag:
refs/tags/0.1.3 - Owner: https://github.com/SaadKamran0804
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6239e3d8130db9bfa15b533437a5a803b805f61d -
Trigger Event:
release
-
Statement type: