AI Coding Assistant that supports both Claude and Qwen (Alibaba Cloud) π
| Feature | Description |
|---|---|
| π€ Multi-LLM | Support Claude (Anthropic) and Qwen (Alibaba Cloud) |
| π οΈ 207 Commands | Ready-to-use commands for various tasks |
| π§ 184 Tools | File ops, search, git, MCP, and more |
| π Python | Easy to modify and extend |
| π¦ Rust (WIP) | Rust implementation for higher performance |
| π MCP Support | Integrate with MCP servers |
git clone https://github.com/Carlys17/claw-codes.git
cd claw-codes# Set API key
export QWEN_API_KEY="your-dashscope-api-key"
export QWEN_MODEL="qwen-max" # optional: qwen-turbo, qwen-plus, qwen-maxGet API Key at: Alibaba Cloud DashScope
export ANTHROPIC_API_KEY="your-anthropic-api-key"# View project summary
python -m src.main summary
# List available commands
python -m src.main commands --limit 20
# List available tools
python -m src.main tools --limit 20
# Run turn loop with AI
python -m src.main turn-loop "Explain this project structure" --max-turns 3# Check active provider
python -m src.main summary
# Choose provider explicitly
python -m src.main turn-loop "Hello" --provider qwen
python -m src.main turn-loop "Hello" --provider claude
# Bootstrap AI session
python -m src.main bootstrap "Create a simple REST API"
# Run tests
python -m unittest discover -s tests -v| Variable | Description | Default |
|---|---|---|
QWEN_API_KEY |
API key for Qwen/DashScope | - |
QWEN_BASE_URL |
Qwen API endpoint | Auto-detect |
QWEN_MODEL |
Qwen model to use | qwen-max |
QWEN_API_MODE |
API mode: dashscope, openai, anthropic |
Auto-detect |
ANTHROPIC_API_KEY |
API key for Claude | - |
ANTHROPIC_BASE_URL |
Claude API endpoint | https://api.anthropic.com |
claw-codes/
βββ src/ # Python source code
β βββ qwen_client.py # Qwen API client
β βββ query_engine.py # Multi-provider query engine
β βββ main.py # CLI entrypoint
β βββ models.py # Data structures
β βββ tools.py # Tool definitions
β βββ commands.py # Command handlers
β βββ runtime.py # Runtime logic
β βββ ...
βββ rust/ # Rust implementation (WIP)
β βββ crates/
β β βββ api/ # API client
β β βββ runtime/ # Core runtime
β β βββ rusty-claude-cli/ # CLI application
β βββ ...
βββ tests/ # Python tests
βββ QWEN_SETUP.md # Complete Qwen setup guide
βββ SECURITY.md # Security policy
βββ LICENSE # MIT License
βββ README.md
| Model | Context | Best For |
|---|---|---|
qwen-turbo |
8K | Fast tasks, prototyping |
qwen-plus |
32K | Balanced performance |
qwen-max |
32K | Complex reasoning, coding |
qwen-max-longcontext |
256K | Large documents |
| Model | Context | Best For |
|---|---|---|
claude-3-haiku |
200K | Fast, cheap tasks |
claude-3-sonnet |
200K | Balanced |
claude-3-opus |
200K | Complex tasks |
python -m src.main bootstrap "Create a Flask REST API for todo app"python -m src.main turn-loop "Review src/main.py and suggest improvements"python -m src.main turn-loop "Why is this test failing? Explain and provide fix"python -m src.main bootstrap "Refactor this function to be cleaner"python -m unittest discover -s tests -vpython -c "
from src.qwen_client import QwenClient, QwenRequest, QwenMessage
try:
client = QwenClient.from_env()
request = QwenRequest(messages=[QwenMessage(role='user', content='Hello')])
response = client.send_message(request)
print(f'Connected! Model: {response.model}')
print(f'Response: {response.content}')
except Exception as e:
print(f'Error: {e}')
"# β
DO: Use environment variables
export QWEN_API_KEY="your-key-here"
# β DON'T: Hardcode in source files
api_key = "sk-xxxxx" # NEVER DO THISThe following should NEVER be committed:
| File/Pattern | Reason |
|---|---|
.env |
Contains secrets |
*.key, *.pem |
Private keys |
credentials.json |
Authentication data |
.claude/settings.local.json |
Local settings |
See SECURITY.md for full security policy.
MIT License - see LICENSE for details.
- Original concept inspired by Claude Code by Anthropic
- Qwen integration by @Carlys17
- Built with help from oh-my-codex
Contributions welcome! Please:
- Fork the repo
- Create feature branch (
git checkout -b feature/AmazingFeature) - Commit changes (
git commit -m 'Add AmazingFeature') - Push to branch (
git push origin feature/AmazingFeature) - Open Pull Request
- No API keys or secrets in code
- Code follows project style
- Tests pass (
python -m unittest discover -s tests -v) - Documentation updated
- GitHub: @Carlys17
- Issues: GitHub Issues
- Security: Security Advisories
Star β this repo if you find it helpful!