Open Source • MIT License

Your AI Terminal
Inside Telegram

Bridge Telegram with Claude Code and Codex. Execute commands, analyze images, transcribe voice, and expose AI tools via MCP—all from your favorite messenger or remote agents.

2 AI Engines
3 MCP Tools
5+ Input Types
Possibilities
telecode — zsh
$ pip install telecode
Successfully installed telecode-0.1.4
$ telecode
# Starting Telecode server...
Connected to Telegram
Webhook configured
Claude engine ready
Listening on port 8000

Control Everything from Chat

engine

View or switch between AI engines. Choose Claude Code or Codex on the fly.

/engine claude
claude

Quick switch to Claude Code engine. Your preferred AI assistant.

/claude
codex

Quick switch to Codex engine. Alternative AI for code execution.

/codex
cli <cmd>

Execute any shell command on your server remotely. Full terminal access.

/cli git status
tts_on

Enable text-to-speech responses via Fish Audio API.

/tts_on
tts_off

Disable audio responses. Return to text-only mode.

/tts_off

Powerful Features Built In

🤖

Dual AI Engines

Switch between Claude Code and Codex instantly. Each chat can use a different engine based on your needs.

💬

Persistent Sessions

Conversations are preserved across messages with intelligent session management and thread-safe locking.

🖼️

Vision Processing

Send screenshots, diagrams, or photos for AI analysis. Perfect for debugging visual issues.

🎤

Voice Transcription

Record voice notes that are automatically transcribed via Whisper and sent to the AI engine.

🔊

Text-to-Speech

Get audio responses using Fish Audio API for completely hands-free interaction.

Real-time Webhooks

Efficient message processing via Telegram webhooks with automatic ngrok tunnel support.

🔒

Access Control

Whitelist users by Telegram ID or username. Keep your bot secure and private.

🛠️

Developer Friendly

Verbose logging, auto-reload, and comprehensive configuration. Built for developers.

📡

MCP Server

Expose AI tools via Model Context Protocol. Enable remote agent access to your local Claude Code and Codex engines.

📱
Telegram Bot API
🌐
ngrok / Custom Tunnel
FastAPI Server
Claude Code
AI Engine
Codex
AI Engine

How It Works

Telecode creates a secure bridge between Telegram and your local AI engines. Messages flow through a webhook architecture for real-time processing.

  1. Send any message type to your Telegram bot
  2. Telegram delivers it to your webhook endpoint
  3. FastAPI routes to the selected AI engine
  4. Response is sent back to your chat instantly

Up and Running in Minutes

1

Install from PyPI

pip install telecode
2

Create a Bot with @BotFather

Message @BotFather on Telegram, send /newbot, and follow the prompts to get your token.

3

Start the Server

telecode

The CLI will prompt for your bot token and auto-configure everything including ngrok tunnel.

4

Start Chatting!

Find your bot on Telegram and send any message. Use /engine to switch between Claude and Codex.