telegram-cli

Manage Telegram chats, messages, media, and contacts via a command-line interface.

28|1|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/miolamio/claude-skills --skill telegram-cli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: telegram-cli
Source: https://github.com/miolamio/claude-skills/tree/main/telegram-cli
Command: npx skills add https://github.com/miolamio/claude-skills --skill telegram-cli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides a reliable, agent-friendly bridge to interact with Telegram from Claude Code, removing the manual friction of switching to a phone or GUI for messaging tasks and media handling. It lets agents read history, search conversations, send and edit messages, manage contacts and groups, and download or upload media programmatically.

Core Features & Use Cases

  • Send and receive messages: programmatically send, reply, edit, forward, react to, pin, and delete messages across users, groups, and channels.
  • Search and read history: global and per-chat search with media filters, forum topic support, and time-range queries to gather context for agent decisions.
  • Media and contacts: download and upload files, send albums and captions, manage contacts, and export/import portable sessions for multi-environment workflows.
  • Agent automation & reliability: output modes (JSON/JSONL/TOON/human), field selection for token efficiency, error codes and rate-limit guidance, and reference patterns for building safe agent workflows.

Quick Start

Send a short message to a target username and attach a file after installing the tg CLI and authenticating with tg auth login.

Frequently Asked Questions about telegram-cli

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

FAQPage Schema
How do I automate sending Telegram messages from a command line interface?

To automate Telegram messaging via CLI, you use an agent-friendly command-line tool that programmatically sends, edits, and forwards texts across users and groups. This requires installing and authenticating the tg CLI.

Can I download and upload media files in Telegram chats via CLI?

Yes, you can download and upload media files in Telegram chats via CLI. The tool handles file transfers, sends albums with captions, and manages media programmatically within structured agent workflows.

Do I need to authenticate the tg CLI before managing Telegram contacts and groups?

Yes, authenticating the tg CLI is a required prerequisite before managing Telegram contacts and groups. Users must complete a login process to establish a session that enables agent-driven chat management.

What is the best way to search Telegram conversation history programmatically?

The best way to search Telegram conversation history programmatically is using a CLI that supports global and per-chat search with media filters. It allows time-range queries and forum topic support to gather context for agent decisions.

How does the Telegram CLI handle rate limits and structured error codes during automation?

The Telegram CLI handles rate limits and structured error codes by providing specific guidance and error reporting within its output modes. This ensures reliable agent automation by managing API constraints during message and media operations.

Does the Telegram CLI support JSON output for token efficiency in agent workflows?

Yes, the Telegram CLI supports JSON, JSONL, TOON, and human output modes for token efficiency in agent workflows. Field selection and pagination features optimize data handling when reading history or managing chats.