- start.sh: use dirname instead of hardcoded path - src/zcode.js: remove hardcoded chat_id fallback - src/utils/rtk.js: use 'rtk' from PATH instead of hardcoded binary path - src/telegram-bot.ts: use process.cwd() instead of hardcoded path - TELEGRAM_SETUP.md: replace token/chat_id with placeholders - QUICKSTART.md: sanitize all references - SERVICE_MAP.md: use relative paths instead of absolute
1.9 KiB
1.9 KiB
Telegram Bot Setup - zCode CLI X
✅ Status: RUNNING
Your zCode CLI X Telegram bot is now live and running 24/7!
📊 Current Configuration
- Bot Token: Configured via
.env(TELEGRAM_BOT_TOKEN) - Allowed Users: Configured via
.env(TELEGRAM_ALLOWED_USERS) - API: Z.AI GLM-5.1 (Coding Plan)
- Port: Configured via
ZCODE_PORT(default: 3001) - Service: systemd (auto-start on boot)
🚀 How to Use
Via Telegram
- Open Telegram
- Search for your bot
- Send
/startto initialize - Start chatting!
Check Status
# Check service status
sudo systemctl status zcode
# View logs
tail -f logs/zcode.log
# Restart service
sudo systemctl restart zcode
# Stop service
sudo systemctl stop zcode
🔗 Webhook Status
Webhook is configured and active. To receive real messages:
-
Get a public URL (e.g., use ngrok):
ngrok http 3001 -
Set the webhook URL:
curl -F "url=https://your-domain.com/telegram/webhook" \ "https://api.telegram.org/bot<YOUR_TOKEN>/setWebhook" -
Verify webhook:
curl "https://api.telegram.org/bot<YOUR_TOKEN>/getWebhookInfo"
🛠️ Available Commands
/start- Start the bot/help- Show help/status- Check system status/agents- List available agents/skills- List available skills
🎯 Features
✅ Z.AI Integration: GLM-5.1 model ✅ Tools: Bash, FileEdit, WebSearch, Git ✅ Agents: Code Reviewer, Architect, DevOps ✅ Skills: code_review, bug_fix, refactor, etc. ✅ 24/7 Uptime: systemd service ✅ Real-time: WebSocket support
📝 Next Steps
- Set bot name: Talk to @BotFather
- Enable webhook: Use ngrok for local dev
- Customize: Add more tools and skills
- Monitor: Check logs regularly
zCode CLI X is ready! Start chatting via Telegram! 🚀⚡