cyberdrk305/telegram
Overview
This skill provides a fast Telegram CLI for reading, searching, and sending messages from the terminal. It helps you inspect inboxes, query chats, manage contacts and groups, and send or reply to messages programmatically. It is optimized for quick lookups and scripting with a JSON output option for automation.
How this skill works
Install the CLI and authenticate once using your Telegram API credentials from my.telegram.org. Use simple commands to list chats, read recent messages, search across chats or within a chat, and send or reply to messages. All commands support a --json flag for structured output suitable for pipelines and scripts.
When to use it
- Check unread messages or summarize your inbox quickly from the terminal
- Search messages by keyword across all chats or within a specific chat
- Send direct messages or post to groups without opening the Telegram app
- Lookup contact details, group members, or group admins
- Integrate Telegram reads/writes into automation or monitoring scripts
Best practices
- Run tg auth once after obtaining API credentials from my.telegram.org/apps
- Use partial chat names for convenience but confirm matches when multiple chats are similar
- Prefer --json for automation to parse outputs reliably
- Use --since with formats like 1h, 30m, or 7d to limit results and reduce noise
- Include message IDs when using reply to ensure the correct target in busy chats
Example use cases
- tg inbox to get a quick unread summary before meetings
- tg search "deployment" --all to find discussion about a release across chats
- tg read "Engineering" --since "2h" -n 50 to catch up on recent engineering chat
- tg send @alice "Standup notes posted" to notify a teammate
- tg members "Project X" or tg admins "Project X" to audit group roles
FAQ
Run tg auth and follow prompts after creating API credentials at my.telegram.org/apps.
Can I integrate outputs into scripts?
Yes — use the --json flag on commands like tg inbox, tg read, and tg chats for structured output.
How do I read messages from a DM with a username?
Use tg read @username -n 20 to read the last 20 messages from that direct message.