Telegram CLI

Telegram CLI for reading, searching, and sending messages. Use when the user asks about Telegram messages, wants to check inbox, search chats, send messages, or look up contacts and groups.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 3.1k · 17 current installs · 17 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description, commands in SKILL.md, and README all consistently describe a Telegram CLI (read, search, send messages, list contacts/groups). Requesting Telegram API credentials (my.telegram.org) is expected for this purpose.
Instruction Scope
Runtime instructions are limited to installing the CLI, running 'tg auth' to authenticate, and using explicit read/write/search commands. The SKILL.md does not instruct the agent to read unrelated files, environment variables, or to exfiltrate data to third-party endpoints beyond Telegram's API.
Install Mechanism
The skill is instruction-only but tells the user/agent to run 'npm install -g @cyberdrk/tg' (or build from source). Installing an npm package is a normal install path for such a CLI, but it carries moderate risk because postinstall scripts or the package code could execute arbitrary actions. The package owner/source is not declared in the registry metadata (source/homepage unknown), so the package's provenance and publish-time integrity are unclear.
Credentials
The README and SKILL.md correctly require Telegram API credentials (api_id/api_hash) — proportional and expected. However, registry metadata declared no config paths while the README says configuration and encrypted session data are stored in ~/.config/tg/ (config.json + session). This is a minor mismatch: the tool will read/write local session files even though those paths weren't declared in metadata.
Persistence & Privilege
always is false (normal). The README suggests optionally symlinking SKILL.md into ~/.claude/skills to register the skill with a local Claude agent — this modifies the user's agent skills directory but is an explicit user action. No evidence the skill requests permanent elevated privileges or alters other skills automatically.
What to consider before installing
Before installing or running this skill: 1) Verify the npm package @cyberdrk/tg on the npm registry and its upstream repository (review source code, maintainers, recent publish times, and issues). 2) Prefer installing from a inspected source (clone the GitHub repo, review package.json and any postinstall scripts) rather than blindly running 'npm install -g'. 3) Be aware the tool will store session/config in ~/.config/tg/ — confirm the encryption/storage claims and back up/remove sensitive files if needed. 4) Only provide Telegram api_id/api_hash from https://my.telegram.org/apps and avoid sharing your phone/SMS codes. 5) If you want stronger assurance, ask the publisher for a homepage/repo link or request a signed release; otherwise treat this as unverified third-party software and proceed with caution.

Like a lobster shell, security has layers — review code before you run it.

Current versionv0.1.0
Download zip
chatvk9742367vfqv6vyn82zph1ag6d802z9vclivk9742367vfqv6vyn82zph1ag6d802z9vlatestvk9742367vfqv6vyn82zph1ag6d802z9vmessagingvk9742367vfqv6vyn82zph1ag6d802z9vtelegramvk9742367vfqv6vyn82zph1ag6d802z9v

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

Telegram CLI

Fast Telegram CLI for reading, searching, and sending messages.

When to Use

Use this skill when the user:

  • Asks to check Telegram messages or inbox
  • Wants to search Telegram for a topic/keyword
  • Wants to send a Telegram message to someone
  • Asks about a Telegram group, contact, or chat
  • Wants to see unread messages
  • Needs to look up group members or admins

Install

npm install -g @cyberdrk/tg

Or from source:

cd ~/Code/cyberdrk305/telegram && npm install && npm run build && npm link

Authentication

First-time setup requires API credentials from https://my.telegram.org/apps

tg auth

Commands

Reading

tg inbox                               # Unread messages summary
tg chats                               # List all chats
tg read "ChatName" -n 50               # Read last 50 messages
tg read "ChatName" --since "1h"        # Messages from last hour
tg read @username -n 20                # Read DM with user
tg search "query" --chat "ChatName"    # Search within chat
tg search "query" --all                # Search all chats

Writing

tg send @username "message"            # Send DM
tg send "GroupName" "message"          # Send to group
tg reply "ChatName" 12345 "response"   # Reply to message ID

Contacts & Groups

tg contact @username                   # Get contact info
tg members "GroupName"                 # List group members
tg admins "GroupName"                  # List admins only
tg groups --admin                      # Groups where you're admin

Status

tg whoami                              # Show logged-in account
tg check                               # Verify session

Output Formats

All commands support --json for structured output suitable for processing:

tg inbox --json                        # JSON format
tg read "Chat" --json                  # JSON with messages array
tg chats --json                        # JSON with chat list

Examples

Check inbox:

tg inbox

Read recent messages from a chat:

tg read "MetaDAO Community" -n 20

Search for a topic:

tg search "futarchy" --chat "MetaDAO"

Send a message:

tg send @username "Hello, checking in!"

Notes

  • Chat names can be partial matches (e.g., "MetaDAO" matches "MetaDAO Community")
  • Usernames must start with @ (e.g., @username)
  • Messages are returned in reverse chronological order (newest first)
  • The --since flag accepts formats like "1h", "30m", "7d"

Files

2 total
Select a file
Select a file to preview.

Comments

Loading comments…