tgcli

Automate Telegram sync, search, messaging, and chat management via CLI.

23|7|Updated Feb 4, 2026
One-click install
npx skills add https://github.com/dgrr/tgcli --skill tgcli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tgcli
Source: https://github.com/dgrr/tgcli/tree/main
Command: npx skills add https://github.com/dgrr/tgcli --skill tgcli

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Teams and operators who need to script Telegram workflows cannot rely on heavy TDLib hybrids, so tgcli provides an authenticated CLI that handles sync, search, messaging, and metadata management without C/C++ dependencies.

Core Features & Use Cases

  • Pure Rust MTProto Engine: Authenticates via phone/code/2FA, stores sessions in a local sqlite session, and contacts Telegram through grammers without external binaries.
  • Incremental Sync + Search: Keeps libSQL/FTS5 stores updated, exposes multi-account stores, and lets you list/search chats or messages with optional markdown, JSON, or text formatting.
  • Daemon + Admin Tools: Runs real-time daemon mode, exports data, manages folders/members/polls, and supplies shell completions for automation-friendly outputs.

Quick Start

Authenticate with tgcli auth, sync your chats via tgcli sync, and send a message with tgcli send to confirm the setup works.

Frequently Asked Questions about tgcli

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

FAQPage Schema
How do I manage Telegram chats from the command line without C or C++ dependencies?

Telegram sync and search can be handled locally by storing messages in a libSQL database with FTS5 full-text search support, enabling incremental updates and multi-account stores.

How do I run real-time Telegram message capture as a background daemon?

Yes, you can automate Telegram authentication from scripts by handling phone, code, and 2FA inputs deterministically, storing sessions locally in sqlite for subsequent CLI operations.

What is the best way to script Telegram workflows for ops automation?

Pure Rust Telegram CLI tools differ from TDLib hybrids by operating without external binaries, relying entirely on a Rust MTProto client for authentication, sync, and chat management.

Does a pure Rust Telegram CLI support multi-account stores and folder management?

Yes, a pure Rust Telegram CLI supports multi-account stores and folder management, allowing operators to manage folders, members, polls, and metadata directly from the command line.