npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

btget

v1.1.1

Published

A blazing-fast, modern BitTorrent client for the command line

Downloads

251

Readme

🚀 btget - BitTorrent Get CLI

BitTorrent CLI TypeScript Bun Node.js

A modern, fast, and lightweight BitTorrent client for the command line.

FeaturesInstallationUsageDevelopmentContributing

CI npm version npm downloads GitHub release License: MIT


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.

🌟 Features

  • 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.

✅ Prerequisites

  • Node.js: Required for using npm or npx.
  • Bun: Required for development and building from source.

🚀 Quick Start

For most users, global installation via npm is the simplest method.

npm install -g btget

Usage

# 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 --help

📦 Installation

Option 1: Global Installation (Recommended)

This makes the btget command available system-wide.

npm install -g btget

Option 2: Local Installation

This installs btget in your current project for programmatic use or testing.

npm install btget
npx btget my-file.torrent

Option 3: From Source

Build 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 --help

📖 Usage

Download Command

To 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 help

Examples:

# 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-only

Debugging and Logging

For 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.

Info Command

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/announce

🛠️ Development

For 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

📋 Roadmap

  • [x] 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.
  • [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.

Contribution Workflow

  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
  8. Submit a Pull Request.

Areas for Contribution

  • 🐛 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.

📄 License

This project is licensed under the MIT License. See the LICENSE file for details.

🙏 Acknowledgments

  • 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.

📊 Stats

Star History Chart

GitHub stars GitHub forks GitHub issues GitHub pull requests


⬆ back to top

Made with ❤️ by UtkarshTheDev and contributors