- 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
2.2 KiB
2.2 KiB
zCode CLI X - Quick Start Guide
⚡ 30-Second Setup
cd zcode-cli-x
npm install
node bin/zcode.js --bot
🔑 Get Your Telegram Bot Token
- Open @BotFather on Telegram
- Send
/newbot - Choose a name and username
- Copy the token
🆔 Get Your Telegram User ID
- Open @userinfobot on Telegram
- Send
/start - Copy your user ID
⚙️ Configure .env
Edit .env in the project root:
ZAI_API_KEY=***
TELEGRAM_BOT_TOKEN=***
TELEGRAM_ALLOWED_USERS=your_user_id
🚀 Run the Bot
# Option 1: Direct run
node bin/zcode.js --bot
# Option 2: Using startup script
./start.sh
# Option 3: As systemd service
sudo systemctl start zcode
sudo systemctl enable zcode
💬 Start Using
- Open Telegram
- Search for your bot
- Send
/start - Start chatting!
📚 Available Commands
/start- Start the bot/help- Show help/status- Check system status/agents- List available agents/skills- List available skills
🛠️ Tools
- Bash: Execute shell commands
- FileEdit: Edit files
- WebSearch: Search the web
- Git: Git operations
🧠 Agents
- Code Reviewer: Review code
- System Architect: Design systems
- DevOps Engineer: Deploy and manage
📝 Example Interactions
You: Create a simple Node.js API with Express
Bot: ✅ I'll create a Node.js API with Express...
You: Review this code
Bot: 📋 Code review complete...
You: Fix the bug in app.js
Bot: 🔧 Bug fixed in app.js...
🐛 Troubleshooting
Bot not responding
- Check logs:
tail -f logs/zcode.log - Verify Telegram token in .env
- Check bot is enabled:
grep TELEGRAM_BOT_TOKEN .env
API errors
- Verify Z.AI API key is correct
- Check GLM_BASE_URL is set
- Test API connection:
curl https://api.z.ai/api/coding/paas/v4/models
Bot not reachable
- Set ZCODE_WEBHOOK_URL to your public URL
- Use ngrok for local development:
ngrok http 3000
📖 Next Steps
- Read full README.md
- Explore skills and agents
- Customize tools and configuration
- Integrate with your projects
Need help? Check logs: tail -f logs/zcode.log