by tlgrcli
CLI for Telegram — agent-friendly, daemon-based, with webhook event push.
# Add to your Claude Code skills
git clone https://github.com/tlgrcli/tlgrtlgr is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tlgrcli. CLI for Telegram — agent-friendly, daemon-based, with webhook event push. It has 207 GitHub stars.
tlgr's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/tlgrcli/tlgr" and add it to your Claude Code skills directory (see the Installation section above).
tlgr is primarily written in Python. It is open-source under tlgrcli on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh tlgr against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Full Telegram account control from the terminal. Agent-friendly, daemon-based, with webhook event push.
pipx install tlgr-cli
The command is tlgr; the distribution on PyPI is tlgr-cli, because the
shorter name was taken by an unrelated project. pipx is the recommendation
because tlgr runs a long-lived daemon and wants its own environment;
pip install tlgr-cli into a virtualenv works the same way. To track the
development tip instead, install from the repository:
pipx install git+https://github.com/tlgrcli/tlgr.git
For agents: logging in is a sequence of ordinary commands —
tlgr auth send-codethentlgr auth verify-code— so only reading the code needs a person. Secrets come from--x-env/--x-stdin/--x-file, never argv. See AGENT.md for the full agent reference.plugin/skills/tlgr/SKILL.mdis the same guidance as an Agent Skill for Claude Code, Codex, Cursor, OpenClaw and others:npx skills add tlgrcli/tlgr. In Claude Code it also installs as a plugin:claude plugin marketplace add tlgrcli/tlgr, thenclaude plugin install tlgr@tlgr.
Coming from tlgr 1.x with a running daemon? Stop it before you upgrade — two processes on one session file is how an authorization gets revoked. docs/UPGRADING.md is the ten-minute cutover, including the six output shapes an agent has to adapt to.
tlgr config init # create config files
tlgr login +15551234567 # authenticate (shortcut for account add)
tlgr daemon start # start background daemon
tlgr send @username "Hello from tlgr" # send a message
tlgr chats --limit 20 # list your chats
tlgr status # check daemon status
Every Telegram operation available as a single command. Three output modes: human-readable tables (default), JSON (--json) for agents, and plain TSV (--plain) for piping.
flowchart LR
USER["You / Agent"] --> CLI["tlgr CLI"]
CLI -->|"direct"| TG["Telegram API"]
CLI -->|"IPC socket"| DAEMON["tlgr daemon"]
DAEMON --> TG
Common operations are available as top-level commands for quick access:
tlgr send <chat> <text> # message send
tlgr login <phone> # account add
tlgr logout <alias> # account remove
tlgr status # daemon status
tlgr chats # chat list
tlgr contacts # contact list
tlgr dl <chat> <msg_id>... # media download
tlgr up <chat> <path>... # media upload
tlgr message send <chat> <text> # --file, --caption, --reply-to, --silent, --parse,
# --schedule, --topic, --send-as, --split
tlgr message list <chat> # --limit, --cursor, --all, --since, --until
tlgr message get <chat> <msg_id> # full metadata
tlgr message delete <chat> <ids...>
tlgr message search <chat> <query> # --from, --media-type, --cursor
tlgr message pin <chat> <msg_id> # and: message unpin
tlgr message react <chat> <id> <emoji> # alias of `reaction add`, see Reactions
tlgr message read <chat> # --up-to
tlgr message edit <chat> <id> <text> # --typing N
tlgr message forward <from> <ids...> --to <chat>
tlgr message link <chat> <msg_id> # shareable t.me link
tlgr message entity list <text> # --parse md: what the formatting actually did
message send supports --typing N / --typing-auto to show a realistic
"typing…" indicator before the message lands. Text over 4096 UTF-16 units is
refused unless you pass --split.
That is the everyday tenth of the group. It also has preview, compose,
summarize, translate, transcribe, report, thread list, view get,
read-receipt list, scheduled send, paid set, fact-check set,
dice list, effect list, game *, sponsored *, suggested * and
tone * — 43 operations in all, generated from one registry, with generated
reference in docs/reference/message.md.
msg is an alias for message (e.g. tlgr msg send @user "hello").
tlgr poll create <chat> "Lunch?" Pizza Sushi # --quiz --correct N, --multiple,
# --public-voters, --duration 2h
tlgr poll vote <chat> <msg_id> 0 # answers are addressed by index
tlgr poll get <chat> <msg_id> # results, and why you cannot vote
tlgr poll close <chat> <msg_id> --yes
tlgr reaction add <chat> <msg_id> 👍 # keeps the reactions you already had
tlgr reaction remove <chat> <msg_id> # all of mine
tlgr reaction user list <chat> <msg_id> # who reacted, per emoji
tlgr reaction chat set <chat> --some 👍,❤ # what this chat allows (admin)
tlgr todo create <chat> "Release" "tag it" "ship it"
tlgr todo toggle <chat> <msg_id> --done 1 --undone 2
tlgr location send <chat> -- <lat> <lon>
tlgr location live start <chat> -- <lat> <lon> --period 1h
tlgr search global "release notes" # every chat, one cursor
Three things worth knowing before scripting these. A poll answer is an opaque
identifier on the wire, so tlgr resolves your index against the server's own
copy — --shuffle cannot make index 1 mean two answers. sendReaction carries
your whole reaction set, so reaction add reads what is there and resends
it rather than replacing it, and mine in the reply is the set afterwards. A
checklist task id is never renumbered, because completions are keyed by it.
Anything that spends Stars — reaction pay, search post past its free quota
— has no default amount and refuses to run without an explicit one.
Generated reference: poll,
reaction, todo,
location, search.
Prepare a reply without sending it — you send (or discard) it later from any Telegram client. The human-in-the-loop primitive for agents.
tlgr draft set <chat> <text> # --reply-to, --parse
tlgr draft clear <chat> # --all --yes to clear every draft
tlgr draft list # all non-empty drafts across chats
draft set returns the saved draft, and draft list reports marked chat ids
(-100… for channels) with raw_id beside them. See
docs/reference/draft.md.
tlgr chat list # --folder, --type, --search, --unread, --pinned, --muted
tlgr inbox # shortcut: chat list (add --unread)
tlgr catchup # every unread chat with its recent messages, read-only
tlgr chat open <chat> # history AND a read receipt; --no-read to peek
tlgr chat read <chat>... # the receipt without the history; --folder, --from-file
tlgr chat unread <chat> # the undo for an accidental receipt
tlgr chat get <chat> # --full for getFullUser/getFullChat/getFullChannel
tlgr chat posters <chat> # distinct senders + message counts, walked internally
tlgr chat archive <chat>... [--undo] # one RPC for any number of peers
tlgr chat mute <chat> --for 8h # or --until, --forever, --off, --stories, --folder
tlgr chat pin <chat>... [--unpin] # --folder pins inside a chat folder; --order rewrites it
tlgr chat clear <chat> --yes # history goes, chat stays
tlgr chat delete <chat> --yes # --for-both, or --for-everyone if you own it
tlgr chat leave <chat>... --yes # --delete-history, --remove-from-folders
tlgr chat typing <chat> # --action record-audio, upload-photo, …
tlgr chat notify set <chat> --silent on
tlgr chat ttl set <chat> 1d # auto-delete timer; omit the period to read it
tlgr chat theme set <chat> --emoji 🌷
tlgr chat wallpaper set <chat> --slug pattern
tlgr chat badge get --limits # the unread badge, and the chat-list limits behind it
tlgr chat report <chat> --spam --yes
Members, admins, invites and topics:
tlgr chat member list <chat> --filter admins # `chat members` still works
tlgr chat member ban <chat> @spammer --purge --report --yes
tlgr chat member restrict <chat> @noisy --deny send-media --until 7d
tlgr chat admin promote <chat> @alice --rights ban-users,delete-messages
tlgr chat permission list --mask member # the canonical right names
tlgr chat permission set <chat> --deny send-stickers
tlgr chat invite create <chat> --limit 25 --expires 7d
tlgr chat request approve <chat> --all --yes
tlgr chat topic create <chat> Releases # the id `--topic` takes
tlgr chat setting set <chat> --slow-mode 30s --hidden-members on
tlgr chat create <name> --type supergroup # --members, --photo, --username
tlgr chat stats get <channel> --load-graphs
tlgr boost add <channel>
chat list returns a page of dialogs whose peer is nested under chat;
chat catchup and chat list never emit a read receipt, chat open does on
purpose, and chat unread