tg-hub

Store Telegram messages locally in SQLite for offline search and analytics.

361|58|Updated Mar 1, 2026
One-click install
npx skills add https://github.com/OpenMinis/MinisSkills --skill tg-hub
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tg-hub
Source: https://github.com/OpenMinis/MinisSkills/tree/main/tg-hub
Command: npx skills add https://github.com/OpenMinis/MinisSkills --skill tg-hub

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires telethon, and includes scripts (resource) components.

What problem does it solve?

Persist Telegram conversations locally to enable fast offline access, search, and analytics without always hitting the network.

Core Features & Use Cases

  • Local-first sync: mirrors chats into a local SQLite database for offline querying.
  • Rich queries: keyword search, multi-keyword filtering, today/recent/top_senders, and timeline statistics across chats.
  • Easy login and configuration: interactive terminal login with session persistence and environment-variable based setup for headless runs.
  • Use case: archive and analyze chat history from groups and channels, then surface insights like most active speakers or peak activity times.

Quick Start

Install dependencies, run the tg-hub client, perform the initial interactive login in the terminal, and then begin syncing chats or querying the local database.

Frequently Asked Questions about tg-hub

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

FAQPage Schema
How do I search Telegram messages offline after archiving them locally?

To search Telegram messages offline, you can sync chats into a local SQLite database using a Telethon-based client. This stores message history locally, enabling keyword search, multi-keyword filtering, and timeline statistics without network access.

What is the best way to archive Telegram group and channel history for analytics?

The best way to archive Telegram history for analytics is using a local-first sync tool that mirrors chats into a SQLite database. This allows you to query multi-chat timelines, identify top senders, and calculate peak activity times offline.

Do I need a Telethon client to store and query Telegram data locally?

Yes, you need a Telethon client to authenticate and fetch Telegram data. The Skill uses an interactive terminal login with session persistence to establish the connection before mirroring messages into the local SQLite store.

Can I run Telegram data archiving headless using environment variables?

Yes, you can run Telegram data archiving headless by using environment-variable based configuration. This setup allows the Telethon client to initialize and sync chats to the SQLite database without interactive terminal prompts.

Does offline Telegram search support multi-chat queries across different timelines?

Yes, offline Telegram search supports multi-chat queries across timelines. Once your chats are mirrored into the local SQLite database, you can perform cross-chat keyword searches and generate timeline statistics.