Bridge your VS Code with Telegram - control your IDE from anywhere! Work with AI assistants, monitor tasks, and stay connected to your development environment through Telegram.
- Telegram Bot Integration: Connect your VS Code instance to a Telegram bot
- AI Assistant Integration: Works with any VS Code Language Model (Claude, GPT, Gemini, etc.)
- Bidirectional Communication: Send and receive messages between Telegram and VS Code
- Extension API: Other extensions can send notifications via Telegram
- Conversation History: Maintains context across messages (last 10 exchanges)
- Secure: Whitelist specific chat IDs for security
- Persistent State: Active chat survives VS Code restarts
- Auto-start: Optional automatic bot startup with VS Code
- Open Telegram and search for @BotFather
- Send
/newbotand follow the instructions - Copy the bot token you receive
- Open VS Code Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run
TeleCode: Configure Bot Token - Paste your bot token
- Run
TeleCode: Start Botcommand - Open your bot on Telegram
- Send
/startto get your chat ID - Add your chat ID to VS Code settings:
- Open Settings (
Cmd+,orCtrl+,) - Search for
telecode.allowedChatIds - Add your chat ID to the array (e.g.,
[123456789])
- Open Settings (
/start: Get your chat ID and welcome message/clear: Clear conversation history
Simply send any message to your bot! If AI integration is enabled, you'll get automatic responses from your configured Language Model.
TeleCode: Send Message: Send a message to all configured chat IDsTeleCode: Start Bot: Start the Telegram botTeleCode: Stop Bot: Stop the Telegram botTeleCode: Clear Conversation History: Clear all conversation historiesTeleCode: Test Send: Test sending a message to active chatTeleCode: Send to Active Chat: Programmatically send message (for extensions)
All settings are available under telecode in VS Code settings:
botToken: Your Telegram Bot API tokenallowedChatIds: Array of allowed chat IDs (for security)autoStart: Automatically start bot on VS Code startupenableAIIntegration: Enable/disable automatic AI responses via Language Model API
The extension maintains conversation history for each chat, allowing your AI assistant to understand context across multiple messages. History is limited to the last 10 exchanges (20 messages) to balance context and token usage.
Other VS Code extensions can integrate with TeleCode:
// Get TeleCode API
const telecodeExt = vscode.extensions.getExtension('your-publisher.telecode');
const telecode = telecodeExt?.exports;
// Send message to active Telegram chat
if (telecode?.isInTelegramContext()) {
await telecode.sendToActiveTelegramChat('Hello from my extension!');
}
// Or use command
await vscode.commands.executeCommand('telecode.sendToActiveChat', 'My message');Long AI responses are automatically split into multiple Telegram messages to respect Telegram's 4096 character limit.
- Only whitelisted chat IDs can interact with your bot
- API keys are stored securely in VS Code settings
- Unauthorized access attempts are logged and rejected
- Check if the bot is running:
TeleCode: Start Bot - Verify your bot token is correct
- Ensure your chat ID is in the allowed list
- Check Output channel: View → Output → Select "TeleCode"
- Check that
enableAIIntegrationis enabled in settings - Ensure you have a Language Model available in VS Code (Claude Code, GitHub Copilot, etc.)
- Check the Output channel for error messages
# Install dependencies
npm install
# Compile
npm run compile
# Watch mode
npm run watchMIT