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
/mode Change permission mode
/model Change AI model
/cost Show usage costs
/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 via Telegram frontend, streams events back to terminal via SSE
  4. SDK continues the conversation via Telegram messages with interactive permissions
  5. Return with /cc emits event to terminal, shows resume command

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.4.2.tar.gz (45.4 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.4.2-py3-none-any.whl (50.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for rclaude-0.4.2.tar.gz
Algorithm Hash digest
SHA256 cd72614b10e7f6b6c84e1dfdf050ba9616044a5314711e4b326efedddbc5f18b
MD5 3a081c79e673b94f60a64bcb175c4e5e
BLAKE2b-256 110c78a520b5c92b1f80cd1d169310f1083d199b51b8a07fcc44cf8f6b57fbb0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: rclaude-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 50.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.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e870061e626c542371392d777e88b6bc8e19aad4d7505f98d0c5970399a4fc3c
MD5 a590eb8cd6777ebb1be460b29336f678
BLAKE2b-256 e70e7032a14637147adbc31c3d1c2ec3d2a54a4c65afeb5956e52582f7d2c3b1

See more details on using hashes here.

Provenance

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