PHPackages                             artisan-build/crate-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/crate-client

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

artisan-build/crate-client
==========================

The client package for Crate private Composer registry integrations.

v0.1.0(1mo ago)00MITPHPPHP ^8.3

Since Jul 8Pushed 1mo agoCompare

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

READMEChangelogDependencies (8)Versions (2)Used By (0)

Crate Client
============

[](#crate-client)

Client-side helpers for Crate.

This package has two surfaces:

- Consumer auth helper: write Composer HTTP Basic auth for a Crate registry.
- Issuer SDK: call a Crate deployment's admin-token gated `/api/credentials` endpoint.

Consumer Helper
---------------

[](#consumer-helper)

Configure the customer app with the Crate registry URL and an issued registry credential:

```
CRATE_URL=https://crate.example.com
CRATE_TOKEN=issued-registry-credential
```

Generate Composer auth:

```
php artisan crate:auth
```

By default, `crate:auth` writes or merges `auth.json` in the current working directory. It adds this shape:

```
{
  "http-basic": {
    "crate.example.com": {
      "username": "token",
      "password": "issued-registry-credential"
    }
  }
}
```

Use a different path with `--path`:

```
php artisan crate:auth --path=/path/to/auth.json
```

Print the JSON instead of writing a file with `--print`, which is useful for `COMPOSER_AUTH` in CI:

```
export COMPOSER_AUTH="$(php artisan crate:auth --print)"
```

Then configure Composer to use the Crate registry and require packages normally:

```
composer config repositories.crate composer https://crate.example.com
composer require vendor/pkg
```

Issuer SDK
----------

[](#issuer-sdk)

Use `CrateIssuer` in the operator's own Laravel app to issue and revoke credentials around billing, onboarding, or access logic that you own.

Configure the issuer client:

```
CRATE_ISSUER_URL=https://crate.example.com
CRATE_ADMIN_TOKEN=admin-ability-token
CRATE_ISSUER_RETRIES=2
CRATE_ISSUER_RETRY_SLEEP=100
```

`CRATE_ISSUER_URL` defaults to `CRATE_URL` when omitted.

Example:

```
use ArtisanBuild\CrateClient\CrateIssuer;

$issuer = CrateIssuer::fromConfig();

$credential = $issuer->issue('build-bot');
$tokens = $issuer->list();
$issuer->revoke('build-bot');
```

The SDK calls:

- `POST /api/credentials` for `issue(...)`, returning an `ArtisanBuild\CrateContracts\Credential` with plaintext shown once.
- `GET /api/credentials` for `list()`, returning metadata without plaintext.
- `DELETE /api/credentials/{name}` for `revoke(...)`.

Requests use Bearer auth with the configured admin token, accept JSON, retry transient failures according to config, and throw on non-2xx responses.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 75% 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

Unknown

Total

1

Last Release

49d ago

### 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 (3 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

composerclientlaravelregistrycrate

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80427.1M249](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k31.8M163](/packages/laravel-cashier)[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M341](/packages/laravel-ai)[spatie/laravel-export

Create a static site bundle from a Laravel app

679153.2k7](/packages/spatie-laravel-export)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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