Back to Registry View Author Profile
Official Verified
node-telegram-cli
CLI tool for Telegram via MTProto. Send/read messages, manage groups, search conversations, download media, and automate Telegram workflows. Use when the task involves any Telegram account interaction.
skill-install — Terminal
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/baontq23/telegram-cliOr
Source & Trust
- Repository: https://github.com/baontq23/node-telegram-cli
- npm: https://www.npmjs.com/package/node-telegram-cli (published with provenance)
- Credentials are stored securely via OS Keychain (macOS Keychain / Windows Credential Manager / Linux Secret Service), not in plaintext files
Installation
- Requires Node.js >= 20
- Install globally:
npm install -g node-telegram-cli - Verify:
ntg --version - Run
ntg loginonce — interactive, requires phone number + OTP code from Telegram
Critical Rule: Always Use JSON Mode
- Add
--jsonflag to every command for machine-readable output --jsonis a global flag — place it before or after the subcommand- Example:
ntg --json inbox,ntg --json search @user "keyword"
Peer Format
@username— most reliable, e.g.@johndoe- Phone number — for contacts without username, e.g.
+84901234567 me— your own Saved Messages- Chat title — group/channel name in quotes, e.g.
"My Group"
Read Commands (No Side Effects)
ntg --json inbox— list recent conversationsntg --json inbox --unread— only unread conversationsntg --json inbox --private— only private 1-on-1 chatsntg --json inbox --unread --private— combine filtersntg --json inbox --chat <peer> --limit <n>— messages from a specific chatntg --json search <peer> "keyword"— search in a specific chatntg --json global-search "keyword"— search across all chatsntg --json chat-info <chat>— show group/channel info
Write Commands (Has Side Effects)
ntg msg <peer> "text"— send a text messagentg msg <peer> "text" --silent— send silently (no notification sound)ntg fwd <user> <msgId>— forward a message by IDntg mark-read <peer>— mark all messages as readntg delete-msg <msgId>— delete a messagentg send-photo <peer> <file>— send a photontg send-video <peer> <file>— send a videontg send-file <peer> <file>— send a text file as plain messagesntg download <msgId> --chat <peer>— download media from a messagentg download <msgId> --chat <peer> --type <type>— specify media type (photo, video, audio, doc)ntg view <msgId> --chat <peer>— download and open with system viewerntg clean-downloads— delete all downloaded media files
Group Management
ntg create-group "Topic" @user1 @user2— create a new groupntg chat-add <chat> <user>— add a user to a groupntg chat-kick <chat> <user>— remove a user from a groupntg chat-rename <chat> "New Name"— rename a groupntg chat-set-photo <chat> <file>— set group photo
Contact Management
ntg add-contact <phone> <firstName> <lastName>— add a contactntg rename-contact <user> <firstName> <lastName>— rename a contact
JSON Output Schemas
Inbox (conversation list)
Metadata
AI Skill Finder
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skill Add to Configuration
Paste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-baontq23-telegram-cli": {
"enabled": true,
"auto_update": true
}
}
}Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.