tg-cli

Read Telegram chats, messages, and media via MTProto in a CLI workflow.

27|1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/cyberash-dev/tg-mtproto-cli --skill tg-cli-cyberash-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tg-cli
Source: https://github.com/cyberash-dev/tg-mtproto-cli/tree/main
Command: npx skills add https://github.com/cyberash-dev/tg-mtproto-cli --skill tg-cli-cyberash-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides read-only access to Telegram data via MTProto, enabling viewing chats, messages, and media without modification.

Core Features & Use Cases

  • Read-only access to chats, messages, and media via MTProto (no Bot API).
  • Multi-account and session management with local credential storage.
  • JSON output option for scripting and data extraction.

Quick Start

Authenticate with tg auth, then list chats with tg chats, fetch messages with tg messages, and download media with tg download.

Frequently Asked Questions about tg-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read Telegram messages via MTProto without using the Bot API?

You can read Telegram messages via MTProto using a read-only CLI client that directly interfaces with the protocol, bypassing the Bot API to fetch chats and media.

Can I extract Telegram chat data as JSON for scripting and auditing?

Yes, you can extract Telegram chat data as JSON for scripting and auditing. The CLI provides a JSON output option to format messages and media for data extraction workflows.

How do I authenticate and manage sessions for multiple Telegram accounts in a CLI?

You authenticate and manage multiple Telegram accounts in a CLI using local credential storage and session management commands, creating a gateway-credential-session stack for each account.

Is there a way to download Telegram media across different accounts?

Yes, you can download Telegram media across accounts. The CLI supports multi-account access and exposes dedicated download commands to retrieve media files via the MTProto protocol.

What are the limitations of using a read-only Telegram client?

The limitation of a read-only Telegram client is that it enforces non-destructive operations, meaning you can view and extract chats and media but cannot modify, send, or delete messages.

How do I set up a read-only Telegram client for data extraction?

You set up a read-only Telegram client for data extraction by wiring a gateway-credential-session stack through a factory, then authenticating and using list and download commands to fetch data.