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.
- Ensure curl is installed
- 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=""curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dotzenith/surgery/releases/latest/download/surgery-installer.sh | shbrew install dotzenith/tap/surgerypowershell -ExecutionPolicy ByPass -c "irm https://github.com/dotzenith/surgery/releases/latest/download/surgery-installer.ps1 | iex"cargo install surgeryPre-Compiled binaries for linux, mac, and windows are available in Releases
- First, install rust
git clone https://github.com/dotzenith/surgery.git
cd surgery
cargo build --release
./target/release/srgA 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
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
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
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
1.2.0 - Use skimple for fuzzy matching and use rustyline for user input