Skip to main content

Remote control for Claude Code via Telegram

Project description

rclaude

PyPI

Remote control for Claude Code via Telegram. Seamlessly teleport your coding sessions between terminal and phone.

Features

  • Session Teleportation - Switch between terminal and Telegram mid-conversation with /tg
  • Interactive Permissions - Approve file edits and shell commands from your phone
  • Live Updates - See Claude's activity streamed to your terminal while on Telegram
  • On-Demand Server - Server starts automatically when needed, shuts down when idle
  • Hot Reload - Development mode with automatic restart on code changes

Requirements

  • Python 3.14+
  • Claude Code CLI installed
  • Telegram account

Installation

pip install rclaude

Or install from source:

git clone https://github.com/leobuskin/rclaude.git
cd rclaude
pip install -e .

Setup

Run the interactive setup wizard:

rclaude setup

The wizard will guide you through:

  1. Create a Telegram bot - Message @BotFather, send /newbot, and copy the token
  2. Link your account - Send /link <token> to your new bot
  3. Install the /tg hook - Adds the teleport command to Claude Code
  4. Auto-start (optional) - Configure server to start on login (macOS)

Usage

Start a session

rclaude

This launches Claude Code with teleportation support. Work normally in your terminal.

Teleport to Telegram

When you want to continue on your phone, type in Claude Code:

/tg

The session transfers to Telegram. Your terminal shows live updates of the conversation.

Return to terminal

In Telegram, send /cc to get the command for resuming in terminal. The session seamlessly continues where you left off.

Telegram commands

Command Description
/start Show help
/new Start fresh session
/cc Return to terminal
/status Show session info
/stop Interrupt current task
/cancel Cancel pending teleport

How It Works

Terminal                    Server                      Telegram
────────                    ──────                      ────────
rclaude ──────────────────────────────────────────────────────────
    │                          │                            │
    │  Claude Code running     │                            │
    │         │                │                            │
    │  user: /tg               │                            │
    │         │                │                            │
    │         └───── POST /teleport ─────► notify user      │
    │                          │                 │          │
    │  (shows live updates) ◄──┼── SSE stream    │          │
    │                          │                 ▼          │
    │                          │◄──────── user messages ────┤
    │                          │                            │
    │                          │  Claude Agent SDK          │
    │                          │         │                  │
    │                          │         ▼                  │
    │                          │──────► responses ─────────►│
    │                          │                            │
    │                          │◄──────── /cc ──────────────┤
    │                          │                            │
    │  resume ◄────────────────┤                            │
    │                          │                            │
  1. Wrapper (rclaude) spawns Claude Code and monitors for /tg
  2. Hook intercepts /tg, POSTs session info to local server
  3. Server notifies you on Telegram, streams updates back to terminal
  4. SDK continues the conversation via Telegram messages
  5. Return with /cc resumes the session in terminal

CLI Reference

rclaude              # Run Claude Code with teleport support
rclaude setup        # Interactive setup wizard
rclaude serve        # Start server manually (usually auto-started)
rclaude status       # Show configuration and server status
rclaude uninstall    # Remove configuration and hooks

Options

rclaude --reload     # Development mode with hot-reload
rclaude --verbose    # Enable debug logging
rclaude --version    # Show version

Configuration

Config is stored in ~/.config/rclaude/config.toml:

[telegram]
bot_token = "123456:ABC..."
user_id = 123456789
username = "you"

[server]
host = "127.0.0.1"
port = 7680

[claude]
hook_installed = true

Development

# Clone and install in dev mode
git clone https://github.com/leobuskin/rclaude.git
cd rclaude
python -m venv .venv
source .venv/bin/activate
pip install -e .

# Run with hot-reload
rclaude --reload

# Lint
ruff check rclaude/
ruff format rclaude/

# Type check
ty check rclaude/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rclaude-0.3.2.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rclaude-0.3.2-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

Details for the file rclaude-0.3.2.tar.gz.

File metadata

  • Download URL: rclaude-0.3.2.tar.gz
  • Upload date:
  • Size: 43.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rclaude-0.3.2.tar.gz
Algorithm Hash digest
SHA256 9adc0564d4b38be00e5df647575075973d80047cf41928e604ce0d547230ee3f
MD5 36ce0e780bda306f809bf35fcc1c688b
BLAKE2b-256 222c2e291d9955b9410979f0fa9d6e3cdcec9a786395a5e554cd16256184ea56

See more details on using hashes here.

Provenance

The following attestation bundles were made for rclaude-0.3.2.tar.gz:

Publisher: release.yml on leobuskin/rclaude

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rclaude-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: rclaude-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 44.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for rclaude-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a2e75a0ed2498f8cadee6daea082b574e6252a179fc9e7ff032f80b1f601909b
MD5 ff1648579cc745fef77e8e8a43f5698a
BLAKE2b-256 027355388b8ab0370cfb3283f99f25a491976f3dde593c58d6b6ad3a57fe3b70

See more details on using hashes here.

Provenance

The following attestation bundles were made for rclaude-0.3.2-py3-none-any.whl:

Publisher: release.yml on leobuskin/rclaude

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page