PHPackages                             bear/api-doc - 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. bear/api-doc

ActiveLibrary[API Development](/categories/api)

bear/api-doc
============

1.11.0(2mo ago)3304.4k↓24.6%6[2 issues](https://github.com/bearsunday/BEAR.ApiDoc/issues)2MITPHPPHP ^8.2CI passing

Since Aug 18Pushed 1w ago1 watchersCompare

[ Source](https://github.com/bearsunday/BEAR.ApiDoc)[ Packagist](https://packagist.org/packages/bear/api-doc)[ RSS](/packages/bear-api-doc/feed)WikiDiscussions 1.x Synced 2w ago

READMEChangelog (10)Dependencies (51)Versions (52)Used By (2)

BEAR.ApiDoc
===========

[](#bearapidoc)

Your application is the documentation.

- **ApiDoc HTML**: Developer documentation
- **OpenAPI 3.1**: Tool chain integration
- **JSON Schema**: Information model
- **ALPS**: Vocabulary semantics for AI understanding
- **llms.txt**: AI-readable application overview
- **Bindings HTML**: Ray.Di DI graph and binding provenance

Semantic Depth
--------------

[](#semantic-depth)

The same document reveals different insights depending on your perspective:

DepthWhat You SeeSurfaceRemote function list (API reference)MiddleResources and operations (REST design)DeepApplication semantics (ALPS three layers)A developer sees endpoints to call. An architect sees state transitions. An AI extracts Ontology, Taxonomy, and Choreography. One document, multiple layers of understanding.

This is a semantic application document, not just an API reference. It describes what the application **is**, not just how to call it.

Demo
----

[](#demo)

- [ApiDoc](https://bearsunday.github.io/BEAR.ApiDoc/)
- [OpenAPI](https://bearsunday.github.io/BEAR.ApiDoc/openapi/)
- [Documentation Audit](https://bearsunday.github.io/BEAR.ApiDoc/audit.html)
- [Term Usage Index](https://bearsunday.github.io/BEAR.ApiDoc/terms.html)
- [Bindings](https://bearsunday.github.io/BEAR.ApiDoc/bindings.html)

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

[](#installation)

```
composer require bear/api-doc ^1.0

```

Quick Start
-----------

[](#quick-start)

Generate configuration file:

```
./vendor/bin/apidoc init
```

This creates `apidoc.xml` from your `composer.json`.

Generate documentation:

```
./vendor/bin/apidoc
```

This writes the API documentation and its term usage index for human-readable formats, for example `index.html` and `terms.html`.

Generate the documentation quality report:

```
./vendor/bin/apidoc audit
```

Each finding in the HTML audit carries a machine-readable `findingType`, so the report is a worklist, not just a list to read: the [`bear-audit-fix`](https://github.com/bearsunday/BEAR.Skills) skill reads `audit.html` and closes the gaps it reports (PHPDoc summaries, JSON Schema, `#[Alps]`).

Usage
-----

[](#usage)

See the [API doc documentation](http://bearsunday.github.io/manuals/1.0/en/apidoc.html).

GitHub Actions
--------------

[](#github-actions)

You can use the reusable workflow to generate and publish API documentation automatically.

```
name: API Docs
on:
  push:
    branches: [main]

jobs:
  docs:
    uses: bearsunday/BEAR.ApiDoc/.github/workflows/apidoc.yml@v1
    with:
      format: 'html,openapi,alps,audit,llms,bindings'
      alps-profile: 'alps.json'
```

### Inputs

[](#inputs)

InputDefaultDescription`php-version``'8.2'`PHP version`format``'html,openapi,llms'`Comma-separated: html (apidoc), md, openapi, alps, llms, audit, bindings`alps-profile``''`ALPS profile path (required for alps format)`docs-path``'docs/api'`Output directory`publish-to``'github-pages'``github-pages` or `artifact-only`### Output Structure

[](#output-structure)

```
docs/
├── index.html          # API documentation
├── terms.html          # Term usage index for HTML docs
├── audit.html          # Documentation coverage report (HTML, ALPS-profiled)
├── audit.md            # Documentation coverage report (Markdown, for CLI/tooling)
├── bindings.html       # Ray.Di bindings and object graph
├── object-graph.dot    # Object graph source (DOT)
├── llms.txt            # AI-readable overview
├── openapi.json        # OpenAPI spec
├── alps/               # ALPS report profiles (terms.xml, audit.xml)
└── schemas/
    └── *.json          # JSON Schema

```

Development
-----------

[](#development)

```
git clone https://github.com/bearsunday/BEAR.ApiDoc.git
cd BEAR.ApiDoc
composer install
composer docs        # Generate docs with external CSS
composer docs-dev    # Generate docs with inline CSS for development
composer docs-md     # Generate Markdown docs
composer docs-openapi # Generate OpenAPI spec
composer docs-audit  # Generate documentation audit report
composer docs-bindings # Generate Ray.Di bindings HTML report
composer docs-terms  # Generate legacy Markdown term usage index
```

Application as Documentation.

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance79

Regular maintenance activity

Popularity40

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 93.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 ~110 days

Recently: every ~9 days

Total

30

Last Release

73d ago

Major Versions

0.4.5 → 1.0.02021-05-17

PHP version history (8 changes)0.2.0PHP ^7.0

0.3.0PHP &gt;=7.0.0

0.4.0PHP &gt;=7.1.0

0.4.2PHP &gt;=7.2.0

0.4.4PHP ^7.3 || ^8.0

0.4.5PHP ^7.2 || ^8.0

1.3.0PHP ^8.1

1.5.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![koriym](https://avatars.githubusercontent.com/u/529021?v=4)](https://github.com/koriym "koriym (432 commits)")[![claude](https://avatars.githubusercontent.com/u/81847?v=4)](https://github.com/claude "claude (18 commits)")[![jingu](https://avatars.githubusercontent.com/u/892913?v=4)](https://github.com/jingu "jingu (7 commits)")[![NaokiTsuchiya](https://avatars.githubusercontent.com/u/17171732?v=4)](https://github.com/NaokiTsuchiya "NaokiTsuchiya (4 commits)")[![apple-x-co](https://avatars.githubusercontent.com/u/8497012?v=4)](https://github.com/apple-x-co "apple-x-co (1 commits)")

---

Tags

bearsunday-modulebeasundaydocumentation-tool

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bear-api-doc/health.svg)

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

###  Alternatives

[bear/package

BEAR.Sunday application framework package

30578.6k29](/packages/bear-package)[bear/resource

Hypermedia framework for object as a service

46702.5k48](/packages/bear-resource)[craftcms/cms

Craft CMS

3.6k3.7M3.4k](/packages/craftcms-cms)[thecodingmachine/graphqlite

Write your GraphQL queries in simple to write controllers (using webonyx/graphql-php).

5753.4M51](/packages/thecodingmachine-graphqlite)[ray/media-query

PHP interface-based SQL framework

11266.2k4](/packages/ray-media-query)[bear/skeleton

Skeleton application for BEAR.Sunday

1315.8k2](/packages/bear-skeleton)

PHPackages © 2026

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