Skip to main content

Telegram remote-control daemon for Claude Code CLI sessions running in dtach

Project description

aipager

Telegram remote-control for Claude Code CLI sessions. Run Claude inside a detached terminal (dtach), drive it from your phone — read responses, send prompts, approve permission requests, switch sessions — without an SSH session staying open.

Install

Requires Python 3.10+ (Linux / macOS).

One-line install (auto-detects pipx / uv / brew)

curl -fsSL https://raw.githubusercontent.com/dev-aly3n/aipager/main/install.sh | sh

pipx

pipx install aipager

— or uv tool install aipager, or pip install aipager into a venv. All variants work the same. dtach is installed automatically via the dtach-bin dependency — no separate system package needed. Linux ARM and macOS Apple Silicon are supported via pre-built wheels.

Homebrew (macOS, Linuxbrew)

brew install dev-aly3n/tap/aipager

This pulls dtach from Homebrew's standard formula (works on both Intel and Apple Silicon Macs) and installs aipager into a Homebrew-managed Python venv.

Configure

aipager config

Interactive wizard — asks for your Telegram bot token (from @BotFather) and chat ID, validates them, then patches ~/.claude/settings.json to wire the necessary hooks automatically. You never edit any file by hand.

Run

aipager start

The daemon stays in the foreground. Launch a Claude session in another terminal:

claude-dtach dev

The daemon discovers the session within seconds and Telegram starts mirroring it.

Run as a service (survives logout)

aipager service install

On Linux this writes a systemd-user unit at ~/.config/systemd/user/aipager.service and starts it. On macOS it writes a launchd plist at ~/Library/LaunchAgents/com.aipager.daemon.plist and bootstraps it. Subcommands: start, stop, status, logs, uninstall.

What it does

  • Mirrors Claude Code session state to Telegram: busy/idle, tool calls, context %, cost, line counts
  • Lets you reply to messages to inject prompts back into the session
  • Surfaces permission prompts and AskUserQuestion dialogs as Telegram inline keyboards
  • Notifies on context warnings, compaction, session end, and stalls
  • Supports multiple concurrent sessions with one bot
  • Optional read-only observer bots

Developing locally

git clone <repo-url> aipager && cd aipager
python3 -m venv .venv && source .venv/bin/activate
pip install -e '.[dev]'
pytest -q

When iterating on code changes you'll generally want to also install dtach-bin from a local checkout — or pip install dtach-bin — so the runtime can find dtach on PATH.

Release process is in CONTRIBUTING.md.

License

MIT — see LICENSE.

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

aipager-0.3.0.tar.gz (56.8 kB view details)

Uploaded Source

Built Distribution

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

aipager-0.3.0-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file aipager-0.3.0.tar.gz.

File metadata

  • Download URL: aipager-0.3.0.tar.gz
  • Upload date:
  • Size: 56.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aipager-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ae3160e058dfb8c7a28e7df886bcd33ece80eba8c92e0574a8acd743de560c9b
MD5 0d859f2253c2a6679fb315c698a4d2e2
BLAKE2b-256 6b6f0e327f6943742f0e57cc982a4727ccf43ae90d897a3a18b504b98f835603

See more details on using hashes here.

Provenance

The following attestation bundles were made for aipager-0.3.0.tar.gz:

Publisher: publish.yml on dev-aly3n/aipager

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

File details

Details for the file aipager-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aipager-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aipager-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81898318c45b4765c21f88c518e830eef61c860d3ed63597b6856f759a8b46f0
MD5 e912219cba62315c3d85e22fd24f1e44
BLAKE2b-256 dd65dafbf878977fe4865277fc0052814ceea49f0c7f9198ca90cf91448b31ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for aipager-0.3.0-py3-none-any.whl:

Publisher: publish.yml on dev-aly3n/aipager

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