Installation

Installation #

One-Line Scripts #

tdl will be installed to $Env:SystemDrive\tdl(will be added to PATH), and script also can be used to upgrade tdl .

Install latest version #

iwr -useb https://docs.iyear.me/tdl/install.ps1 | iex

Install with ghproxy.com #

$Script=iwr -useb https://docs.iyear.me/tdl/install.ps1;
$Block=[ScriptBlock]::Create($Script); Invoke-Command -ScriptBlock $Block -ArgumentList "", "$True"

Install specific version #

$Env:TDLVersion = "VERSION"
$Script=iwr -useb https://docs.iyear.me/tdl/install.ps1;
$Block=[ScriptBlock]::Create($Script); Invoke-Command -ScriptBlock $Block -ArgumentList "$Env:TDLVersion"

tdl will be installed to /usr/local/bin/tdl, and script also can be used to upgrade tdl.

Install latest version #

curl -sSL https://docs.iyear.me/tdl/install.sh | sudo bash

Install with ghproxy.com #

curl -sSL https://docs.iyear.me/tdl/install.sh | sudo bash -s -- --proxy

Install specific version #

curl -sSL https://docs.iyear.me/tdl/install.sh | sudo bash -s -- --version VERSION

Package Managers #

brew install telegram-downloader
scoop bucket add extras
scoop install telegram-downloader
pkg install tdl
yay -S tdl

nix-env #

nix-env -iA nixos.tdl

NixOS-Configuration #

environment.systemPackages = [
    pkgs.tdl
];

nix-shell #

nix-shell -p tdl

Packaging status

Prebuilt Binaries #

  1. Download the archive for the desired operating system, and architecture:
  1. Extract the archive
  2. Move the executable to the desired directory
  3. Add this directory to the PATH environment variable
  4. Verify that you have execute permission on the file

Source #

To build the extended edition of tdl from source you must:

  1. Install Git
  2. Install Go version 1.21 or later
  3. Update your PATH environment variable as described in the Go documentation
The installation directory is controlled by the GOPATH and GOBIN environment variables. If GOBIN is set, binaries are installed to that directory. If GOPATH is set, binaries are installed to the bin subdirectory of the first directory in the GOPATH list. Otherwise, binaries are installed to the bin subdirectory of the default GOPATH ($HOME/go or %USERPROFILE%\go).

Then build:

go install github.com/iyear/tdl@latest
tdl version