PHPackages                             pkgdist/pkgdist-client - 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. pkgdist/pkgdist-client

ActiveLibrary[API Development](/categories/api)

pkgdist/pkgdist-client
======================

Client for the PKG-DIST api

1.1.0(1mo ago)0907GPL-3.0-onlyPHPPHP ^8.2

Since May 9Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/pkg-dist/pkgdist-client)[ Packagist](https://packagist.org/packages/pkgdist/pkgdist-client)[ RSS](/packages/pkgdist-pkgdist-client/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

pkgdist-client
==============

[](#pkgdist-client)

PHP client for the [PKG-DIST](https://pkg-dist.com) API. Built for Laravel — auto-discovers, exposes a small `Package` class, and adds an `Http::pkgdist()` macro.

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `^10`, `^11`, `^12`, or `^13`

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

[](#installation)

```
composer require pkgdist/pkgdist-client
```

The service provider is auto-discovered. No manual registration needed.

### Configuration

[](#configuration)

Set the endpoint base host in your `.env`:

```
PKGDIST_CLIENT_ENDPOINT=pkg-dist.com
```

Optionally publish the config to override it directly:

```
php artisan vendor:publish --tag=config --provider="Pkgdist\Client\ClientServiceProvider"
```

```
// config/pkgdist-client.php
return [
    'endpoint' => env('PKGDIST_CLIENT_ENDPOINT'),
];
```

Usage
-----

[](#usage)

### Loading a package

[](#loading-a-package)

```
use Pkgdist\Client\Package;

$package = Package::load(
    package: 'vendor/package-name',
    slug: 'your-tenant-slug',
    token: 'your-license-token',
);
```

The `slug` is combined with the configured endpoint to form the API base URL — e.g. `https://your-tenant-slug.pkg-dist.com/api`.

### Fetching changelogs

[](#fetching-changelogs)

`changelogs()` returns an `Illuminate\Support\Collection` of `Changelog` objects:

```
$changelogs = $package->changelogs();

foreach ($changelogs as $changelog) {
    echo $changelog->version;     // e.g. "1.2.0"
    echo $changelog->content;     // markdown release notes
    echo $changelog->created_at;  // ISO-8601 timestamp
}
```

Because it's a Laravel `Collection`, you can chain the usual helpers:

```
$latest = $package->changelogs()->first();

$recent = $package->changelogs()
    ->sortByDesc('created_at')
    ->take(5);
```

### The `Http::pkgdist()` macro

[](#the-httppkgdist-macro)

The service provider registers a macro on Laravel's HTTP client that pre-configures the base URL, so you can make ad-hoc requests against the API without instantiating `Package`:

```
use Illuminate\Support\Facades\Http;

$response = Http::pkgdist()
    ->withToken($licenseToken)
    ->get('some/endpoint');
```

Testing
-------

[](#testing)

```
composer test
```

Tests use [Pest](https://pestphp.com/) and [Orchestra Testbench](https://packages.tools/testbench).

License
-------

[](#license)

GPL-3.0-only. See [LICENSE](LICENSE).

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance92

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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 ~746 days

Total

2

Last Release

38d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6506510?v=4)[Sebastiaan Kloos](/maintainers/SebastiaanKloos)[@SebastiaanKloos](https://github.com/SebastiaanKloos)

---

Top Contributors

[![SebastiaanKloos](https://avatars.githubusercontent.com/u/6506510?v=4)](https://github.com/SebastiaanKloos "SebastiaanKloos (6 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/pkgdist-pkgdist-client/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[rapidez/core

Rapidez Core

1823.5k72](/packages/rapidez-core)

PHPackages © 2026

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