PHPackages                             tomflidr/apigen - 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. tomflidr/apigen

ActiveLibrary[API Development](/categories/api)

tomflidr/apigen
===============

PHP 7.1 source code API generator.

v4.1.2(10y ago)016MITPHPPHP &gt;=5.4

Since Sep 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tomFlidr/ApiGen)[ Packagist](https://packagist.org/packages/tomflidr/apigen)[ Docs](http://apigen.org/)[ RSS](/packages/tomflidr-apigen/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (21)Versions (19)Used By (0)

Smart and Readable Documentation for your PHP project
=====================================================

[](#smart-and-readable-documentation-for-your-php-project)

[![Build Status](https://camo.githubusercontent.com/089d3c4b469a0f833841bfafb994c424c6ca6ef627273998ff20bef733ed97df/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f41706947656e2f41706947656e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ApiGen/ApiGen)[![Coverage Status](https://camo.githubusercontent.com/a6d28163585e402cee14ed7d25caf957e051ed05ff19451b03140eae40e81a3b/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f41706947656e2f41706947656e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/ApiGen/ApiGen?branch=master)[![Downloads](https://camo.githubusercontent.com/56fa117673b651c1a9619956e1274f2ab14c7a6447e8164c6d44aa44dc2d66b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apigen/apigen/stats)[![Latest stable](https://camo.githubusercontent.com/1276a46dc6c34d34a97e3ad3882d76f2634ecad70f7a885acf74b56ce28ab7da/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apigen/apigen)

ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is **all PHP 7.1 features ready**easy to extend with own Finder, Annotation Subscriber or even Generator.

Just look at [**ApiGen API**](https://apigen.github.io/ApiGen):

[![ApiGen Preview](docs/preview.png)](docs/preview.png)

Your Help is Needed to Finish 5.x Release
-----------------------------------------

[](#your-help-is-needed-to-finish-5x-release)

❤️ We need your help to test new version of ApiGen.

### How to install it?

[](#how-to-install-it)

Add to your `composer.json`:

```
{
    "require": {
        "apigen/apigen": "dev-master",
        "roave/better-reflection": "dev-master#c87d856"
    }
}
```

then update:

```
composer update
```

Test it, report issues or send PRs.

💀 **Version 4.x is not supported**, since there was huge change of Reflection library and the code was almost completely rewritten.

Built on Shoulders of Giants
----------------------------

[](#built-on-shoulders-of-giants)

- PHP 7.1+
- [nikic/PHP-Parser](https://github.com/nikic/PHP-Parser)
- [Roave/BetterReflection](https://github.com/Roave/BetterReflection)
- [phpDocumentor/TypeResolver](https://github.com/phpDocumentor/TypeResolver)
- [phpDocumentor/ReflectionDocBlock](https://github.com/phpDocumentor/ReflectionDocBlock)

Install
-------

[](#install)

```
composer require apigen/apigen --dev
```

Usage
-----

[](#usage)

Generate API docs by passing single source and destination options:

```
vendor/bin/apigen generate src --destination docs
```

Or generate API docs for multiple directories:

```
vendor/bin/apigen generate src tests --destination docs
```

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

[](#configuration)

Below is a minimal example configuration. Save it as a `apigen.yml` file in the root of your project:

```
parameters:
    visibilityLevels: [public, protected] # array
    annotationGroups: [todo, deprecated] # array
    title: "ApiGen Docs" # string
    baseUrl: "http://apigen.org/api" # string
    overwrite: false # bool
```

What Annotations Have Extra Care?
---------------------------------

[](#what-annotations-have-extra-care)

### `@see`, `@covers`, `@uses`

[](#see-covers-uses)

Reference to Class, Function, Property, Method etc. element.

**In Code**

```
/**
 * @see SomeClass
 * @see SomeClass::$propety
 * @see SomeClass::someFunction()
 */
```

**Generated**

```
@see SomeClass
@see SomeClass::$property
@see SomeClass::someFunction()
```

---

### `@link`

[](#link)

A website url.

**In Code**

```
/**
 * This is already mentioned on Wiki.
 * @link https://en.wikipedia.org/wiki/United_we_stand,_divided_we_fall Click to see a cool quote
 */
```

**Generated**

```
This is already mentioned on Wiki.
@link Click to see a cool quote
```

### `@internal`

[](#internal)

Associated element is internal, so ApiGen hides it.

Themes
------

[](#themes)

To enable a custom theme just provide `themeDirectory` configuration option in your `apigen.yml`:

```
parameters:
    themeDirectory: path/to/theme # path to theme's config file
```

Contributing
------------

[](#contributing)

Rules are simple:

- **new feature needs tests**
- **all tests must pass**```
    composer complete-check
    ```
- **1 feature per PR**

We would be happy to merge your feature then.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~18 days

Total

17

Last Release

3180d ago

Major Versions

v2.8.1 → v4.0.0-RC12014-10-02

v4.1.2 → v5.0.0-RC12017-06-17

PHP version history (4 changes)2.8.0PHP &gt;=5.3.0

v4.0.0-RC1PHP &gt;=5.3.1

v4.0.0-RC5PHP &gt;=5.4

v5.0.0-RC1PHP ^7.1

### Community

Maintainers

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

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (977 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (775 commits)")[![Andrewsville](https://avatars.githubusercontent.com/u/506715?v=4)](https://github.com/Andrewsville "Andrewsville (347 commits)")[![ek9](https://avatars.githubusercontent.com/u/17393048?v=4)](https://github.com/ek9 "ek9 (86 commits)")[![vlastavesely](https://avatars.githubusercontent.com/u/22521379?v=4)](https://github.com/vlastavesely "vlastavesely (68 commits)")[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (50 commits)")[![jadb](https://avatars.githubusercontent.com/u/33527?v=4)](https://github.com/jadb "jadb (50 commits)")[![jankal](https://avatars.githubusercontent.com/u/6324332?v=4)](https://github.com/jankal "jankal (22 commits)")[![POPSuL](https://avatars.githubusercontent.com/u/683358?v=4)](https://github.com/POPSuL "POPSuL (21 commits)")[![milo](https://avatars.githubusercontent.com/u/439140?v=4)](https://github.com/milo "milo (20 commits)")[![FlTr](https://avatars.githubusercontent.com/u/9076372?v=4)](https://github.com/FlTr "FlTr (7 commits)")[![nelson6e65](https://avatars.githubusercontent.com/u/9272498?v=4)](https://github.com/nelson6e65 "nelson6e65 (5 commits)")[![phillaf](https://avatars.githubusercontent.com/u/1533572?v=4)](https://github.com/phillaf "phillaf (4 commits)")[![jrnickell](https://avatars.githubusercontent.com/u/947805?v=4)](https://github.com/jrnickell "jrnickell (3 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (3 commits)")[![grogy](https://avatars.githubusercontent.com/u/1322983?v=4)](https://github.com/grogy "grogy (3 commits)")[![yoosefi](https://avatars.githubusercontent.com/u/2010434?v=4)](https://github.com/yoosefi "yoosefi (3 commits)")[![pfefferle](https://avatars.githubusercontent.com/u/2373?v=4)](https://github.com/pfefferle "pfefferle (3 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (3 commits)")[![olvlvl](https://avatars.githubusercontent.com/u/155998?v=4)](https://github.com/olvlvl "olvlvl (3 commits)")

---

Tags

apiphpdocdocumentationgenerator

### Embed Badge

![Health badge](/badges/tomflidr-apigen/health.svg)

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

###  Alternatives

[apigen/apigen

PHP source code API generator.

2.2k627.9k225](/packages/apigen-apigen)[phpdocumentor/phpdocumentor

Documentation Generator for PHP

4.4k3.1M878](/packages/phpdocumentor-phpdocumentor)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[tomaj/nette-api

Nette api

36261.8k4](/packages/tomaj-nette-api)[crada/php-apidoc

Generate documentation for php API based application. No dependency. No framework required.

259206.9k2](/packages/crada-php-apidoc)

PHPackages © 2026

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