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.1.3.tar.gz (33.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.1.3-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rclaude-0.1.3.tar.gz
  • Upload date:
  • Size: 33.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.1.3.tar.gz
Algorithm Hash digest
SHA256 97de780620768a2abcb8cdb6c269e98cae4cefa801bc72a198d830d0b364acca
MD5 61448b103d7fce54f04fc24f5c4d392e
BLAKE2b-256 b810823caf45ea1d5a67d53692b8efcacd6f2aecbee1588a964c6e64f45eb0b7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rclaude-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 34.0 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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a3a631fc518eafe63984a5b07d84bbe5c3e4e90d383860bf9db9bcfc4453095
MD5 225fd999eb16766305754c25016a3ec7
BLAKE2b-256 5d5994507aab3df3431aac1e13924f988e8ad9693a5e44dc09a0993c65b6f990

See more details on using hashes here.

Provenance

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