Files
clinera-site/telegram-bot
Azreen Jamal b5d8665ac0 telegram-bot: rewrite to use Pi CLI with streaming JSON output
- Replaced direct Anthropic API with Pi CLI (uses platform auth, no API key needed)
- Model: claude-sonnet-4-6
- Streaming JSON mode with live progress updates in Telegram
- Per-user session files via Pi's --session/--continue
- Auto-recovery from corrupted sessions
- 5 min timeout, not-lazy system prompt
2026-03-06 02:58:58 +08:00
..

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_USERS in .env to restrict access (comma-separated Telegram user IDs)
  • Empty = open to anyone (not recommended for production)