aipager
Your Claude Code sessions in Telegram, next to your family, your friends and your team.
They run on your own computer. You follow them, answer them and steer them from wherever you are.
Website · Install · Docs · Security · Changelog
Read this in: Español · Русский · Português (Brasil) · 简体中文 · Français · Deutsch · 한국어 · العربية · Bahasa Indonesia · Українська · Italiano · Türkçe · فارسی · Tiếng Việt
You write in Telegram. aipager types it into Claude Code on your computer, and one card edits itself as the turn runs.
Why aipager
📟 One live card per turn
What Claude is doing right now: its tool calls, context, cost and changed lines, then the answer. The card edits itself, so the chat stays calm.
⚡ Talk to it mid-turn
Your message is typed into the session at once, even while Claude works, exactly like typing in the terminal. 👀 means sent, 👍 means Claude took it.
✅ Answer with a tap
Permission prompts and Claude's questions arrive with a button for each answer. A button left over from a finished task refuses instead of acting on the next one.
🛡️ Three permission modes
💬 Ask, 🤖 Auto (the default for new sessions) and 🔓 Full access, set per session and switched any time with /mode.
👥 Made for teams
Put the bot in a group. Every message runs with its sender's role, members can be kept to their own folder, and every tap is in the audit log.
🔒 Nothing in the middle
No aipager server, no account, no open port. Your bot token, your computer, your chats.
A quick tour
Questions come to you
When Claude asks you something or wants permission, the question lands in your chat with a button for each answer, and the pinned bar says what needs you. Your tap is typed into the session as if you were at the keyboard, and the terminal shows the same answer.
Three permission modes
Every session is in one of three modes, changed any time with /mode, even while Claude works.
| Mode |
What happens |
💬 Ask/mode ask |
Claude asks before each action. |
🤖 Auto, the default/mode auto |
Claude Code's own safety check runs the safe actions and stops the risky ones for you to decide. |
🔓 Full access/mode full |
Everything runs with no checks. For admins, and for you in your own private chat with the bot. |
Ask and Auto switch in place, with no restart. Going to or from Full access restarts the session and keeps the conversation. Questions from Claude still come to you in every mode.
Your team, in one group
Add the bot to a group and give each member a role: owner, admin, user or read_only. In the group the bot acts only on commands, replies to its messages and mentions (@aipagerbot fix the tests, /web run the tests), and each message runs with its sender's role: a tool the role may not use is refused before it runs. A user or read_only member works only inside their own root folder (~/aipager-users/<label> by default). Other people can also have their own private chat with the bot.
[!IMPORTANT]
Adding a member gives them the right to run code on your computer. Read the trust model before you share the bot.
To set it up, add the bot to the group as an admin (so it can pin the group's status bar), run aipager config again and pick Add a group scope. The wizard adds each member with a role, asks for the members' root folder and reloads the running daemon.
A dashboard inside Telegram
/app opens the Mini App: your sessions with Stop, End, Restart, Rename and the mode switch, a diff viewer for every Write and Edit, the settings and, for the owner, Report a problem. It is served by the daemon itself and is on by default, and every request is checked against Telegram's signature. If you are in more than one chat, a row of chat names at the top switches between them. Turn it off with aipager miniapp disable, or point it at your own URL (how).
Fifteen languages
- Speaks English, Español, Русский, Português (Brasil), 简体中文, Français, Deutsch, 한국어, العربية, Bahasa Indonesia, Українська, Italiano, Türkçe, فارسی and Tiếng Việt.
- Pick one with
/language, or let a private chat follow your Telegram app.
- Persian and Arabic read right to left, with their own digits.
- Only aipager's own words change. Your sessions do not: Claude answers in the language you write to it.
- This README and the docs are translated too.
And the small things
- Many sessions, one bot. A plain message goes to the session you last talked with; reply to one of a session's messages to talk to that one, or send
/x1 <message>.
- Nothing gets mixed up. A message sent while a prompt or a question is open waits until you answer, so it is never read as the answer.
- Photos, files and voice. Voice messages are turned into text on your computer, with the optional
voice extra.
- It tells you. Context warnings, compaction, a session that ended and one that went quiet.
- Sessions outlive everything. Claude runs inside
dtach, so it keeps working after you close the terminal, lose SSH or restart the daemon.
How it works
Claude Code runs in a real terminal, inside dtach, so nobody has to keep a window open. Each step fires a hook that sends one datagram to the aipager daemon over a local socket, and the daemon edits a message in your chat. Your answers travel back the same way: a verdict to the hook holding the call, or keystrokes into the session. The terminal stays the source of truth. More in the architecture.
Install
Linux or macOS, any architecture. You need Claude Code, logged in on this computer, and a Telegram bot: create one with @BotFather and press Start in it.
curl -fsSL https://aipager.run/install | sh # uv, pipx or Homebrew: whichever you have
aipager config # your bot token, your chat, Claude Code's hooks
aipager service install # keeps the daemon running after you log out
aipager session api # Claude Code in this folder, and in your chat
The installer uses uv if you have it, else pipx, else (on macOS) Homebrew, and installs uv when none is there. dtach comes with aipager (the dtach-bin package), so there is nothing else to install. aipager config is a wizard: it checks the bot token and your chat, then adds aipager's hooks to ~/.claude/settings.json for you. You never edit a file by hand.
Have Claude Code, or any agent with a shell? Create the bot, press Start in it, and save the bot token to a file your agent never has to read (paste the token, press Enter, then Ctrl-D):
mkdir -p ~/.config/aipager
rm -f ~/.config/aipager/bot-token
(umask 077 && cat > ~/.config/aipager/bot-token)
chmod 600 ~/.config/aipager/bot-token
Then give your agent this prompt:
Install aipager for me by following https://aipager.run/agent.md. My Telegram bot token is in ~/.config/aipager/bot-token and my Telegram user id is <your id>.
If you do not know your Telegram user id, say so instead; the agent can find it. The guide it follows, including how to hand over the token safely, is docs/install-with-an-agent.md. For scripts, aipager setup --token-file FILE --chat-id ID sets aipager up with no questions (the setup command).
Other ways to install
uv tool install aipager # uv: recommended on macOS, it brings its own Python
pipx install aipager # pipx
brew install dev-aly3n/tap/aipager # Homebrew, on macOS and Linuxbrew (see the note below)
nix profile install github:dev-aly3n/aipager # Nix: claude is not included (see below)
snap install aipager # Snap: strict confinement, claude inside, workspaces under ~/
Or run it in Docker, with Python, Node, claude and dtach inside.
The formula works when Homebrew's python@3.12 bottle and your Xcode Command Line Tools are in sync, but they drift apart from time to time. On macOS 26 the install fails with a pyexpat _XML_SetAllocTrackerActivationThreshold symbol error (upstream issue). Updating Xcode and the Command Line Tools usually fixes it, but uv tool install aipager avoids it altogether. The formula takes dtach from Homebrew and installs aipager into a Homebrew-managed Python environment.
Docker
A self-contained image with Python, Node, claude and dtach, good for a VPS, a NAS or a Raspberry Pi where you do not want a Python or Node toolchain on the host. Multi-arch (amd64, arm64).
# 1. Run the setup wizard once (interactive)
docker run --rm -it \
-v "$HOME/.claude:/home/aipager/.claude" \
-v aipager-config:/home/aipager/.config/aipager \
ghcr.io/dev-aly3n/aipager:latest config
# 2. Start the daemon (background, auto-restart)
docker run -d --restart=unless-stopped --name aipager \
-v "$HOME/.claude:/home/aipager/.claude" \
-v aipager-config:/home/aipager/.config/aipager \
-v "$PWD:/workspace" \
ghcr.io/dev-aly3n/aipager:latest
Mount the folders you want Claude to edit under /workspace. The ~/.claude mount carries your Claude credentials and conversation history: run claude on the host once to log in, or docker exec -it aipager claude to log in inside the container.
Tags: latest, 1.7, 1.7.1 (semver track + minor track).
Nix
nix run github:dev-aly3n/aipager -- --version
nix profile install github:dev-aly3n/aipager
Builds aipager from source against pinned nixpkgs. dtach comes from Nix; claude does not, so install it separately (nix profile install nixpkgs#nodejs && npm install -g @anthropic-ai/claude-code, or follow Anthropic's docs).
Add aipager as a flake input and take its package into environment.systemPackages:
{
inputs.aipager.url = "github:dev-aly3n/aipager";
outputs = { self, nixpkgs, aipager, ... }: {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
modules = [({ pkgs, ... }: {
environment.systemPackages = [
aipager.packages.${pkgs.system}.default
];
})];
};
};
}
aipager service install then sets up a systemd user unit.
Everyday use
In Telegram
| Send |
To |
/status |
See this chat's sessions, each with its state and buttons. |
/new x1 |
Start a session named x1. /new x1 fix the tests also sends its first message. |
/x1 |
Make x1 the session your messages go to. /x1 <message> sends a message straight to it. |
/stop |
Interrupt the running turn and drop what is queued. |
/mode |
Switch between Ask, Auto and Full access. |
/app |
Open the Mini App. |
/language |
Pick the language aipager speaks in this chat. |
/update |
Update aipager and Claude Code, then restart in place (admins). |
/help |
A short guide by task. |
Every command, button and setting is in docs/commands.md.
On the command line
aipager start # the daemon, in the foreground
aipager session dev # start a session named dev here, or attach to it
aipager session dev --continue # pick up the last Claude conversation in this folder
aipager session dev -- --resume abc1234 # any other claude flag goes through as it is
aipager doctor # check the install
To leave a session without stopping Claude, close the terminal or the tmux pane: the session keeps running, and the same command attaches to it again.
aipager service install keeps the daemon running in the background: a systemd user unit on Linux (~/.config/systemd/user/aipager.service) or a launchd agent on macOS (~/Library/LaunchAgents/com.aipager.daemon.plist). Either way the daemon runs in your home folder, where a new session starts unless you pick another folder. aipager service start, stop, status, logs and uninstall manage it.
Security
- No aipager server. The daemon talks to the Telegram Bot API with your own bot token. There is no aipager account and no aipager service.
- No open port. The daemon listens on loopback only. The Mini App goes out through a Cloudflare tunnel where every request must carry Telegram's signature, and
aipager miniapp disable turns it off.
- Every answer on the record. Each Allow, Deny and answer is appended to
~/.claude/aipager-audit.jsonl, with who tapped it in a group.
- Claude Code still decides. Your Claude Code settings say what needs asking. aipager relays the question and never elevates: no sudo, and everything runs as your user.
The full picture, including what protects your Claude credential, is in the security model.
FAQ
Claude's apps talk to Anthropic's hosted assistant. aipager connects you to a Claude Code session running on your own computer: your repository, your tools, your environment.
aipager sends to Telegram only what you see in your chats, with your own bot token; there is no aipager server in between. Claude Code itself talks to Anthropic as it always does.
A tiny terminal detacher. It keeps Claude Code alive after the terminal closes or SSH drops, so an answer you send an hour later still reaches a live session. It comes with aipager.