technickai/openclaw-config/tgcli
Claude Code and agent skill by technickai/openclaw-config
- community
Checking that the SKILL.md file is still in the repository.
Read, search, and send Telegram messages via your personal account using the tgcli CLI. Use when the user asks to check their Telegram messages, search Telegram history, send Telegram messages to other people, or monitor Telegram conversations. Do NOT use for normal user chats routed through OpenClaw's Telegram channel.
Install
npx vskill@latest install technickai/openclaw-config/tgcliSKILL.md
tgcli ✈️
CLI for reading, searching, and sending Telegram messages from a personal account via MTProto 2.0. The Telegram equivalent of wacli.
Use tgcli only when the user explicitly asks you to check their Telegram messages, search Telegram history, or send a Telegram message to someone else.
Do NOT use tgcli for normal user chats; OpenClaw routes Telegram conversations automatically via the bot channel.
Safety
- Require explicit recipient + message text before sending.
- Confirm recipient + message before sending.
- If anything is ambiguous, ask a clarifying question.
- Never send files from
~/.tgcli/or files containing credentials, keys, or tokens. - Never bulk-send or spam. One message at a time.
Setup
Prerequisites
- Go 1.23+ with CGO enabled
- Telegram API credentials from my.telegram.org/apps
(any app name works; you need the api_id and api_hash)
Authentication
Interactive flow: enter API credentials, phone number, verification code (sent to Telegram app), and 2FA password if enabled. Session persists in ~/.tgcli/.
First Sync
After login, sync recent history to build the local search index:
CLI Reference
List Chats
Read Messages
Search Messages
Search uses SQLite FTS5 for instant offline full-text search. Run tgcli sync first to build the index.
Message Context
Send Messages
Export
Download Media
Sync History
Chat Identifiers
| Format | Example | Type | |
|---|---|---|---|
@username | @durov | Username | |
123456789 | 123456789 | User/Chat ID | |
-123456789 | -123456789 | Group | |
-100123456789 | -100123456789 | Channel / Supergroup | |
+1234567890 | +14155551212 | Phone (must be in contacts) |
Important: Display names (e.g. "Jane Doe") do NOT work as chat identifiers. Use peer IDs from tgcli chat ls --json. The recommended workflow:
tgcli chat ls --jsonto find thepeer_idfor a chat- Use that
peer_idin subsequentmsg ls,msg search --chat,send, etc.
Global Flags
| Flag | Description | Default | |
|---|---|---|---|
--json | Machine-readable JSON output | false | |
--store DIR | Data directory | ~/.tgcli | |
--timeout DUR | Command timeout | 5m |
How It Works
tgcli connects via gotd/td, a pure-Go MTProto 2.0 implementation. This means:
- You are the sender -- messages come from your account, not a bot
- No ban risk -- Telegram officially supports third-party clients
- Independent session -- works without your phone being online
- Login once -- session persists until you revoke it
Messages fetched from the API are cached in a local SQLite database with FTS5 full-text search, enabling instant offline search across your entire history.
Data Storage
All data lives in ~/.tgcli/ (configurable with --store):
| File | Contents | |
|---|---|---|
config.json | API credentials (app_id, app_hash) -- private | |
session.json | MTProto session -- private | |
tgcli.db | Local message cache + FTS5 search index |
Notes
- Always use
--jsonwhen parsing output programmatically - Run
tgcli syncperiodically to keep the local search index fresh - Search is local-only (uses the SQLite FTS5 index); sync first for complete results
- Phone-based chat identifiers require the contact to be in your Telegram contacts
- The Telegram CLI is for messaging other people or searching history, not for your
normal OpenClaw conversations
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tgcli/SKILL.md
Popularity
- Repository stars
- 71
- Repository forks
- 13
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 19 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/technickai/openclaw-config/tgcli)