tor-dl
v1.0.19
Published
CLI torrent search tool - search, open in browser, copy magnet links
Downloads
2,160
Readme
tor-dl
A CLI torrent search tool. Search across multiple sources, open .torrent in browser, or copy magnet links to clipboard.
Quick Start
# Run without installation (requires Node.js)
npx tor-dl search "movie title"
# Install globally for easy use
npm install -g tor-dl
tor-dl search "movie title"
# Copy magnet link to clipboard
tor-dl o 3
# Show version
tor-dl --versionCommands
search
Search for torrents across multiple sources.
tor-dl search <query> [options]Options:
| Flag | Description | Example |
|------|-------------|---------|
| -c, --cat <category> | Category to filter results | all, movie, tv, anime, music, games, apps |
| -s, --min-seeds <number> | Minimum number of seeders | 100 |
| --max-seeds <number> | Maximum number of seeders | 1000 |
| --min-size <size> | Minimum file size | 500MB, 1GB, 2GB |
| --max-size <size> | Maximum file size | 5GB, 10GB |
| -o, --sort <field> | Sort results by field | seeds, size, date |
| --order <order> | Sort order | asc (low to high), desc (high to low) |
| -l, --limit <number> | Maximum results to return | 10, 50, 100 |
| -S, --sources <sources> | Sources to search (comma-separated) | yts,torrentscsv,thepiratebay,nyaa |
Available Categories:
all- Search all categoriesmovie- Moviestv- TV showsanime- Anime (mainly Nyaa)music- Musicgames- Gamesapps- Applications
Supported Sources
| Source | Categories | Description | |--------|------------|-------------| | yts | movie | Movie torrents with direct .torrent download | | torrentscsv | all | General torrent search | | thepiratebay | all | General torrent search | | nyaa | anime, tv | Anime and Japanese media |
Examples:
# Basic search
tor-dl search "Blade Runner 2049"
# Search movies with minimum seeds
tor-dl search "movie" --cat movie --min-seeds 100
# Search with size limits
tor-dl search "linux" --min-size 500MB --max-size 2GB
# Search specific sources only
tor-dl search "game" -S yts,thepiratebay
# Sort by size (smallest first)
tor-dl search "documentary" --sort size --order asc
# Limit results to top 10
tor-dl search "podcast" -l 10o
Copy .torrent URL or magnet link to clipboard for the selected result number.
tor-dl o <number>After running a search, enter the result number to copy the link to your clipboard.
Example:
tor-dl search "python tutorial"
# Results displayed...
tor-dl o 5
# Magnet link copied to clipboard!open
Same as o command - opens .torrent in browser or copies magnet link.
tor-dl open <number>Options
| Flag | Description |
|------|-------------|
| -v, --version | Show version number |
| -h, --help | Show help information |
Size Format
Size can be specified in various formats:
KB- KilobytesMB- MegabytesGB- GigabytesTB- Terabytes
Examples: 500MB, 1.5GB, 2GB
Requirements
- Node.js >= 18.0.0
- npm
- Transmission (optional, for Windows)
Local Installation
git clone https://github.com/eaeoz/tor-dl.git
cd tor-dl
npm install
npm run buildUsing with Windows Command Prompt
On Windows, if you add the tor-dl installation directory to your PATH environment variable, you can use it directly from the command line without needing to specify the full path each time.
Adding to PATH on Windows
- Press
Win + R, typesysdm.cpl, and press Enter - Go to Advanced tab → Environment Variables
- Under "User variables" or "System variables", find Path and click Edit
- Add the folder where
tor-dlis installed (e.g.,C:\Users\YourName\AppData\Roaming\npm) - Click OK and restart your command prompt
Quick Search Batch Script
Create a batch file (e.g., search.bat) in your PATH to quickly search for movies:
@echo off
if "%*"=="" (
echo Please provide a movie name.
exit /b
)
tor-dl search "%*" --min-size 700MB --max-size 3GB -s 5Usage:
search scream 7Install Transmission (Windows)
For Windows users, you can install Transmission client using winget:
winget install Transmission.TransmissionOr download directly from the official website:
- Windows: https://transmissionbt.com/download
After installation, you can open magnet links directly in Transmission.
Transfer to Mobile/Tablet/Apple TV
After your download completes in Transmission, you can transfer the file directly to VLC on your mobile device, tablet, or Apple TV using WiFi transfer.
- If devices in different subnets: To connect to devices on different networks, port forwarding or routing must be configured on the network device which placed between them
Prerequisites
- Set a Static IP on your mobile device/tablet/Apple TV to ensure the IP address doesn't change
- Enable WiFi transfer on your device (VLC for iOS/Android has built-in WiFi transfer feature)
Setting Static IP
- Mobile/Tablet: Settings → WiFi → Long press your network → Modify Network → Set static IP
- Apple TV: Settings → Network → Configure IP manually (or use DHCP with reserved IP on your router)
Upload Script
Place upload.bat in the same folder where you added to your search script mentioned above PATH (or any folder in your PATH):
@echo off
if "%~1"=="" (
echo Usage: upload.bat "full\path\to\file.mp4"
echo Drag and drop a file onto the script also works.
exit /b 1
)
set "FILE=%~1"
set "REMOTE=http://192.168.1.232/upload.json"
if not exist "%FILE%" (
echo Error: File not found: "%FILE%"
exit /b 1
)
echo Uploading: %~nx1
curl --progress-bar -F "file=@%FILE%" "%REMOTE%" -o NUL
if %errorlevel%==0 (
echo Upload complete.
) else (
echo Upload failed. Check connection or server.
)Note: Replace 192.168.1.222 with your device's actual IP address.
Usage
upload "C:\Users\YourName\Downloads\movie.mp4"Author
Sedat ERGOZ @eaeoz
License
MIT License
Disclaimer
This tool is for educational purposes. Always respect copyright laws and the terms of service of torrent sites.
