ccfa969261
- SECURITY: cwd=/tmp, strip ANTHROPIC_API_KEY from Pi env - FIX: recursive retry now has max retries counter - FIX: await processMessage, proper error handling - FIX: ESM imports only (no require) - FIX: full stderr drain, check SSH exit codes - UX: single progress message edited in-place (no spam) - UX: HTML formatting for commands output - UX: session warning at 80KB, auto-clear at 100KB - UX: block concurrent tasks per user - SMART: /health command - check pi-worker status - SMART: /asana command - list open tasks - SMART: /status uses edit-in-place - SMART: /ssh shows exit code - CLEAN: removed dead deps reference
CR Management Telegram Bot
AI-powered server management bot via Telegram (@cr_management_smart_bot).
Features
- Two-way chat — talk to Claude, it understands your infra
- Command runner — execute SSH commands on your server
/status— quick server health check/ssh <cmd>— run a command directly/clear— reset conversation history
Run locally
cd telegram-bot
source ../.env
bun run index.ts
Deploy to server
# Copy bot to server
rsync -avz telegram-bot/ root@159.195.60.33:/opt/telegram-bot/
scp .env root@159.195.60.33:/opt/telegram-bot/.env
# On server: install bun, then
cd /opt/telegram-bot && bun install && bun run index.ts
Security
- Set
TELEGRAM_ALLOWED_USERSin.envto restrict access (comma-separated Telegram user IDs) - Empty = open to anyone (not recommended for production)