Help us shape the future of Go! Take the 2026 Go Developer Survey

tdm

command module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 18 Imported by: 0

README ยถ

TDM

๐Ÿš€ TDM (Terminal Download Manager)

Build Status Go Report Card

TDM is a cross-platform, multi protocol fast and lightweight download manager that runs directly in your terminal. Designed for efficiency and ease of use, TDM provides a powerful solution for downloading files with advanced capabilities.

TDM Terminal Interface

Multi Protocol

  • HTTP/HTTPS

    • Multi-connection chunked downloads
    • Automatic fallback to a single connection for unsupported servers
  • BitTorrent (paste the url that downloads the .torrent file or the magnet link)

    • Torrent file links and magnet links support
    • Peer discovery and management
    • Seeding capabilities
    • Tracker support
    • DHT and PEX support
Download Management
  • Priority based download queueing system
  • Pause, resume, cancel, and delete for all downloads
  • Comprehensive download status tracking

๐Ÿ› ๏ธ Installation

Homebrew (macOS / Linux)
brew install NamanBalaji/tap/tdm
AUR (Arch Linux) โ€” coming soon
yay -S tdm-bin
Scoop (Windows)
scoop bucket add tdm https://github.com/NamanBalaji/scoop-bucket
scoop install tdm
deb / rpm / apk

Download the package for your platform from the releases page, then e.g.:

sudo dpkg -i tdm_*_linux_amd64.deb   # Debian/Ubuntu
sudo rpm -i tdm_*_linux_amd64.rpm    # Fedora/RHEL
Go
go install github.com/NamanBalaji/tdm@latest
Pre-built Binaries

Download the archive for your platform from the releases page, extract it, and move the binary onto your PATH:

tar xzf tdm_*_linux_amd64.tar.gz
sudo mv tdm /usr/local/bin/tdm
Install from Source
git clone https://github.com/NamanBalaji/tdm.git
cd tdm
go build
./tdm

๐Ÿ”ง Configuration

TDM offers extensive configuration options via a YAML file or CLI flags.

Config File

Create a config file at ~/.config/tdm (on Linux/macOS) or %LOCALAPPDATA%/tdm (on Windows).

Here is an example configuration with default values:

maxConcurrentDownloads: 3

http:
  dir: "/User/Downloads" # Default: User's download directory
  tempDir: "/tmp/tdm" # Default: System temp dir/tdm
  connections: 8 # Connections per download
  maxChunks: 32 # Split download into chunks
  maxRetries: 3 # Retries per chunk failure
  retryDelay: 2s # Delay between retries

torrent:
  dir: "/User/Downloads" # Default: User's download directory
  seed: true # Enable seeding
  establishedConnectionsPerTorrent: 50 # Max established peers per torrent
  halfOpenConnectionsPerTorrent: 25 # Max half-open connections
  totalHalfOpenConnections: 100 # Global max half-open connections
  disableDht: false # Enable/Disable DHT
  disablePex: false # Enable/Disable Peer Exchange
  disableTrackers: false # Enable/Disable Trackers
  disableIPv6: false # Enable/Disable IPv6
  metainfoTimeout: 60s # Timeout for fetching metadata
CLI Flags

CLI flags override config file values.

Flag Description
-urls Path to a file containing URLs separated by space
-mcd Max number of concurrent downloads
-dd Path to the directory for storing new downloads
-td Path to temporary directory for storing HTTP chunks
-conn Number of parallel connections for HTTP downloads
-c Number of chunks a HTTP download will be split into
-mr Maximum number of retries before a chunk fails
-ns Disable seeding for torrents
-np Disable Peer Exchange (PEX) for torrents
-nd Disable DHT for torrents

๐Ÿ—‚๏ธ Upcoming Features

  • yt-dlp integration
  • FTP protocol support
  • SFTP protocol support
  • TUI improvements

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull RequestMsg.

Development Setup
  1. Clone the repository
  2. Install dependencies: go mod download
  3. Run tests: go test ./...
  4. Build: go build

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
download
Package download defines the core data model for downloads.
Package download defines the core data model for downloads.
logger
Package logger configures the process-wide slog default logger.
Package logger configures the process-wide slog default logger.
manager
Package manager orchestrates download lifecycle, scheduling, and persistence.
Package manager orchestrates download lifecycle, scheduling, and persistence.
store
Package store defines the persistence interface for downloads.
Package store defines the persistence interface for downloads.
store/boltdb
Package boltdb implements the store interface using BoltDB.
Package boltdb implements the store interface using BoltDB.
tui
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL