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
Docker #
Available images:
Available tags:
latest
(default): The latest stable releaseX.Y.Z
: A specific version oftdl
To run tdl
in one-off command:
docker run --rm -it iyear/tdl <ARGUMENTS>
Further, to keep config persistent, you can mount the config directory:
docker run --rm -it \
-v $HOME/.tdl:/root/.tdl \
iyear/tdl <ARGUMENTS>
To get download files, you can mount the download and other directories as needed:
docker run --rm -it \
-v $HOME/.tdl:/root/.tdl \
-v $HOME/Downloads:/downloads \
iyear/tdl <ARGUMENTS>
To run tdl
inside the container shell:
docker run --rm -it <FLAGS> --entrypoint sh iyear/tdl
Preview output
/ # tdl version
Version: 0.17.7
Commit: ace2402
Date: 2024-11-01T14:40:56+08:00
go1.21.13 linux/amd64
/ #
To use proxy with localhost
address, run it with host
network:
docker run --rm -it <FLAGS> --network host iyear/tdl <ARGUMENTS>
Run tdl
with Docker Compose to avoid typing docker run
flags each time.
docker-compose.yml
Example configuration uses Docker Compose v2 syntax.
services:
tdl:
image: iyear/tdl # or specify X.Y.Z tag for a specific version
volumes:
- $HOME/.tdl:/root/.tdl # keep config persistent
- $HOME/Downloads:/downloads # optional
# - /path/to/your/need:/path/in/container
stdin_open: true
tty: true
# use host network if you need to use proxy with localhost address
network_mode: host
Run tdl
with Docker Compose:
docker compose run --rm tdl <ARGUMENTS>
To run tdl
inside the container shell:
docker compose run --rm --entrypoint sh tdl
Preview output
/ # tdl version
Version: 0.17.7
Commit: ace2402
Date: 2024-11-01T14:40:56+08:00
go1.21.13 linux/amd64
/ #
Prebuilt Binaries #
- Download the archive for the desired operating system, and architecture:
- Extract the archive
- Move the executable to the desired directory
- Add this directory to the PATH environment variable
- Verify that you have execute permission on the file
Source #
To build the extended edition of tdl
from source you must:
- Install Git
- Install Go version 1.21 or later
- Update your
PATH
environment variable as described in the Go documentation
The installation directory is controlled by theGOPATH
andGOBIN
environment variables. IfGOBIN
is set, binaries are installed to that directory. IfGOPATH
is set, binaries are installed to thebin
subdirectory of the first directory in theGOPATH
list. Otherwise, binaries are installed to thebin
subdirectory of the defaultGOPATH
($HOME/go
or%USERPROFILE%\go
).
Then build:
go install github.com/iyear/tdl@latest
tdl version