Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@goodit/telegram-sync-cli

Latest version: v0.17.0

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
npm package Publisher: neoromantic
89 Stars
3 Forks
24 Versions
4.0K Downloads
TypeScript Repo language

Scan summary

@goodit/telegram-sync-cli was last scanned on 27 Nov 2026 at version 0.17.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 24 versions; the latest 2 were published within 6 days (22–27 Nov 2026).
  • Findings: No rules fired in version 0.17.0.
  • Downloads: 4,031 downloads.

Versions

24 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.17.0 LATEST 27 Nov 2026 No rules fired
0.16.0 22 Nov 2026 No rules fired
0.15.1 19 Nov 2026 No rules fired
0.15.0 19 Nov 2026 Not shown
0.14.0 18 Nov 2026 Not shown

No rules fired in 0.17.0

Findings

Findings for v0.17.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.17.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

telegram-sync-cli

Agent-friendly Telegram CLI with a local cache, a read-only sync daemon and full MTProto API access. Website: tg.sergeybaus.com. Made by Sergey Baus.

CI npm License: MIT Usage stats

Install

With Homebrew on macOS or Linux, a standalone binary:

brew install neoromantic/tap/tg

With Bun >= 1.4:

bun i -g @goodit/telegram-sync-cli

The npm package runs the TypeScript source with Bun; nothing is compiled at install time. npm i -g @goodit/telegram-sync-cli also works, as long as bun is on your PATH. Binaries for every platform, Windows included, are attached to each GitHub Release.

The agent skill for Claude Code, Codex and other coding agents:

bunx skills add neoromantic/telegram-sync-cli

tg skill install --dir and the tg skill validate that the skill describes need tg newer than 0.14.0. In 0.14.0 and older, tg skill install ignores --dir and writes skill.json into the data directory.

From source:

git clone https://github.com/neoromantic/telegram-sync-cli.git
cd telegram-sync-cli
bun install
bun run src/index.ts --help   # or: bun run build, then ./dist/tg

Quickstart

# Telegram API credentials from https://my.telegram.org/apps
export TELEGRAM_API_ID=123456
export TELEGRAM_API_HASH=your_api_hash

tg auth login --phone +15551234567   # or: tg auth login-qr
tg chats list --limit 20 --format pretty
tg daemon start                      # keep the cache in sync (foreground)
tg messages search --query "hello" --format pretty

tg --help and tg --version work before you set any credentials. When running from source, Bun auto-loads .env, so you can cp .env.example .env and fill it in instead.

Features

  • Multi-account management (tg accounts, --account)
  • Phone and QR login (tg auth)
  • Read-only daemon for real-time sync and history backfill that keeps the contact list current; catch-up and history for large groups and channels on request (tg chats sync); the CLI does all mutations (tg send)
  • Groups are cached only while you take part: a group adds new messages only if you sent a message there in the last 90 days; what is cached stays (sync strategy)
  • Full Telegram API access through tg api <method>
  • Cache-first reads (stale-while-revalidate) with --fresh to bypass the cache
  • Chat history with cursor paging (tg messages list), filtered by type (voice notes, round videos, photos…) and date, and a message in context (tg messages get), cache-first
  • Unread messages: chats with unread messages (tg chats list --unread), their unread messages (tg messages unread) and marking them read (tg messages read); the daemon keeps the counts current
  • Full-text search (FTS5) over cached messages; --forms also finds other forms of each word (квартира finds квартиру, meeting finds meetings)
  • Rich messages: tg send --markdown or --html sends headings, tables, lists, quotations, code blocks and formulas that Telegram renders natively
  • Files: send one with tg send --file; download the files of one or many messages into a per-account media cache with tg media download (cached files need no network, partial downloads resume, name templates for --out); every message item shows its attachment (kind, name, MIME type, size)
  • Voice notes and video notes to text with a speech-to-text program on your machine (tg media transcribe, whisper.cpp or an openai-whisper CLI); tg messages search finds spoken words, and tg messages shows the transcript
  • Service messages say what happened: calls (video, duration, why they ended), pins and group changes in each item's action
  • Rich messages (headings, tables, lists, task lists, code, formulas) read as rich Markdown in text, and search finds them by any word
  • Contacts, chats and users (tg contacts, tg chats, tg me, tg user)
  • Read-only SQL over the cache (tg sql) with an annotated schema
  • Rate-limit tracking, config and status tooling (tg config, tg status)
  • JSON output and a stable error schema for scripts and agents; paged reads add next, the command for the next page with the same account and filters

How it compares

tg keeps your Telegram in a local SQLite cache for offline search and SQL; telegram-mcp is an MCP server that makes one live call per tool. Compared on 2026-10-21 from its README and tool list:

Feature tg telegram-mcp
Interface CLI, JSON output, fixed exit codes MCP server (stdio, HTTP, SSE)
Agent integration any agent with a shell MCP clients, Claude Desktop bundle
Local cache, offline queries ✅ SQLite, cache-first, --fresh ❌ live calls only
Message search ✅ full-text (FTS5) over cached messages ✅ Telegram server search
SQL over your data ✅ read-only tg sql ❌
Background sync ✅ read-only daemon: real-time, catch-up after restarts and reconnects, history backfill; catch-up and history for large groups and channels on request (tg chats sync) partial: waits for events, stores nothing
Any MTProto method ✅ tg api <method> ❌ fixed tool set
Read chat history ✅ tg messages list (paging) and tg messages get (context), cache-first, --fresh ✅
Unread messages, mark as read ✅ tg chats list --unread, tg messages unread, tg messages read ✅
Send text ✅ replies, silent, rich messages from Markdown or HTML (--markdown, --html) ✅ replies, Markdown/HTML
Edit, delete, forward, pin partial: via tg api (#23) ✅
Send and download media ✅ one file per message (tg send --file), cached downloads with resume (tg media download), local transcription of voice and video notes (tg media transcribe); sending albums and voice messages later ✅ files, albums, voice, transcription
Wait for new messages ✅ tg messages wait (JSON, timeout, settle) and tg messages watch (NDJSON), from the daemon's cache ✅
Groups, channels, admin rights partial: via tg api ✅
Contacts list, search, get; the rest via tg api ✅ add, import, block, export
Reactions, polls, drafts, scheduled, folders partial: via tg api ✅
Multi-account ✅ --account; one cache per account, the daemon syncs each account with its own client ✅
Guardrails for agents ✅ read-only mode, chat allowlist (readOnly, allowedChats) ✅ read-only mode, chat allowlist
Install Homebrew binary, or bun/npm with Bun git clone + uv, pip from git, Docker
Runtime, license TypeScript on Bun (mtcute), MIT Python (Telethon), Apache-2.0

Usage

tg <command> [options]

tg accounts list
tg contacts list --limit 50
tg chats list --limit 20
tg chats sync @examplenews          # also sync a large group or channel
tg messages list --chat @username --limit 20
tg messages list --chat @username --type voice,round --since 7d   # voice notes and round videos
tg messages get --chat @username --id 42 --context 3
tg messages search --query "hello world" --since 7d   # both words, any order
tg messages search --query "квартира"                # квартиру, квартирой… too
tg messages wait --chat @username --after 42 --timeout 60   # block until the next reply
tg messages unread                   # unread messages of every chat
tg messages read --chat @username    # mark the chat read
tg send --to @username --message "Hi there"
tg send --to me --file ./report.pdf --caption "Q3"
tg media download --chat me --id 42 --out ./   # into the media cache, then copied here
tg media download --chat me --id 42 --id 43 --out './media/{date}_{id}_{name}'
tg api account.checkUsername --username=myuser
tg sql --query "SELECT * FROM users_cache LIMIT 10"
tg daemon start
tg status
tg db vacuum                         # give an account cache's free space back to the disk
tg config path

Global options: --format json|pretty|quiet, --verbose, --quiet. Many commands accept --account (each account has its own cache; without the flag a command uses the active account); cache-aware commands accept --fresh. See tg <command> --help. Upgrading from 0.3 with several accounts: see per-account caches.

Variable Description
TELEGRAM_API_ID Your Telegram API ID
TELEGRAM_API_HASH Your Telegram API hash
TELEGRAM_PROXY Optional proxy URL for CLI and daemon connections
TELEGRAM_SYNC_CLI_DATA_DIR Override the data directory (default ~/.telegram-sync-cli)
TELEGRAM_SYNC_CLI_TELEMETRY 0 turns usage stats off
TELEGRAM_SYNC_CLI_READ_ONLY 1 refuses commands that change Telegram (read-only mode)
TELEGRAM_SYNC_CLI_ALLOWED_CHATS Comma-separated chats this process may use, such as @teamchat,me
DO_NOT_TRACK 1 turns usage stats off
MTCUTE_LOG_LEVEL mtcute log level
VERBOSE Verbose logging (1)

For a proxy, set TELEGRAM_PROXY=socks5://127.0.0.1:1080. Supports socks4://, socks5://, http://, https:// and MTProxy links, with credentials in the URL. socks5h:// and addresses without a scheme are unsupported. See proxy configuration.

Reference: CLI commands, authentication, configuration, architecture, daemon, sync strategy, caching, database schema, storage, SQL, search, media, rate limiting. Known gaps are tracked in issues.

For AI agents

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @goodit/telegram-sync-cli

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Copy of Template Design OX Blog (1)
Research

Thousands Of GitHub Accounts Hijacked With wfx-loot CI Secret Stealing Malware Via GitHub Actions & npm

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Frame 2085668439 (1)
Group 1261154229