PHPackages                             artisan-build/matte-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. artisan-build/matte-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

artisan-build/matte-client
==========================

The client-side Matte package installed in consuming Laravel applications.

v2.1.0(1mo ago)083MITPHPPHP ^8.3

Since Jun 14Pushed 1mo agoCompare

[ Source](https://github.com/artisan-build/matte-client)[ Packagist](https://packagist.org/packages/artisan-build/matte-client)[ RSS](/packages/artisan-build-matte-client/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (16)Versions (5)Used By (0)

matte-client
============

[](#matte-client)

The **send side** of [Matte](https://github.com/artisan-build/matte) — **self-hosted, unmetered image background removal on Laravel Cloud.** Install it in any Laravel app to call your self-hosted Matte server with one line: `Matte::remove($image)`.

> **Read-only mirror.** This repository is a read-only split of the [`artisan-build/matte`](https://github.com/artisan-build/matte) monorepo. Issues and pull requests are disabled here — please open them on the monorepo.

What it does
------------

[](#what-it-does)

`matte-client` is a thin convenience SDK over the Matte HTTP API. It is a fast-path, **not a requirement** — the server is a plain HTTP API, so anything can POST to it directly. The SDK just makes the common Laravel case ergonomic.

- **`Matte::remove($image, $options, $callbackUrl?)`** → a `JobHandle` (async submit). The `$image` can be a file path, raw bytes, an `UploadedFile`, or an `SplFileInfo`.
- **`Matte::removeSync($image, $options)`** → the transparent PNG bytes, inline, for small / interactive cases.
- **`JobHandle`** → `status()`, `wait($timeout)` (polls to done/failed/timeout), `result()`(fetches the PNG).

It speaks the [`matte-contracts`](https://github.com/artisan-build/matte-contracts) wire protocol and authenticates with a `Bearer` token.

Async, two ways — simple by default
-----------------------------------

[](#async-two-ways--simple-by-default)

The default keeps the install **zero-infrastructure**: no public endpoint, no websockets.

- **Poll → event (default).** Submit, then `AwaitRemovalJob::dispatch($handle->id())`. The job polls the server on your app's own queue, optionally stores the result to `MATTE_STORE_DISK`, and fires a **`MatteRemovalCompleted`** event you listen for. Works everywhere — localhost, CI, behind a firewall.
- **Signed webhook (opt-in).** Set `MATTE_WEBHOOK_PATH` and pass a `callback_url`; the package registers a receiver that verifies the server's `X-Matte-Signature` (constant-time HMAC) and fires the same `MatteRemovalCompleted` event. Lower latency at scale, but needs a public URL.

```
use ArtisanBuild\MatteClient\Facades\Matte;
use ArtisanBuild\MatteClient\Jobs\AwaitRemovalJob;

$handle = Matte::remove($request->file('photo'), ['mode' => 'grabcut', 'preset' => 'quality']);
AwaitRemovalJob::dispatch($handle->id());        // → MatteRemovalCompleted

// or, inline:
$png = Matte::removeSync($smallImage);
```

Activation — by presence of config
----------------------------------

[](#activation--by-presence-of-config)

The client is active when `MATTE_URL` and `MATTE_TOKEN` are set. The webhook receiver is registered only when `MATTE_WEBHOOK_PATH` is configured.

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

[](#installation)

```
composer require artisan-build/matte-client
php artisan matte:install
```

`matte:install` prompts for the Matte server URL and the API token (and an optional webhook secret), writes `MATTE_URL` / `MATTE_TOKEN` / `MATTE_WEBHOOK_SECRET` to your `.env`, publishes the config, and pins `matte-contracts` to a caret constraint. Generate the token with `php artisan token:create ` (from `artisan-build/built-for-cloud`).

License
-------

[](#license)

MIT. See [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance91

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~0 days

Total

4

Last Release

44d ago

Major Versions

v0.1.0 → v1.0.02026-06-14

v1.0.0 → v2.0.02026-06-15

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1053395?v=4)[Ed Grosvenor](/maintainers/edgrosvenor)[@edgrosvenor](https://github.com/edgrosvenor)

---

Top Contributors

[![edgrosvenor](https://avatars.githubusercontent.com/u/1053395?v=4)](https://github.com/edgrosvenor "edgrosvenor (8 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelmatte

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/artisan-build-matte-client/health.svg)

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

###  Alternatives

[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M688](/packages/laravel-boost)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M251](/packages/laravel-ai)[nativephp/mobile

NativePHP for Mobile

1.1k75.1k113](/packages/nativephp-mobile)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M348](/packages/psalm-plugin-laravel)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M134](/packages/roots-acorn)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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