PHPackages                             rleroi/debrid - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rleroi/debrid

ActiveLibrary[API Development](/categories/api)

rleroi/debrid
=============

A PHP library for interacting with multiple debrid services (Real-Debrid, AllDebrid, Premiumize, TorBox, DebridLink) to download and stream torrent content with a unified API.

v1.2.0(4mo ago)3261MITPHPPHP ^8.0

Since Aug 14Pushed 4mo ago2 watchersCompare

[ Source](https://github.com/rleroi/debrid-php)[ Packagist](https://packagist.org/packages/rleroi/debrid)[ Docs](https://github.com/rleroi/debrid-php)[ GitHub Sponsors](https://github.com/sponsors/rleroi)[ RSS](/packages/rleroi-debrid/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Debrid Library
==============

[](#debrid-library)

A PHP library for interacting with debrid services (Real-Debrid, AllDebrid, Premiumize, TorBox, DebridLink) to download and stream torrent content.

Installation
------------

[](#installation)

```
composer require rleroi/debrid
```

Quick Start
-----------

[](#quick-start)

```
use RLeroi\Debrid\Client;

function getLink(Client $client, string $magnet): ?string
{
  // 1 add magnet (required for RealDebrid)
  if ($client instanceof RLeroi\Debrid\Clients\RealDebridClient) {
    $client->addMagnet($magnet);
  }

  // 2. get all files
  $files = $client->getCachedFiles($magnet);

  if (!count($files)) {
    return null;
  }

  // 3. get stream/download link for a specific file
  return $client->getLink($magnet, $files[0]->path);
}

$client = (new Client())
    ->setClientPremiumize('your-token');
$magnet = 'magnet:?xt=urn:btih:34FF1FAE9661D72152FB1FC31E27C15297072654&dn=example+torrent';

getLink($client, $magnet);
```

Supported Services
------------------

[](#supported-services)

```
// Real-Debrid -- Note: Real-Debrid requires addMagnet() before calling getCachedFiles()
$client->setClientRealDebrid('token');

// AllDebrid
$client->setClientAllDebrid('token');

// Premiumize
$client->setClientPremiumize('token');

// TorBox
$client->setClientTorBox('token');

// DebridLink (TODO)
//$client->setClientDebridLink('token');
```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance74

Regular maintenance activity

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~68 days

Total

3

Last Release

140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/98cfd20df2fb2e4ce76e7973b74e2e554cb662067352d5a2cacd378f14173928?d=identicon)[rleroi](/maintainers/rleroi)

---

Top Contributors

[![rleroi](https://avatars.githubusercontent.com/u/6817390?v=4)](https://github.com/rleroi "rleroi (7 commits)")

---

Tags

phpapistreamingdownloadtorrentalldebriddebridreal-debridpremiumizetorboxdebridlink

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rleroi-debrid/health.svg)

```
[![Health](https://phpackages.com/badges/rleroi-debrid/health.svg)](https://phpackages.com/packages/rleroi-debrid)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[hubspot/api-client

Hubspot API client

23914.2M16](/packages/hubspot-api-client)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[fennb/phirehose

A PHP interface to the Twitter Streaming API.

698402.4k3](/packages/fennb-phirehose)[resend/resend-php

Resend PHP library.

574.7M21](/packages/resend-resend-php)[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
