beautifulrem/tdl-next
Networking & CommunicationA Rust CLI and TUI for resumable Telegram downloads, uploads and chat exports over multiple connections.
What it does
tdl-next is a terminal tool for moving files in and out of Telegram. It downloads media from message links or exported chat histories, uploads files and photo albums, forwards messages, and exports chat history. Transfers use several connections per data center, save progress per chunk so interrupted jobs resume after a restart, and can be filtered by expressions such as Media.Size < 500 * 1024 * 1024.
It is a Rust rewrite of the Go project iyear/tdl, keeping the same command vocabulary (dl, up, fwd, chat, login, backup, recover) and able to import existing session data. It targets scripts and interactive terminal use: commands emit --json or --jsonl output with stable exit codes, while tdl tui opens a full-screen Ratatui interface for transfers, queue, history, chats, network status and accounts.
Install
Prebuilt binaries are distributed through npm/pnpm/bun, GitHub release archives and a Docker image; Cargo builds from source with Rust 1.96 or newer. The npm route installs a prebuilt binary for macOS (arm64, x64), Linux (x64, arm64; glibc) or Windows (x64):
npm install -g tdl-next
To try without installing, use npx tdl-next. macOS and Linux users can also use the shell installer; Windows uses the PowerShell installer. Both check a SHA-256 checksum before extraction and need no root or Administrator rights, and --version pins a release. Release archives and the installation guide cover other platforms, provenance checks and proxies.
Quick start
Log in by importing a Telegram Desktop session or scanning a QR code:
tdl login -T desktop
tdl login -T qr
Download media from a message link into ./downloads:
tdl dl -u https://t.me/telegram/458 -d ./downloads --group
For bulk work, export a chat, then download matching messages from that export and resume any earlier run:
tdl chat export -c @telegram -T last -i 200 -o export.json
tdl dl -f export.json -d ./downloads --filter 'Media.Size < 500 * 1024 * 1024' --continue
Upload a folder to Saved Messages as albums with tdl up -p ./photos -c me --photo --group. Add -n <name> to keep multiple accounts separate, and run tdl doctor to check the setup. The quickstart and CLI reference list more recipes and flags; the TUI guide covers the interface.
Constraints
- You need a Telegram account; login imports a Desktop session or scans a QR code, so credentials and session data live on the machine running the tool.
- npm's prebuilt Linux binaries require glibc; Cargo builds need Rust 1.96 or newer.
- Download filters depend on expression syntax documented under filters and templates; incorrectly scoped filters can select the wrong messages.
- Downloads are confined to their target directory and sessions are stored in the OS keychain or an encrypted vault, per the project's security design.
tdl dl --servestarts a local token-protected HTTP server for streaming before download.- The license is AGPL-3.0-only, which matters if you plan to modify and redistribute it.
Migration
tdl-next reads existing ~/.tdl data and .backup.tdl archives. Import them with:
tdl migrate --storage "type=bolt,path=$HOME/.tdl/data" --yes
The migration guide explains what carries over, and the compatibility notes list intentional differences from the Go version.
HotRepo's take
The project appeared on HotRepo's new-project list on 2026-11-28 with 126 stars gained in a one-hour observation window, growing from 182 to 308 stars in the sampled curve. That is a short observation period, so it shows early attention rather than a sustained trend; there is no all-language daily ranking record yet. The repository is a Rust codebase with a full documentation set and CI workflow, and the README reports its own benchmarks against the Go predecessor on a local mock server, so performance claims should be read as author-measured rather than independently verified.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- TelegramMessenger/Telegram-AndroidOfficial Android source for the Telegram messaging app, aimed at developers building their own client.
- TelegramMessenger/TelegramOfficial Android source code for the Telegram messaging app, intended for developers building or studying the client.
- DrKLO/TelegramThe official Android client source for Telegram, useful to developers building or auditing a messenger, not as a kit for private chat.
- TGX-Android/Telegram-XAn official alternative Telegram client for Android with full source and reproducible build instructions.
- Neet-Nestor/Telegram-Media-DownloaderRestores a download button for images, GIFs, audio and video in Telegram web chats and channels that block saving.