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
Linux or macOS, any architecture. dtach is installed automatically
via the dtach-bin dependency —
no separate system package needed.
One-line install (recommended)
curl -fsSL https://raw.githubusercontent.com/dev-aly3n/aipager/main/install.sh | sh
This auto-detects uv / pipx / brew and uses whichever is already on
your system. If none is present, it bootstraps uv (Astral's Python tool
manager) and installs through it.
uv
uv tool install aipager # if uv is already installed
— or to install uv first:
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install aipager
uv bundles its own Python interpreter, so this works on any macOS / Linux version regardless of what system Python is doing.
pipx
pipx install aipager
Homebrew tap (macOS, Linuxbrew)
brew install dev-aly3n/tap/aipager
Pulls dtach from Homebrew's standard formula and installs aipager into
a Homebrew-managed Python venv.
Heads-up: if you're on macOS Tahoe (26.x), the brew path may fail at
pip installtime with apyexpat _XML_SetAllocTrackerActivationThresholdsymbol error — that's a known Homebrew Python bottle issue unrelated to aipager. Use the uv path instead (it's not affected) until Homebrew rebuilds the bottles for Tahoe.
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:
aipager session dev
This creates (or reattaches to) a dtach session named claude-dev
running Claude Code. The aipager daemon discovers it within seconds
and Telegram starts mirroring it. Re-run the same command to reattach
later; detach with Ctrl-\.
If the dtach session was killed (machine reboot, etc.) but you want
to pick up the Claude conversation from disk, add --resume:
aipager session dev --resume # resume the last claude conversation in this cwd
You can also pass --resume <session-id> (or any other claude flag)
through as trailing args:
aipager session dev -- --resume abc1234
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
AskUserQuestiondialogs 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aipager-0.3.8.tar.gz.
File metadata
- Download URL: aipager-0.3.8.tar.gz
- Upload date:
- Size: 84.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08fcd4265aab1db685bfc78bbe256d32a912d66d660a50049a5683fb076a4e50
|
|
| MD5 |
dd22b1275ccb53ada68a2f45b8634419
|
|
| BLAKE2b-256 |
e0b21ca15b1e0e234b0beb7bb3bb0ca6c982f823d56fb4fe27a5dd7bbc82a9ef
|
Provenance
The following attestation bundles were made for aipager-0.3.8.tar.gz:
Publisher:
publish.yml on dev-aly3n/aipager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aipager-0.3.8.tar.gz -
Subject digest:
08fcd4265aab1db685bfc78bbe256d32a912d66d660a50049a5683fb076a4e50 - Sigstore transparency entry: 1562861285
- Sigstore integration time:
-
Permalink:
dev-aly3n/aipager@02323b62897f1beee19a1af6692bc9c9154442a7 -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/dev-aly3n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02323b62897f1beee19a1af6692bc9c9154442a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aipager-0.3.8-py3-none-any.whl.
File metadata
- Download URL: aipager-0.3.8-py3-none-any.whl
- Upload date:
- Size: 77.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba54b7d78a367035593a31755199e3b26d78603692757f66403a84f54d64d8d
|
|
| MD5 |
0572c94306478d6136bb806367baaf09
|
|
| BLAKE2b-256 |
61159d10639b4b5a0c1c7504282220a784edcdbd04c70dfd2d131430f9a5b4a9
|
Provenance
The following attestation bundles were made for aipager-0.3.8-py3-none-any.whl:
Publisher:
publish.yml on dev-aly3n/aipager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aipager-0.3.8-py3-none-any.whl -
Subject digest:
4ba54b7d78a367035593a31755199e3b26d78603692757f66403a84f54d64d8d - Sigstore transparency entry: 1562861314
- Sigstore integration time:
-
Permalink:
dev-aly3n/aipager@02323b62897f1beee19a1af6692bc9c9154442a7 -
Branch / Tag:
refs/tags/v0.3.8 - Owner: https://github.com/dev-aly3n
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02323b62897f1beee19a1af6692bc9c9154442a7 -
Trigger Event:
push
-
Statement type: