Install
openclaw skills install telegram-cliCLI 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.
openclaw skills install telegram-clinpm install -g node-telegram-clintg --versionntg login once — interactive, requires phone number + OTP code from Telegram--json flag to every command for machine-readable output--json is a global flag — place it before or after the subcommandntg --json inbox, ntg --json search @user "keyword"@username — most reliable, e.g. @johndoe+84901234567me — your own Saved Messages"My Group"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 infontg 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 filesntg 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 photontg add-contact <phone> <firstName> <lastName> — add a contactntg rename-contact <user> <firstName> <lastName> — rename a contactname — contact/chat display namepeer — identifier to use as <peer> argumentpeerType — "username" | "phone" | "id"type — "user" | "group" | "channel"unreadCount — number of unread messageslastMessage — text/caption (empty string if media-only)lastMessageId — use with ntg download <id> for mediamediaType — "photo" | "video" | "document" | "audio" | "voice" | "sticker" | "location" | "contact" | "poll" | nulldate — ISO 8601 timestampid — message IDdate — ISO 8601 timestampsender — sender display nametext — message text/captionmediaType — same values as aboveisOutgoing — true if sent by you0 = success1 = error (not logged in, peer not found, etc.)ntg chat <peer> — it is interactive, blocks stdin, not suitable for automationntg logout is called — no re-login needed between commands~/.telegram-cli/downloads/--chat <peer> when downloading media to identify the source chat