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.2.5.tar.gz (43.0 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.2.5-py3-none-any.whl (44.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rclaude-0.2.5.tar.gz
Algorithm Hash digest
SHA256 5692b86a42cf3baa9aaecce723b9806d89e3c27ea0e24bd1e70fea7e17800ec8
MD5 2b2caee80ccf6b309d1511c4d026af61
BLAKE2b-256 cc15e92bf48abca56027c3fbc46bb2efa02358944caf2d6e8b976eb6d851a593

See more details on using hashes here.

Provenance

The following attestation bundles were made for rclaude-0.2.5.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.2.5-py3-none-any.whl.

File metadata

  • Download URL: rclaude-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 44.4 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.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b74e3d8c0f2da8d1969583f4510fc1465c2fb9fb1f96e7d60c50c672e333fad0
MD5 e731cf224f8189bdf02a97ac58aec2bb
BLAKE2b-256 4e9aeaf5cf56d7cf212c528a202426059a092d2e32e9a0bd4b87c41f97b131a3

See more details on using hashes here.

Provenance

The following attestation bundles were made for rclaude-0.2.5-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