PHPackages                             kuick/api-tools - 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. kuick/api-tools

ActiveLibrary[API Development](/categories/api)

kuick/api-tools
===============

Kuick API Tools provides a set of tools for Kuick applications.

v1.1.0(1mo ago)11.2k1MITPHPPHP &gt;=8.2.0CI passing

Since Mar 12Pushed 1mo agoCompare

[ Source](https://github.com/milejko/kuick-api-tools)[ Packagist](https://packagist.org/packages/kuick/api-tools)[ RSS](/packages/kuick-api-tools/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (6)Versions (7)Used By (1)

Kuick API Tools
===============

[](#kuick-api-tools)

[![Latest Version](https://camo.githubusercontent.com/f6a149c8ecfa1674cedd56331ab3d4b097b129a29ddc5ec5faf2dad912d5660a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d696c656a6b6f2f6b7569636b2d6170692d746f6f6c732e7376673f63616368655365636f6e64733d33363030)](https://github.com/milejko/kuick-api-tools/releases)[![PHP](https://camo.githubusercontent.com/e0cd02cfaa76baa1c8674463a1c40439faeae7d753a51a853d239a15a35bdda8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e33253230253743253230382e34253230253743253230382e352d626c75653f6c6f676f3d7068702663616368655365636f6e64733d33363030)](https://www.php.net)[![Total Downloads](https://camo.githubusercontent.com/21cb94f011e9dc3b915138b13b57ad6a451c56b29938e9ab54b4070dab2aafee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b7569636b2f6170692d746f6f6c732e7376673f63616368655365636f6e64733d33363030)](https://packagist.org/packages/kuick/api-tools)[![GitHub Actions CI](https://github.com/milejko/kuick-api-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/milejko/kuick-api-tools/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/d640e70adf1b1975710597e907a31dc04945d6d0e373c3bfb75e9e424a5982ea/68747470733a2f2f636f6465636f762e696f2f67682f6d696c656a6b6f2f6b7569636b2d6170692d746f6f6c732f67726170682f62616467652e7376673f746f6b656e3d38305145424448475048)](https://codecov.io/gh/milejko/kuick-api-tools)[![Software License](https://camo.githubusercontent.com/e2f0982d826e942af97a6e879597c2301c2a8a97567d69e47148db858bbc5de3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f63616368655365636f6e64733d3134343030)](LICENSE)

API Tools for Kuick Framework
-----------------------------

[](#api-tools-for-kuick-framework)

This package plugs into the [Kuick Framework](https://github.com/milejko/kuick-framework) and automatically exposes three HTTP endpoints:

EndpointMethodDescription`/api/doc`GETSwagger UI (HTML)`/api/doc.json`GETOpenAPI specification (JSON)`/api/ops`GETSystem diagnostics — protected by Bearer tokenRequirements
------------

[](#requirements)

- PHP 8.2+
- [Kuick Framework](https://github.com/milejko/kuick-framework) ^2.8

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

[](#installation)

```
composer require kuick/api-tools
```

The Kuick Framework auto-discovers the route, guard, and DI config files bundled in this package — no manual wiring is required.

Endpoints
---------

[](#endpoints)

### `GET /api/doc`

[](#get-apidoc)

Returns a self-contained Swagger UI page that loads the OpenAPI spec from `/api/doc.json`. No authentication required.

### `GET /api/doc.json`

[](#get-apidocjson)

Returns the OpenAPI specification as JSON. The spec is built at runtime by scanning `#[OA\...]` attributes in your project's `src/` directory (via `zircote/swagger-php`). No authentication required.

### `GET /api/ops`

[](#get-apiops)

Returns a JSON object with full system diagnostics:

```
{
  "request":              { ... },
  "environment":          { ... },
  "di-config":            { ... },
  "opcache-status":       { ... },
  "apcu-status":          { ... },
  "php-version":          "8.3.x",
  "php-config":           { ... },
  "php-loaded-extensions": "..."
}
```

**Protected by Bearer token** — see [Configuration](#configuration) below.

Configuration
-------------

[](#configuration)

All settings are read from environment variables. Set them in your `.env` file or deployment environment.

### Ops endpoint security

[](#ops-endpoint-security)

Environment variableDI keyDefaultDescription`API_SECURITY_OPS_GUARD_TOKEN``api.security.ops.guard.token`*(empty)*Bearer token required to access `/api/ops`. An empty value means **all requests are rejected**.Example — calling the protected endpoint:

```
curl -H "Authorization: Bearer my-secret-token" https://your-app.example.com/api/ops
```

### OpenAPI metadata

[](#openapi-metadata)

Environment variableDI keyDefaultDescription`API_OPENAPI_TITLE``api.openapi.title``Kuick API Tools`Title shown in the Swagger UI and spec`API_OPENAPI_DESCRIPTION``api.openapi.description``Kuick API Tools is a set of tools for building APIs with the Kuick framework.`Description shown in the spec`API_OPENAPI_VERSION``api.openapi.version``3.1.0`Version string shown in the specExample `.env` snippet:

```
API_SECURITY_OPS_GUARD_TOKEN=my-secret-token

API_OPENAPI_TITLE=My Project API
API_OPENAPI_DESCRIPTION=Internal REST API for My Project
API_OPENAPI_VERSION=1.0.0
```

Annotating your API with OpenAPI attributes
-------------------------------------------

[](#annotating-your-api-with-openapi-attributes)

`DocJsonController` scans `$projectDir/src` for [swagger-php](https://zircote.github.io/swagger-php/)attributes at runtime. Decorate your controllers with `#[OA\...]` attributes to include them in the generated spec:

```
use OpenApi\Attributes as OA;

#[OA\Get(
    path: '/api/users',
    description: 'Returns a list of users',
    tags: ['Users'],
    responses: [
        new OA\Response(response: 200, description: 'List of users', content: new OA\JsonContent()),
    ]
)]
final class UserListController
{
    public function __invoke(): JsonResponse { ... }
}
```

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance92

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

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

Total

6

Last Release

40d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.3.0

v1.0.1PHP &gt;=8.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f986340afe26a382bdec4d838f514714b6f5bc7222baf73972001a66b9b6dab0?d=identicon)[emisarius](/maintainers/emisarius)

---

Top Contributors

[![milejko](https://avatars.githubusercontent.com/u/14335568?v=4)](https://github.com/milejko "milejko (19 commits)")

---

Tags

apitoolsKuick

### Embed Badge

![Health badge](/badges/kuick-api-tools/health.svg)

```
[![Health](https://phpackages.com/badges/kuick-api-tools/health.svg)](https://phpackages.com/packages/kuick-api-tools)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k36.4M126](/packages/darkaonline-l5-swagger)[essa/api-tool-kit

set of tools to build an api with laravel

53386.5k](/packages/essa-api-tool-kit)

PHPackages © 2026

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