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.1(1mo ago)3381MITPHPPHP ^8.0

Since Aug 14Pushed 1mo 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 today

READMEChangelog (4)Dependencies (8)Versions (5)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

42

—

FairBetter than 88% of packages

Maintenance91

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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 ~92 days

Total

4

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6817390?v=4)[R. Leroi](/maintainers/rleroi)[@rleroi](https://github.com/rleroi)

---

Top Contributors

[![rleroi](https://avatars.githubusercontent.com/u/6817390?v=4)](https://github.com/rleroi "rleroi (7 commits)")[![maseh87](https://avatars.githubusercontent.com/u/2942583?v=4)](https://github.com/maseh87 "maseh87 (1 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.7k9.5M89](/packages/openai-php-laravel)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

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

1.7k409.0k6](/packages/theodo-group-llphant)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[resend/resend-php

Resend PHP library.

617.2M43](/packages/resend-resend-php)[mozex/anthropic-laravel

Laravel integration for the Anthropic API: facade, config publishing, install command, testing fakes, messages, streaming, tool use, thinking, and batches.

74331.3k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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