A blazing-fast, modern BitTorrent client for the command line
npm install btget!Demo
!BitTorrent CLI
!TypeScript
!Bun
!Node.js
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 .torrent file without starting the download.
- ๐ฆ Cross-Platform: A single executable that runs on Windows, macOS, and Linux.
- Node.js: Required for using npm or npx.
- Bun: Required for development and building from source.
For most users, global installation via npm is the simplest method.
``bash`
npm install -g btget
`bashDownload a torrent to a specified output directory
btget my-file.torrent -o ./downloads
๐ฆ Installation
$3
This makes the
btget command available system-wide.`bash
npm install -g btget
`$3
This installs
btget in your current project for programmatic use or testing.`bash
npm install btget
npx btget my-file.torrent
`$3
Build the project directly for development or contributing.
`bash
git clone https://github.com/UtkarshTheDev/btget.git
cd btget
bun install
bun run build
./dist/index.js --help
`๐ Usage
$3
To download a torrent, provide the path to the
.torrent file. You can use the command directly (like wget) or with the download subcommand.`bash
Direct usage
btget [options]Command-based usage
btget download [options]Options
-o, --output Output directory (default: current directory)
--dht-only Use only DHT for peer discovery (disable trackers)
-h, --help Show help
`Examples:
`bash
Download to the current directory
btget movie.torrentDownload to a specific directory
btget ubuntu.torrent -o ~/DownloadsDownload using only DHT (useful for testing or privacy)
btget ubuntu.torrent --dht-only
`$3
For debugging, use
--debug, --verbose, or --trace flags:`bash
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.
$3
To inspect the contents and metadata of a
.torrent file without downloading:`bash
btget info
`Example:
`bash
btget info movie.torrentExample 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/announce
`๐ ๏ธ Development
For development setup, available scripts, and contribution guidelines, see CONTRIBUTING.md.
`bash
git clone https://github.com/UtkarshTheDev/btget.git
cd btget
bun install
bun run build
`๐ Roadmap
- [ ] Resume Downloads: Continue interrupted downloads (Auto-resume supported).
- [x] Seeding Support: Share completed downloads.
- [ ] Bandwidth Limiting: Control upload/download speeds.
- [ ] Magnet Link Support: Download directly from magnet links.
- [x] 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.
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details on how to get started.
$3
1. Fork the repository.
2. Clone your fork:
git clone https://github.com/yourusername/btget.git
3. Create a branch: git checkout -b feature/amazing-feature
4. Make your changes.
5. Test your changes: bun test
6. Commit your changes: git commit -m 'Add amazing feature'
7. Push to your fork: git push origin feature/amazing-feature`- ๐ 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.

!GitHub stars
!GitHub forks
!GitHub issues
!GitHub pull requests
---
Made with โค๏ธ by UtkarshTheDev and contributors