jackwener

jackwener / tg-cli

Public

A CLI for Telegram — local-first sync, search, export via MTProto

114
11
100% credibility
Found Mar 10, 2026 at 49 stars 2x -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

A terminal tool that downloads your Telegram messages to a local file for fast searching, filtering, exporting, and real-time monitoring using your personal account.

How It Works

1
🔍 Discover the tool

You hear about a simple way to search and organize all your Telegram chats right from your computer terminal.

2
📥 Set it up

Install the tool on your computer with a quick download, it takes just a minute.

3
🔗 Connect your account

Visit Telegram's site to grab your personal connection details and link your own account securely.

4
☁️ Pull in your chats

Run a quick sync to bring your recent messages and conversations into a local copy on your machine.

5
🔎 Search and browse

Easily find messages by keyword, see today's chats, spot top talkers, or view timelines without endless scrolling.

6
🔄 Stay up to date

Refresh your local copy anytime or listen live for new messages as they arrive.

🎉 All organized

Now you can quickly search old chats, export conversations, and keep everything at your fingertips effortlessly.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 49 to 114 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is tg-cli?

tg-cli is a Python Telegram client that uses your personal account via MTProto to sync chats into a local SQLite database for fast, offline search and analysis. You get commands like `tg refresh` to update your cache, `tg search "Rust"` for keyword or regex queries, and `tg today` to browse recent messages with filters for chats, senders, or time windows. It solves the pain of slow Bot API limits by enabling local-first workflows, exports to YAML/JSON for AI agents, and even near-real-time listening with `tg listen --persist`.

Why is it gaining traction?

Unlike basic telegram click bots or Bot API wrappers, tg-cli prioritizes speed with incremental syncs, top senders, timelines, and structured outputs that pipe perfectly into scripts or agents—YAML is token-efficient for LLMs. Devs dig the scheduling examples for cron/systemd, GitHub Actions integration potential via telegram github python tools, and cross-platform support as a telegram client linux/windows alternative. The flat CLI (no sub-subcommands) and agent-ready schema make it hook for quick daily use.

Who should use this?

Group moderators scanning for keywords in high-volume chats, job hunters filtering "remote" posts across Telegram channels, or AI builders needing a retrieval tool for telegram github integration. Python scripters wanting telegram client ios-free terminal access on linux/windows, or devops scheduling `tg refresh` for dashboards.

Verdict

Grab it if you need a lightweight tg cli for personal Telegram monitoring—install via uv/pipx, docs are solid with examples. At 31 stars and 1.0% credibility, it's alpha-stage with good tests but watch for edge cases in large syncs; fork or contribute via telegram github repository for production.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.