Open source · MIT · self-hosted

Claude Code,
from your phone.

A self-hosted Telegram bot that drives the real claude binary on the Pro/Max plan you already pay for. No API key to manage, nothing metered per token.

$ curl -fsSL claudebot.ve.ke/install.sh | bash
macOS & Linux needs Claude Code logged in
C
claudebot
online · driving claude
ship the auth fix & run the tests
09:41
claudebotOn it — editing auth.py, running the suite…
Bash · pytest -q
claudebotDone. Fixed the token refresh race; 38 passed in 0.9s. Pushed to main.
/model opus
09:42
claudebotmodel set to opus · fresh session

under the hood:  claude -p --output-format stream-json  — the genuine binary, your login, streamed back live.

// what makes it different

Three things, true at once.

Other wrappers each give you some of these. claudebot is the intersection.
‹/›

The real binary

It shells out to the genuine claude you already use: the same harness, tools, and login. It's the real binary, not the Agent SDK or an API reimplementation.

∅$

Your plan, no API bill

Runs on your logged-in Pro/Max subscription. The OAuth token never leaves Claude Code — nothing metered, nothing to expense.

You own the UX

Your own bot process owns Telegram. Switch models, dial effort, send a photo or a PDF, stream replies. No redeploy, no config file — just another message.

// how it works

It owns the loop.

One persistent claude per chat, kept warm — driven over its headless stream-json protocol.
Telegramyour phone
claudebotyour bot process
claude -p--output-format stream-json
your machinereal tools · your login
Warm child per chat · --resume across restarts · replies stream back token-by-token · token stays inside Claude Code.
// the policy question

Is this allowed?

Yes — with one bright line.

Anthropic's “no third-party harness” rule is about where your subscription OAuth token is used: don't feed it to a client that isn't Claude Code — the Agent SDK, Cline, Cursor, raw API calls, an LLM gateway.

claudebot never touches the token. It pipes text into the genuine claude process and reads JSON back; the token stays inside Claude Code, exactly as designed. Anthropic documents claude -p on subscriptions, ships claude setup-token for scripts, and (from 2026-06-15) gives claude -p a dedicated subscription credit.

This is policy, not law — Anthropic can tighten it, and headless/channels are still evolving. Use your own judgement.

01
Single-user.

Gate it to your own Telegram ID. Don't let others prompt through your plan — that's account sharing.

02
Never extract the token.

Let the binary own its auth. No lifting creds to call the API yourself.

03
Don't hammer it 24/7.

Normal interactive-scale chat is fine. Pathological looping isn't.

// security

Treat it like a root shell.

Because it is one. The defaults are paranoid: one Telegram ID, one directory, fail-closed.
!

By default, Claude runs any tool, including Bash, without asking. Run claudebot only on a machine you trust, scoped to a working directory, gated to your own Telegram ID. The bot is the owner's remote shell, not a public service.

Fail-closed allowlist

Empty list = locked to nobody. DM-only handlers; group & channel traffic ignored.

Content-injection guard

A default preamble tells Claude to treat attached & fetched content as data, never instructions.

Secret hygiene

Bot token stripped from the child env; .env & state are chmod 600; chat errors are generic.

Bounded & single

Per-turn timeout so nothing wedges; one poller per host via an exclusive lock.

Smoke-gated updates

claudebot update runs the test suite before a new build goes live — and auto-rolls-back on failure.

Auditable & open

~1.5k lines of readable Python, MIT-licensed. Read every line that touches your machine.

// vs. the alternatives

How it compares.

Specific differences you can verify, not vague “better”.
ApproachReal binaryNo API keyYou own the UXAlways-alive
claudebot headless stream-json
Official Telegram plugin claude-plugins-official
fixed UX
claude-code-telegram RichardAtCT
via SDK
PTY / TUI scraping
brittle

The official plugin is genuinely great if you want zero-config and don't need custom UX. claudebot is for when you want to own the conversation loop.

// commands

Drive it from your phone.

Every Claude Code knob, one message away.
/model opus

Switch models mid-conversation.

/effort max

Crank thinking for a hard problem.

/mode acceptEdits

Tighten what runs without asking.

/cd ~/work/app

Switch projects on the fly.

📷 / 📄

Send a photo or document — Claude reads it.

/retry · /stop · /new · /status

Resend, abort, reset, inspect.

Tweaks are saved per-chat and survive restarts. Because claudebot owns Telegram, none of this needs a redeploy.

// install

Running in 30 seconds.

One command — after a two-minute checklist so nothing fails silently.

// before you start

  1. Claude Code logged in
    claude auth status → loggedIn: true. Pro / Max / Team / Enterprise.
  2. A bot token from @BotFather
  3. Your numeric ID from @userinfobot
// 1 — install
$ curl -fsSL claudebot.ve.ke/install.sh | bash
// 2 — the wizard asks you
claudebot setup
? Bot token 123456:AA…
? Allowed Telegram user ID 5538…
? Working directory ~/work
? Permission mode bypassPermissions
✓ Saved ~/.claudebot/.env
// 3 — verify & keep it always-on
zsh
$ claudebot doctor # checks auth + token + config
$ claudebot run # foreground
$ claudebot service install # launchd / systemd, always-on

Linux: run loginctl enable-linger $USER once so it survives logout.

// faq

Single-user, by design.

Can I add my team? +

No — and that's deliberate. Letting others prompt through your subscription is account sharing (a ban risk), and it hands them a shell on your machine. One subscription, one trusted machine, one Telegram ID. A real multi-user product needs per-user credentials, quotas, and isolation — that's a different project.

Is there a hosted version? +

No, by design. claudebot runs on your subscription, so there's nothing to host without sharing accounts — which is exactly why there's no per-token bill. Self-host it in 30 seconds instead.

What does it cost? +

Nothing beyond the Claude plan you already pay for. claudebot is free and MIT-licensed, with no API metering on top and nothing to upgrade to.

Which platforms? +

macOS (launchd) and Linux (systemd --user). Both keep the bot always-on with auto-restart. You'll need Claude Code installed and logged in, and Python 3.10+.

Will this get my account banned? +

The risk is in how you use it, not the tool. claudebot keeps the token inside the genuine claude binary — the supported path. Stay single-user, never extract the token, and don't run pathological 24/7 loops. See “Is this allowed?” for the honest detail.