본문으로 건너뛰기
cccskills
무료GitHub에 공개

tgcli

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Telegram
설치 방법 보기

포함된 파일(62)

  • SKILL.md3.6 KB
  • .github/workflows/release.yml2.9 KB
  • .gitignore2.0 KB
  • .npmignore367 B
  • AGENTS.md3.5 KB
  • cli.js117.3 KB
  • client.js1007 B
  • core/command-context.js6.0 KB
  • core/config.js3.8 KB
  • core/control-client.js8.9 KB
  • core/control-server.js7.8 KB
  • core/duration.js932 B
  • core/http-util.js978 B
  • core/operations.js30.6 KB
  • core/send-utils.js13.4 KB
  • core/services.js3.2 KB
  • core/store.js1.2 KB
  • Dockerfile1.3 KB
  • docs/agents/domain.md941 B
  • docs/agents/issue-tracker.md3.7 KB
  • docs/agents/triage-labels.md1.0 KB
  • docs/cli.md10.9 KB
  • docs/mcp-tools.md5.6 KB
  • docs/plan.md1.6 KB
  • LIBRARY.md2.6 KB
  • LICENSE1.0 KB
  • mcp-server.js52.4 KB
  • message-sync-service.js105.9 KB
  • MIGRATION.md1.2 KB
  • package-lock.json132.1 KB
  • package.json1.4 KB
  • README.md2.0 KB
  • scripts/install-cli.sh177 B
  • store-lock.js3.8 KB
  • telegram-client.js61.3 KB
  • tests/auth-recovery.test.js4.1 KB
  • tests/backfill-client.test.js13.1 KB
  • tests/backfill-progress.test.js5.5 KB
  • tests/backfill-rename.test.js8.2 KB
  • tests/cli-auth.test.js4.5 KB
  • tests/cli-send-photo.test.js5.2 KB
  • tests/command-context.test.js9.2 KB
  • tests/config-control.test.js1.4 KB
  • tests/control-client.test.js10.9 KB
  • tests/control-server-cold-start.test.js4.4 KB
  • tests/control-server.test.js10.0 KB
  • tests/duration.test.js1.1 KB
  • tests/feedback.test.js4.7 KB
  • tests/folders.test.js21.8 KB
  • tests/idle-exit.test.js4.2 KB
  • tests/media-download.test.js3.6 KB
  • tests/operations-seam.test.js11.9 KB
  • tests/retry.test.js3.8 KB
  • tests/send-messages.test.js14.5 KB
  • tests/send-operations.test.js5.5 KB
  • tests/send-timeout.test.js11.5 KB
  • tests/send-utils.test.js21.5 KB
  • tests/services.test.js2.8 KB
  • tests/shutdown-requeue.test.js5.7 KB
  • tests/store-lock.test.js1.4 KB
  • tests/telegram-client-auth.test.js1.7 KB
  • tests/telegram-client-qr.test.js3.7 KB

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

이 스킬의 문제 신고