agentleFS
kfastovkfastov/tgcli/SKILL.md

tgcli

Skill43 starsChanged 5 months agoMITView on GitHub

Telegram CLI for reading/searching messages, syncing archives, and sending or downloading files. Use when the user asks about Telegram chats, messages, contacts, groups, or files.

  • Installs packages

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. TechNickAI/openclaw-config★ 76same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user:

    line 12
  2. Very specific:

    All commands support --json for structured output:

    line 93
  3. Very specific:

    Use --source live|archive|both when listing or searching messages.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

tgcli

Telegram CLI with background sync.

When to Use

Use this skill when the user:

  • Wants to read or search Telegram messages
  • Needs recent updates or an inbox-style view of chats
  • Asks to send a Telegram message or file
  • Wants to download media or files from Telegram
  • Wants to look up channels, groups, or contacts
  • Needs archive/backfill sync for a chat

Install

npm install -g @kfastov/tgcli

Or:

brew install kfastov/tap/tgcli

Authentication

First-time setup needs Telegram API credentials from https://my.telegram.org/apps

tgcli auth

Common Commands

Reading

tgcli channels list --limit 20
tgcli messages list --chat @username --limit 50
tgcli messages search "query" --chat @channel --source archive
tgcli topics list --chat @channel --limit 20

Files & Media

tgcli media download --chat @channel --id 12345
tgcli send file --to @channel --file ./report.pdf --caption "FYI"

Writing

tgcli send text --to @username --message "Hello"

Backfill & Service

tgcli backfill --chat @channel                 # backfill one chat (auto-starts the server, follows progress)
tgcli backfill --chat @channel --background    # enqueue and return the job id
tgcli backfill --chat @channel --depth 5000 --min-date 2024-01-01T00:00:00Z
tgcli backfill status                          # active backfills + server status
tgcli backfill count                           # number of in-progress backfills
tgcli backfill wait                            # block until the queue drains
tgcli backfill cancel --chat @channel          # stop a chat's backfills
tgcli channels watch --chat @channel           # subscribe a chat for archiving (queues a backfill)
tgcli channels unwatch --chat @channel         # stop archiving a chat
tgcli backfill --follow                         # track the server's queue to completion (`sync` is a silent alias)
tgcli service install
tgcli service start

Telegram and archive commands (channels, messages, send, media, topics, tags, metadata, contacts, groups, folders) run through the always-on control server, not the CLI. The CLI is a thin client: it auto-starts tgcli server in the background when one isn't running, has it execute the operation against its warm connection and database, then renders the result; the server shuts itself down once idle. config, service, doctor, and auth stay local. Foreground backfill --chat follows progress on stderr; Ctrl-C detaches (the job keeps running — check tgcli backfill status).

Contacts & Groups

tgcli contacts search "alex"
tgcli groups list --query "Nha Trang"

Output Formats

All commands support --json for structured output:

tgcli messages list --chat @username --limit 5 --json
tgcli channels list --limit 10 --json

Notes

  • Use --source live|archive|both when listing or searching messages.
  • --json is best for AI/tooling pipelines.
  • send commands time out after 30s by default so they never hang on a stuck connection. Override with --timeout 5m or disable with --timeout 0. Long-running commands (backfill, --follow, server) are unbounded by default.
  • backfill is the canonical archive command; sync (and channels sync --enable/--disable) keep working as aliases. Prefer channels watch/channels unwatch to subscribe/unsubscribe a chat.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.