using-telegram-cli
Installation
SKILL.md
Using Telegram CLI
Overview
Use tg as an account-aware Telegram client and local SQLite message index. Keep network reads, local reads, and externally visible writes distinct.
Mandatory rules
- Require explicit user authorization before
send,edit,delete, or any group mutation. These affect real Telegram state; several have no built-in confirmation. - Treat API hashes, proxy URLs, sessions, account metadata, exported messages, and databases as secrets. Never print
config list --show-secrets, expose a credential-bearing proxy, or commitDATA_DIR. - Select an account explicitly with
--account <name>in automation. Do not change the current account merely to run one command. - Use
--jsonfor finite scripted commands. Check the process exit status and top-levelok. Userefreshand inspectdata.failureswhen automation must detect per-chat sync failures;sync-allomits that field. - Never combine
--jsonand--yaml. - Do not claim that chats are contacts. This CLI has no contact-list or contact-sync command.
Resolve the executable
Prefer an installed tg and inspect live help: