This is an OpenCode Telegram Bot project — a Python-based Telegram client for OpenCode CLI.
- src/opencode_telegram_bot/api/ — OpenCode HTTP API client and server process manager
- src/opencode_telegram_bot/bot/ — Telegram bot command handlers and message routing
- src/opencode_telegram_bot/core/ — Configuration, settings, and session state management
- src/opencode_telegram_bot/utils/ — i18n, voice transcription (STT/TTS), task scheduler
- src/opencode_telegram_bot/web/ — Flask-based monitoring web GUI
- src/opencode_telegram_bot/locales/ — Translation files for multiple languages
python-telegram-bot— Telegram Bot APIhttpx— Async HTTP client for OpenCode APIpydantic-settings— Environment-based configurationapscheduler— Scheduled task managementflask— Web monitoring GUIopenai— Whisper-compatible STT/TTS client
# Start the bot
opencode-telegram
# Run configuration wizard
opencode-telegram config
# Development
pip install -e ".[dev]"
ruff check src/
mypy src/
pytest tests/ -v
# Docker
docker compose up -dThe bot communicates with OpenCode's HTTP API at http://localhost:4096 by default. Key endpoints:
GET /health— Server health checkGET/POST /api/projects— Project managementGET/POST /api/sessions— Session CRUDGET/POST /api/models— Model managementPOST /api/sessions/{id}/message— Send promptsGET /api/sessions/{id}/events— SSE event stream for live responses