Control Claude Code remotely from your phone via Telegram!
- Monitors your screen for Claude Code permission prompts (Yes/No dialogs)
- Sends them to Telegram so you can approve from your phone
- Auto-detects when Claude finishes a task and sends you a summary
- Lets you send commands and prompts to Claude remotely
git clone https://github.com/Mjons/claude_tg_coder.git
cd claude_tg_codercd claude_approver
pip install pillow pytesseract pyautogui mss requests pyperclip numpyOr use the requirements file:
pip install -r requirements.txtThis is needed for reading text from the screen.
- Download from: https://github.com/UB-Mannheim/tesseract/wiki
- Run the installer
- Important: Add to PATH during installation, or manually add
C:\Program Files\Tesseract-OCRto your system PATH
brew install tesseractsudo apt install tesseract-ocr- Open Telegram and message @BotFather
- Send
/newbot - Follow the prompts to name your bot
- Copy the API token it gives you (looks like
123456789:ABCdefGHIjklMNOpqrSTUvwxYZ)
- Message @userinfobot on Telegram
- It will reply with your user ID (a number like
211277292) - Copy this number
Edit claude_approver/watcher.py and replace these lines near the top:
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN_HERE" # Paste your bot token
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID_HERE" # Paste your chat IDThe bot needs to know where things are on your screen. Run these commands and drag to select each area:
# 1. Select where Yes/No prompts appear
python calibrate.py
# 2. Select the input box (where you type to Claude)
python calibrate.py input
# 3. Select the main output area
python calibrate.py context
# 4. Select the summary area (bottom of Claude's output)
python calibrate.py summary
# 5. Select the loader text area (shows "vibing...", "coding...", etc)
python calibrate.py loaderTips:
- A semi-transparent overlay appears - click and drag to select
- Press ESC to cancel
- If Claude Code is on a different monitor, edit
MONITOR_INDEXincalibrate.py(1 = primary, 2 = second monitor)
python watcher.pyYou should see:
Claude Approver started!
Monitoring region: {...}
Loader region: {...}
Auto-summary when loader gone for 12s
Waiting for Claude Code prompts...
Open Telegram and message your bot. Try these commands:
| Command | What it does |
|---|---|
/help |
Show all commands |
/summary |
Get current task summary |
/context |
See what Claude is doing |
/commit |
Tell Claude to commit changes |
/pause |
Mute "still working" notifications |
/library |
Browse saved prompts |
Or just type anything to send it to Claude!
- Permission Prompts: When Claude asks "Allow this command?", the bot sends it to Telegram with Yes/No buttons
- Auto-Summary: When Claude finishes (loader disappears for 12 seconds), you get a summary
- Heartbeats: Every 15 seconds while working, you get a fun "still coding..." message
- Remote Control: Type anything in Telegram to send it directly to Claude
Make sure Tesseract is installed and in your PATH. Try running tesseract --version in terminal.
- Re-run
python calibrate.pyand select the exact area where Yes/No options appear - Make sure Claude Code window is visible (not minimized)
Edit calibrate.py and change MONITOR_INDEX = 2 to match your monitor (1 = primary)
- Re-run
python calibrate.py loader - Select just the small area where status text appears ("vibing...", "coding...")
- Watch the console for
[LOADER] content=X% visible=True/False
To run in background on Windows:
pythonw watcher.pyOr use a tool like screen or tmux on Linux/Mac.
Open an issue on the repo or ping me!