Open Source

Claude Code in Your Pocket

Control Claude Code CLI directly from Telegram. AI-powered coding assistance, anywhere, anytime.

Why Claude Code Telegram Bot?

Powerful features for developers on the go

📱

Remote Access

Control Claude Code CLI from your phone or any device with Telegram. Code from anywhere.

💬

Session Management

Create, list, switch between, and close multiple Claude Code sessions with ease.

🎤

Voice Messages

Send voice messages that get transcribed via OpenAI Whisper and sent to Claude.

📁

File Uploads

Upload documents, code files, and images directly to Claude for analysis.

👥

Group Chat Support

Add the bot to group chats for team collaboration with @mention support.

🔄

Real-time Progress

Get notified when Claude is thinking, executing tools, or waiting for input.

Before You Start

Make sure you have these ready

📦

Node.js 18+

JavaScript runtime required to run the bot. Download here

🤖

Claude Code CLI

Anthropic's coding assistant. Must be installed and logged in. Installation guide

📱

Telegram Account

You'll create a bot and need your user ID. Both are free and explained below.

Step-by-Step Setup

Follow these steps to get your bot running

1

Create Your Telegram Bot

Open Telegram and search for @BotFather (the official bot for creating bots).

Send these messages to @BotFather
1. Send: /newbot 2. Enter a name for your bot (e.g., "My Claude Bot") 3. Enter a username ending in "bot" (e.g., "my_claude_code_bot") 4. Copy the token BotFather gives you

✅ Your token looks like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz

2

Get Your Telegram User ID

Your user ID tells the bot who's allowed to use it. Search for @userinfobot on Telegram.

Message @userinfobot
1. Send any message to @userinfobot 2. It replies with your ID (a number like 123456789) 3. Save this number for the next step

💡 You can add multiple user IDs separated by commas to allow friends/teammates to use the bot.

3

Install the Bot

Open your terminal (Command Prompt on Windows, Terminal on Mac/Linux) and run:

Terminal
npm install -g @a5c-ai/claude-code-telegram-bot
4

Create Configuration File

Create a file named .env in the folder where you'll run the bot. Add your token and user ID:

.env file
# Paste your bot token from Step 1 TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNOpqrsTUVwxyz # Your user ID from Step 2 (add more IDs with commas) ALLOWED_USER_IDS=123456789 # Folder where Claude will work (optional) DEFAULT_WORKING_DIR=/path/to/your/projects

⚠️ Replace the example values with your actual token and user ID!

5

Start the Bot

Run this command in the same folder where you created the .env file:

Terminal
claude-code-telegram-bot

🎉 Open Telegram, find your bot by its username, and send /start to begin!

Security Considerations

Important information about running the bot safely

⚠️ Important Security Notice

This bot runs with --dangerously-skip-permissions enabled. Claude will automatically read, write, delete files, and run commands based on your prompts. Only run in sandboxed or disposable environments.

🔐

Whitelist Security

Only authorized Telegram user IDs can interact with the bot.

🛡️

Environment Isolation

Child processes are spawned with sanitized environment variables.

📏

Rate Limiting

Built-in rate limiting and message size limits to prevent abuse.

🚫

Path Protection

File operations restricted to session working directory.

Ready to Code Anywhere?

Join developers who've brought Claude Code to their fingertips