# iyear/tdl

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/iyear-tdl).**

7,135 stars · 703 forks · Go · agpl-3.0

## Links

- GitHub: https://github.com/iyear/tdl
- Homepage: https://docs.iyear.me/tdl
- awesome-repositories: https://awesome-repositories.com/repository/iyear-tdl.md

## Topics

`bash` `download` `downloader` `telegram` `telegram-api` `telegram-bot` `telegram-bots` `telegram-channel` `telegram-userbot`

## Description

tdl is a command-line tool for Telegram account automation, media management, and data archiving. It provides a programmatic interface for downloading and uploading files, forwarding messages, and exporting chat history, member lists, and media into structured JSON files.

The project distinguishes itself through a session management system that isolates multiple account identities using unique namespaces. It features expression-based routing for messages and uploads, allowing users to direct content to specific destination chats using custom logic and dynamic caption generation.

The tool covers a broad range of capabilities, including media retrieval from channels and groups, high-bandwidth file transfers, and content migration between chats. It also includes system utilities for proxy server routing, task throttling to manage API rate limits, and a plugin system for third-party extensions.

The software can be deployed in containerized environments and supports configuration via environment variables.

## Tags

### Networking & Communication

- [Telegram API Integrations](https://awesome-repositories.com/f/networking-communication/telegram-api-integrations.md) — Provides a programmatic command-line interface for interacting with Telegram account sessions.
- [Channel Content Retrieval](https://awesome-repositories.com/f/networking-communication/channel-content-retrieval.md) — Retrieves files and media from official Telegram channels for local storage. ([source](https://docs.iyear.me/tdl/getting-started/quick-start/))
- [Chat Exporters](https://awesome-repositories.com/f/networking-communication/chat-exporters.md) — Extracts media and full message history from Telegram chats into portable JSON formats using size and view filters. ([source](https://docs.iyear.me/tdl/guide/tools/export-messages/))
- [MTProto Implementations](https://awesome-repositories.com/f/networking-communication/custom-protocol-implementations/mtproto-implementations.md) — Implements the MTProto binary protocol to maximize media download and upload speeds.
- [Expression-Based Matchers](https://awesome-repositories.com/f/networking-communication/network-infrastructure-routing/network-routing-traffic-management/request-routing/expression-based-matchers.md) — Uses a logic engine to evaluate expressions for directing files and messages to specific chats.
- [Chat Discovery](https://awesome-repositories.com/f/networking-communication/chat-discovery.md) — Retrieves lists of channels and groups based on filters such as names or topics. ([source](https://docs.iyear.me/tdl/guide/tools/list-chats/))
- [High-Volume API Transfer Optimization](https://awesome-repositories.com/f/networking-communication/high-volume-api-transfer-optimization.md) — Uses specialized account sessions to download high volumes of media while minimizing rate-limit delays. ([source](https://docs.iyear.me/tdl/guide/download/))
- [Message Content Modification](https://awesome-repositories.com/f/networking-communication/message-content-modification.md) — Alters the text or captions of messages using dynamic expressions before forwarding. ([source](https://docs.iyear.me/tdl/guide/forward/))
- [Message Routing](https://awesome-repositories.com/f/networking-communication/message-routing.md) — Directs messages to specific destination chats based on custom expressions and content filters. ([source](https://docs.iyear.me/tdl/guide/forward/))
- [Transfer Optimization](https://awesome-repositories.com/f/networking-communication/transfer-optimization.md) — Implements a high-bandwidth optimization system for faster file retrieval from account sessions. ([source](https://cdn.jsdelivr.net/gh/iyear/tdl@master/README.md))

### System Administration & Monitoring

- [Account Automation Frameworks](https://awesome-repositories.com/f/system-administration-monitoring/account-management-apis/account-automation-frameworks.md) — Provides a programmable interface to automate Telegram account interactions, message forwarding, and file routing.
- [Download History Archives](https://awesome-repositories.com/f/system-administration-monitoring/duplicate-file-finders/download-history-archives.md) — Prevents redundant downloads by tracking processed media identifiers and comparing file sizes. ([source](https://docs.iyear.me/tdl/guide/download/))

### Artificial Intelligence & ML

- [Local Chat Archiving](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-history-apis/local-chat-archiving.md) — Provides capabilities for exporting chat history and media to local JSON files for archival.

### Business & Productivity Software

- [Telegram Media Downloader](https://awesome-repositories.com/f/business-productivity-software/media-downloaders/telegram-media-downloader.md) — Provides a command-line utility to download media and files from Telegram using account sessions.
- [Member Detail Retrieval](https://awesome-repositories.com/f/business-productivity-software/team-member-management/chat-member-administration/member-detail-retrieval.md) — Extracts detailed lists of subscribers, administrators, and bots from chats using administrative permissions. ([source](https://docs.iyear.me/tdl/guide/tools/export-members/))

### Content Management & Publishing

- [Chat Content Extractors](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-architecture-modeling/content-organization-systems/media-content-managers/chat-media-management/chat-content-extractors.md) — Fetches media and files from protected or public chats and saves them to local storage. ([source](https://docs.iyear.me/tdl/more/cli/tdl))
- [Content Migration Tools](https://awesome-repositories.com/f/content-management-publishing/content-management-systems/content-migration-tools.md) — Implements tools for migrating messages and media between different Telegram chats.
- [Restricted Content Downloaders](https://awesome-repositories.com/f/content-management-publishing/community-content-feeds/community-content-downloaders/restricted-content-downloaders.md) — Enables the retrieval of files from private or restricted chats using direct message links and authenticated sessions. ([source](https://docs.iyear.me/tdl/guide/download/))

### Data & Databases

- [Identity](https://awesome-repositories.com/f/data-databases/namespace-isolation/identity.md) — Assigns different accounts to specific namespaces to isolate identity data and authentication sessions. ([source](https://docs.iyear.me/tdl/guide/global-config/))
- [Structured Data Extraction](https://awesome-repositories.com/f/data-databases/structured-data-extraction.md) — Extracts chat history, member lists, and subscriber information into structured JSON files. ([source](https://cdn.jsdelivr.net/gh/iyear/tdl@master/README.md))
- [Data Backup Solutions](https://awesome-repositories.com/f/data-databases/data-backup-solutions.md) — Exports messages and files to a backup archive to preserve information and prevent data loss. ([source](https://docs.iyear.me/tdl/more/cli/tdl))
- [Storage Driver Abstractions](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/storage-driver-abstractions.md) — Implements interchangeable storage backends to manage how configuration and session data are persisted to disk.

### DevOps & Infrastructure

- [Logic-Based Upload Routing](https://awesome-repositories.com/f/devops-infrastructure/file-uploaders/logic-based-upload-routing.md) — Directs files to different destination chats based on custom logic and file metadata. ([source](https://docs.iyear.me/tdl/guide/upload/))
- [Telegram Uploaders](https://awesome-repositories.com/f/devops-infrastructure/file-uploaders/telegram-uploaders.md) — Ships a tool for sending local files and directories to Telegram with metadata-based routing.
- [Telegram Uploads](https://awesome-repositories.com/f/devops-infrastructure/file-uploaders/telegram-uploads.md) — Enables the upload of files and directories to specific Telegram chats, saved messages, or forum topics. ([source](https://cdn.jsdelivr.net/gh/iyear/tdl@master/README.md))

### Graphics & Multimedia

- [Telegram Media Management](https://awesome-repositories.com/f/graphics-multimedia/telegram-media-management.md) — Enables comprehensive downloading and uploading of files, photos, and videos to and from Telegram.
- [Album Group Downloads](https://awesome-repositories.com/f/graphics-multimedia/media-processing-analysis/media-downloaders/album-group-downloads.md) — Automatically detects and downloads all files associated with a media album as a single group. ([source](https://docs.iyear.me/tdl/guide/download/))

### Security & Cryptography

- [Account Session Managers](https://awesome-repositories.com/f/security-cryptography/account-session-managers.md) — Manages multiple authenticated Telegram account identities and isolates them via namespaces.
- [Persistent Session Managers](https://awesome-repositories.com/f/security-cryptography/user-account-management/persistent-session-managers.md) — Maintains persistent authentication tokens and session state for programmatic account access. ([source](https://docs.iyear.me/tdl/more/cli/tdl))
- [Session Isolations](https://awesome-repositories.com/f/security-cryptography/user-account-management/session-isolations.md) — Isolates authentication state and session data to allow multiple Telegram accounts to operate simultaneously.
- [API Rate Limit Management](https://awesome-repositories.com/f/security-cryptography/request-size-limiters/request-limiters/request-throttling/client-request-quotas/api-rate-limit-management.md) — Manages outgoing API request frequency using programmable delays to avoid account bans.

### Part of an Awesome List

- [File Naming and Destination Templates](https://awesome-repositories.com/f/awesome-lists/media/downloaders-and-managers/file-naming-and-destination-templates.md) — Applies customizable naming patterns to saved files based on metadata for better organization. ([source](https://docs.iyear.me/tdl/guide/download/))
- [Extension-Based Download Filters](https://awesome-repositories.com/f/awesome-lists/media/downloaders/extension-based-download-filters.md) — Restricts downloads to a specific list of allowed file extensions or excludes forbidden ones. ([source](https://docs.iyear.me/tdl/guide/download/))

### Development Tools & Productivity

- [Tool Integration Plug-ins](https://awesome-repositories.com/f/development-tools-productivity/tool-integration-plug-ins.md) — Provides a modular system for extending core tool capabilities via third-party plug-ins.

### Operating Systems & Systems Programming

- [Metadata Template Resolvers](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-systems/file-template-generators/dynamic-file-name-resolvers/metadata-template-resolvers.md) — Transforms resource metadata using templates to generate standardized and organized file names.

### Software Engineering & Architecture

- [Third-Party Plugins](https://awesome-repositories.com/f/software-engineering-architecture/integration-extensibility/extensibility/third-party-plugins.md) — Integrates external add-on modules to extend the tool's functionality without altering core code. ([source](https://docs.iyear.me/tdl/guide/extensions/))
- [Expression-Based Captions](https://awesome-repositories.com/f/software-engineering-architecture/metadata-attachments/image-captions/dynamic-media-captions/expression-based-captions.md) — Assigns captions to uploaded files using dynamic expressions that incorporate file metadata and custom styling. ([source](https://docs.iyear.me/tdl/guide/upload/))

### User Interface & Experience

- [Message Forwarding Utilities](https://awesome-repositories.com/f/user-interface-experience/chat-message-utilities/message-forwarding-utilities.md) — Relays and routes messages between Telegram chats with support for dynamic captioning.
