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).

pipx (recommended)

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. To survive logout, use screen, tmux, or a systemd-user unit (template at scripts/aipager.service.example — full aipager service install automation lands in v0.4).

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.2.1.tar.gz (52.4 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.2.1-py3-none-any.whl (56.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aipager-0.2.1.tar.gz
Algorithm Hash digest
SHA256 74f7fb616aea291e4fe9da8d6c16f3e2f78a81ed9d5fcd89cc87b47a643e0a0e
MD5 abf4883434413b588ee39d4d6c3b5c80
BLAKE2b-256 3742462707a306439b0cd5113fb43721dd80cadcd2b665c753b4804ffca0d73e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aipager-0.2.1.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.2.1-py3-none-any.whl.

File metadata

  • Download URL: aipager-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 56.6 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6dcc181f25cdd37b20c57d3fa8c037a19f775716f86a4d5f218b18f76bcdb694
MD5 6600850ec1aa08bd088e7d0be80ffb41
BLAKE2b-256 62e0b9a82c555e33cb85acad51c8cb8b73f9515ed2219180570a589e5e0b0149

See more details on using hashes here.

Provenance

The following attestation bundles were made for aipager-0.2.1-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