A modern, fast, and lightweight BitTorrent client for the command line.
Features β’ Installation β’ Usage β’ Development β’ Contributing
btget is a command-line BitTorrent client designed for speed and ease of use. It allows you to download files from .torrent files directly, with real-time progress and a focus on efficiency. The interface is designed to be intuitive, allowing you to use it directly like wget or with explicit commands like download and info.
- β‘ High Performance: Built on Bun for a fast startup and optimized runtime performance.
- π DHT Support: Tracker-less peer discovery using the Distributed Hash Table (BEP 0005).
- π§ Smart Peer Management: Intelligent connection pooling and download speed tracking.
- π‘οΈ Resilient Downloads: End-to-end data integrity verification with SHA-1 hashing.
- π Real-Time Progress: A clean interface showing download speed, peer count, and progress bars.
- π― Multi-Tracker Support: Connects to multiple trackers to ensure reliable peer discovery.
- π Multi-File Torrents: Seamlessly handles torrents containing multiple files and complex directory structures.
- π Torrent Inspector: Allows viewing detailed information about a
.torrentfile without starting the download. - π¦ Cross-Platform: A single executable that runs on Windows, macOS, and Linux.
- Node.js: Required for using
npmornpx. - Bun: Required for development and building from source.
For most users, global installation via npm is the simplest method.
npm install -g btget# Download a torrent to a specified output directory
btget my-file.torrent -o ./downloads
# View details about a torrent file
btget info ubuntu.torrent
# Get help on commands
btget --helpThis makes the btget command available system-wide.
npm install -g btgetThis installs btget in your current project for programmatic use or testing.
npm install btget
npx btget my-file.torrentBuild the project directly for development or contributing.
git clone https://github.com/UtkarshTheDev/btget.git
cd btget
bun install
bun run build
./dist/index.js --helpTo download a torrent, provide the path to the .torrent file. You can use the command directly (like wget) or with the download subcommand.
# Direct usage
btget <torrent-file> [options]
# Command-based usage
btget download <torrent-file> [options]
# Options
-o, --output <directory> Output directory (default: current directory)
--dht-only Use only DHT for peer discovery (disable trackers)
-h, --help Show helpExamples:
# Download to the current directory
btget movie.torrent
# Download to a specific directory
btget ubuntu.torrent -o ~/Downloads
# Download using only DHT (useful for testing or privacy)
btget ubuntu.torrent --dht-onlyFor debugging, use --debug, --verbose, or --trace flags:
btget file.torrent -o output --debug # Basic debugging
btget file.torrent -o output --verbose # Detailed logs
btget file.torrent -o output --trace --log-category=UPLOAD # Filter by categoryπ See docs/LOGGING.md for complete logging documentation.
To inspect the contents and metadata of a .torrent file without downloading:
btget info <torrent-file>Example:
btget info movie.torrent
# Example Output:
# π Torrent Information:
# Name: Big Buck Bunny
# Size: 158.31 MB
# Files: 1
# Piece Length: 65536 bytes
# Number of Pieces: 2417
# Main Tracker: http://tracker.example.com/announceFor development setup, available scripts, and contribution guidelines, see CONTRIBUTING.md.
git clone https://github.com/UtkarshTheDev/btget.git
cd btget
bun install
bun run build- Resume Downloads: Continue interrupted downloads (Auto-resume supported).
- Seeding Support: Share completed downloads.
- Bandwidth Limiting: Control upload/download speeds.
- Magnet Link Support: Download directly from magnet links.
- DHT Support: Peer discovery via Distributed Hash Table.
- Protocol Encryption: Encrypt peer communication for privacy.
- JSON Configuration: Support for configuring BitTorrent connections and other settings via a JSON file.
We welcome contributions! Please see our Contributing Guide for details on how to get started.
- Fork the repository.
- Clone your fork:
git clone https://github.com/yourusername/btget.git - Create a branch:
git checkout -b feature/amazing-feature - Make your changes.
- Test your changes:
bun test - Commit your changes:
git commit -m 'Add amazing feature' - Push to your fork:
git push origin feature/amazing-feature - Submit a Pull Request.
- π Bug Fixes: Help squash bugs and improve stability.
- β¨ New Features: Implement items from the roadmap.
- π Documentation: Improve guides and examples.
- π§ͺ Testing: Add unit or integration tests.
- β‘ Performance: Find and implement further optimizations.
This project is licensed under the MIT License. See the LICENSE file for details.
- BitTorrent Protocol: Bram Cohen and the BitTorrent community.
- Bun: The amazing Bun team for incredible performance.
- TypeScript: Microsoft and the TypeScript team.
- Open Source Community: All contributors and supporters.
Made with β€οΈ by UtkarshTheDev and contributors