surgery

Crates.iosurgery
lib.rssurgery
version1.2.0
created_at2025-12-15 05:54:53.166758+00
updated_at2026-01-01 03:13:54.998599+00
descriptionA simple CLI for Real Debrid
homepagehttps://github.com/dotzenith/surgery
repositoryhttps://github.com/dotzenith/surgery
max_upload_size
id1985616
size61,077
zenith (dotzenith)

documentation

README

━━━━ ❖ ━━━━



❖ Surgery

Surgery is a simple CLI to interact with Real Debrid. The aim is to allow users to fuzzy match and download torrents from their Real Debrid account.


❖ Requirements

  1. Ensure curl is installed
  2. Set the following environment variables:
# You likely do not need to change this
# also note the lack of trailing slash
export RD_BASE_URL="https://api.real-debrid.com/rest/1.0"

# Available at: https://real-debrid.com/apitoken
export RD_API_KEY=""

❖ Installation

Shell

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dotzenith/surgery/releases/latest/download/surgery-installer.sh | sh

Brew

brew install dotzenith/tap/surgery

Powershell

powershell -ExecutionPolicy ByPass -c "irm https://github.com/dotzenith/surgery/releases/latest/download/surgery-installer.ps1 | iex"

Cargo

cargo install surgery

Binaries

Pre-Compiled binaries for linux, mac, and windows are available in Releases

Source

  • First, install rust
git clone https://github.com/dotzenith/surgery.git
cd surgery
cargo build --release
./target/release/srg

❖ Usage

A simple CLI for Real Debrid

Usage: srg [OPTIONS] <NAME>

Arguments:
  <NAME>  torrent name for fuzzy matching (required)

Options:
  -b, --best     Download the best matching torrent for the provided name
  -a, --all      Download all files for the selected torrent
  -h, --help     Print help
  -V, --version  Print version

Normal Usage

srg "debian" # torrent names are fuzzy matched
  • This will prompt the user to select a specific torrent if there is more than one match
  • This will also prompt the user to select a range if the torrent has multiple files

Pick the best matched torrent

srg "ubuntu" --best
  • This will pick the torrent that best matches the search string
  • This will still prompt the user to select a range if the torrent has multiple files

Download all files for a given torrent

srg "arch" --all
  • This will prompt the user to select a specific torrent if there is more than one match
  • This will download all files for the selected torrent

srg "gentoo" --best --all
  • This will pick the best matched torrent, and download all files

❖ What's New?

1.2.0 - Use skimple for fuzzy matching and use rustyline for user input


Commit count: 0

cargo fmt