Qwen coder via CLI is done with free tiers since 15.04.2026 Check out new version - CliClaw , more flexible, with long-term memory and cron-jobs
Personal AI assistant in Telegram, powered by Qwen Code.
Free: 1000 requests/day, no subscriptions.
- Chat with Qwen Code AI through Telegram
- Session management (create, switch, close)
- Voice messages (via Groq Whisper API, optional)
- HTML formatting for code blocks and structured responses
- Auto-start via systemd
- Ubuntu/Debian VPS
- Telegram bot token from @BotFather
- Your Chat ID from @userinfobot
curl -fsSL https://raw.githubusercontent.com/a-prs/QwenClaw/main/install.sh -o /tmp/install.sh && sudo bash /tmp/install.shThe installer will:
- Install Node.js, Python, Qwen Code CLI
- Ask for your Telegram bot token and chat ID
- (Optional) Ask for Groq API key for voice messages
- Authorize Qwen Code
- Set up and start the bot
Get a free API key at console.groq.com/keys and enter it during install,
or add later to /opt/qwenbot/.env:
GROQ_API_KEY=gsk_your_key_here
Then restart: systemctl restart qwenbot
Just send a message to your bot in Telegram.
Commands:
/menu— control panel/new— start new session/sessions— list sessions/status— system status
Inline buttons for switching sessions, closing, and navigation.
cd /opt/qwenbot && git pull && systemctl restart qwenbotsystemctl status qwenbot # check status
systemctl restart qwenbot # restart
journalctl -u qwenbot -f # view logsEdit /opt/qwenbot/.env:
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
yes | Bot token from @BotFather |
TELEGRAM_CHAT_ID |
yes | Your Telegram user ID |
GROQ_API_KEY |
no | For voice messages |
QWEN_MAX_TURNS |
no | Max AI iterations (default: 15) |
QWEN_TIMEOUT |
no | Timeout in seconds (default: 600) |
GitHub: https://github.com/a-prs/QwenClaw
/opt/qwenbot/
bot/
main.py — Telegram bot (aiogram 3.x)
qwen_runner.py — Qwen Code CLI subprocess runner
voice.py — Groq Whisper API for voice
formatting.py — Markdown to Telegram HTML
config.py — .env loader
db.py — SQLite sessions & history
workspace/ — Qwen Code working directory
data/ — SQLite database
.env — configuration
- Single-user: only your Chat ID can interact
- Runs as dedicated
qwenbotsystem user (not root) - systemd sandbox: ProtectSystem, ProtectHome, NoNewPrivileges
MIT