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

AbandonedArchivedLibrary[API Development](/categories/api)

pradosoft/apigen
================

PHP source code API generator - Prado fork

v4.1.2(10y ago)03.1k↓50%1MITPHPPHP &gt;=5.4

Since Sep 29Pushed 6y ago7 watchersCompare

[ Source](https://github.com/pradosoft/ApiGen)[ Packagist](https://packagist.org/packages/pradosoft/apigen)[ Docs](http://apigen.org/)[ RSS](/packages/pradosoft-apigen/feed)WikiDiscussions 4.2 Synced 1mo ago

READMEChangelogDependencies (21)Versions (16)Used By (1)

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)[![Build status](https://camo.githubusercontent.com/59a3eb5792aaab937f90dbb31f84c4cfcb700ff791d991d7485a7a21b0ec89dc/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f7038793636383574686868376d6777302f6272616e63682f342e323f7376673d74727565)](https://ci.appveyor.com/project/ek9/apigen/branch/4.2)[![Code Coverage](https://camo.githubusercontent.com/32e75f445e7cb8ce6b344086f9fbc46df920f4b4d531249a6e4456f657a35e79/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f41706947656e2f41706947656e2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/ApiGen/ApiGen)[![Downloads](https://camo.githubusercontent.com/56fa117673b651c1a9619956e1274f2ab14c7a6447e8164c6d44aa44dc2d66b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apigen/apigen)[![Latest stable](https://camo.githubusercontent.com/d4fb0f8ea8c574ac93a090acc731905f4aa985af71b22b512ef65a06e1064ed8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61706967656e2f61706967656e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/apigen/apigen)

Just look at [CakePHP Framework](http://api.cakephp.org/3.0/) or [Doctrine ORM API](http://www.doctrine-project.org/api/orm/2.4/).

**Note!** This is `4.2` branch, final `4.x` series of ApiGen. The project is undergoing a rewrite (`5.x` series on `master`). Please submit any PRs for versions `4.2.x` to `4.2` branch.

Requirements
------------

[](#requirements)

- PHP 5.5+

Install
-------

[](#install)

Install using composer as a development dependency in your project:

```
composer require --dev apigen/apigen

```

Or if you want it globally:

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

```

Usage
-----

[](#usage)

Run ApiGen with source and destination options:

```
vendor/bin/apigen generate -s ./src -d ./docs
```

To omit cli options just create `apigen.yaml` or `apigen.neon` file in your project's root folder:

```
source:
    - ./src

destination: ./docs
```

For all available options, along with descriptions and default values, just run:

```
vendor/bin/apigen generate --help
```

Documentation
-------------

[](#documentation)

### DocBlock Annotations

[](#docblock-annotations)

This section provides a list of [PHP DocBlock annotations](https://www.phpdoc.org/docs/latest/guides/docblocks.html) (tags) that are supported by ApiGen:

- `@author` - documents the author of the associated element.
- `@copyright` - documents the copyright information for the associated element.
- `@deprected` - indicated that the associated element is deprecated and can be removed in the future version.
- `@internal` - denotes that the associated elements is internal to this application or library and hides it by default.
- `@license` - indicates which license is applicable for the associated element.
- `@link` - indicates a relation between the associated element and a page of a website.
- `@method` - allows a class to know which ‘magic’ methods are callable.
- `@package` - categorizes the associated element into a logical grouping or subdivision.
- `@param` - documents a single argument of a function or method.
- `@property` - allows a class to know which ‘magic’ properties are present.
- `@return` - documents the return value of functions or methods.
- `@see` - indicates a reference from the associated element to a website or other elements.
- `@subpackage` - categorizes the associated element into a logical grouping or subdivision.
- `@throws` - indicates whether the associated element could throw a specific type of exception.
- `@usedby` indicates a "from" reference with a single associated element.
- `@uses` - indicates a reference to (and from) a single associated element.

### Configuration

[](#configuration)

This section provides information on all available configuration options that can be included in configuration files (`apigen.yml` or `apigen.neon`).

#### Minimal Configuration

[](#minimal-configuration)

A minimal configuration file:

```
# apigen.neon.dist
# This is minimal configuration for ApiGen.
source: [src]           # directory(-ies) to scan PHP files from
destination: docs       # destination directory to generate API docs in
```

**Note!** The configuration files match CLI options for [generate](#generate)command. The only difference is that when defining these options in configuration file, you have to use `camelCased` format (i.e. `--annotation-groups` CLI option becomes `annotationGroups` configuration parameter).

#### Reference Configuration

[](#reference-configuration)

A reference configuration file with all of the available and supported configuration options.

```
# apigen.neon.dist
# This is reference configuration for ApiGen. It contains all of the available
# and supported configuration options, together with their default values.
# source options
source: [src]                       # Source directory(-ies) to build API docs for
                                    # (array)
extensions: [php]                   # A list of file extension to include when
                                    # scanning source dir (array)
accessLevels: [public, protected]   # Access levels of methods and properties
                                    # to include (array)
annotationGroups: [todo, deprecated]# Annotation Groups to include (array)
internal: false                     # Set to `true` to include @internal in API
                                    # docs (boolean)
#main: 'SomePrefix'                 # Elements with this name prefix will be
                                    # first in the tree (string)
php: false                          # Set to `true` to generate docs for PHP
                                    # internal classes (boolean)
noSourceCode: false                 # Set to `true` to NOT generate highlighted
                                    # source code for elements (boolean)

# destination / generated docs options
destination: doc                    # Destination directory for API docs (string)
exclude: tests                      # A blob pattern to exclude from API docs
                                    # generation (string (blob))
overwrite: true                     # Overwrite destination directory by
                                    # default (boolean)
title: "ApiGen Docs"                # Title of generated API docs (string)
baseUrl: http://apigen.org/api      # Base URL for generated API docs (string (URL))
templateConfig: path/to/config.neon # path to template configuration (string (path))

# templates parameters
googleAnalytics: 123                # Google Analytics tracking code (string)
googleCseId: 456                    # Google Custom Search Engine ID (string)
download: true                      # show a link to download API docs ZIP
                                    # archive in the API docs (boolean)

# debug
debug: false                        # set to true to enable debug (boolean)
```

### CLI Commands

[](#cli-commands)

This section provides information on all available CLI commands and their options.

Main ApiGen commands:

- [generate](#generate) - generates API documentation.

To get a list of available `apigen list` command. To get help on specific command use `apigen help`, i.e.:

```
$ apigen help generate

```

#### Generate

[](#generate)

`generate` command is the main command which generates API documentation. The command relies either on passing it CLI options or reading data from [configuration files](#Configuration).

A list of options accepted by `generate` command:

OptionDescription`--source` (`-s`)Source directory(-ies) to generate API docs for. **Multiple values are allowed**.`--destination` (`-d`)Destination directory for API docs.`--access-levels`Access levels of methods and properties to be included in API docs \[options: `public`, `protected`, `private`\]. Default: `["public","protected"]`.`--annotation-groups`Generate page with elements with specific annotation.`--config`Custom path to ApiGen configuration file. Default: `./apigen.neon``--google-cse-id`Custom Google Search Engine ID (for search box).`--base-url`Base URL (used for Sitemap / search box).`--google-analytics`Google Analytics tracking code to include in generated API docs.`--debug`Turn on debug mode (prints verbose information from low-level parser). Useful when debugging / during development.`--download`Pass this option to include a link to a generated ZIP archive in the API docs.`--extensions`A list of scanned file extensions. **Multiple values are allowed**. Default: `["php"]`.`--exclude`Diretories or files matching provided mask will be excluded (e.g. `*/tests/*`). **Multiple values are allowed**.`--groups`Define element grouping in the menu \[options: `namespaces`, `packages`\]. Default: `namespaces`.`--main`Elements with provided main name prefix will be first in the tree.`--internal`Include elements marked as `@internal`.`--php`Generate documentation for PHP internal classes.`--no-source-code`Do not generate highlighted source code for elements.`--template-theme`ApiGen template theme name. \[default: "default"\].`--template-config`Specify your own template config (this setting will override `--template-theme`).`--title`Custom title of API docs.`--tree`Generate a tree view of classes, interfaces, traits and exceptions.`--deprecated`deprecated, only present for BC`--todo`deprecated, only present for BC`--charset`deprecated, only present for BC`--skip-doc-path`deprecated, only present for BC`--overwrite` (`-o`)Force overwriting of destination directory.`--help` (`-h`)Display help message for all or specific commands.`--quiet` (`-q`)Do not output any messages.`--version` (`-V`)Display version of ApiGen.### Themes

[](#themes)

In order to enable a custom theme, you have to either provide `--theme-config`CLI option when runing `apigen generate` or add `themeConfig` configuration option in your ApiGen configuration file:

```
themeConfig: path/to/theme/config.neon # path to theme's config file
```

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

[](#contributing)

Please refer to [CONTRIBUTING](CONTRIBUTING.md) for details.

### Tests

[](#tests)

To run tests:

```
$ vendor/bin/phpunit
```

Get Support!
------------

[](#get-support)

- [\#apigen](http://webchat.freenode.net/?channels=#apigen) on irc.freenode.net - Come chat with us, we have cake.
- [GitHub Issues](https://github.com/ApiGen/ApiGen/issues) - Got issues? Please tell us!
- [Roadmaps](https://github.com/ApiGen/ApiGen/wiki/Roadmaps) - Want to contribute? Get involved!

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 51.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 ~200 days

Recently: every ~422 days

Total

14

Last Release

2370d ago

Major Versions

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

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

v4.2.0-RC1PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/37ff78bfcc36f6035961fa033468b6d74f583c2af7d73940efa7723f98b2ffbf?d=identicon)[ctrlaltca](/maintainers/ctrlaltca)

---

Top Contributors

[![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)")[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (91 commits)")[![jadb](https://avatars.githubusercontent.com/u/33527?v=4)](https://github.com/jadb "jadb (76 commits)")[![ek9](https://avatars.githubusercontent.com/u/17393048?v=4)](https://github.com/ek9 "ek9 (60 commits)")[![dg](https://avatars.githubusercontent.com/u/194960?v=4)](https://github.com/dg "dg (50 commits)")[![POPSuL](https://avatars.githubusercontent.com/u/683358?v=4)](https://github.com/POPSuL "POPSuL (20 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)")[![phillaf](https://avatars.githubusercontent.com/u/1533572?v=4)](https://github.com/phillaf "phillaf (4 commits)")[![pfefferle](https://avatars.githubusercontent.com/u/2373?v=4)](https://github.com/pfefferle "pfefferle (3 commits)")[![yoosefi](https://avatars.githubusercontent.com/u/2010434?v=4)](https://github.com/yoosefi "yoosefi (3 commits)")[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (3 commits)")[![ctrlaltca](https://avatars.githubusercontent.com/u/1631111?v=4)](https://github.com/ctrlaltca "ctrlaltca (3 commits)")[![grogy](https://avatars.githubusercontent.com/u/1322983?v=4)](https://github.com/grogy "grogy (3 commits)")[![jrnickell](https://avatars.githubusercontent.com/u/947805?v=4)](https://github.com/jrnickell "jrnickell (3 commits)")[![Majkl578](https://avatars.githubusercontent.com/u/144181?v=4)](https://github.com/Majkl578 "Majkl578 (3 commits)")[![Zemistr](https://avatars.githubusercontent.com/u/2613208?v=4)](https://github.com/Zemistr "Zemistr (2 commits)")[![malkusch](https://avatars.githubusercontent.com/u/1623984?v=4)](https://github.com/malkusch "malkusch (2 commits)")[![marcovtwout](https://avatars.githubusercontent.com/u/438046?v=4)](https://github.com/marcovtwout "marcovtwout (2 commits)")

---

Tags

apiphpdocdocumentationgenerator

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/pradosoft-apigen/health.svg)](https://phpackages.com/packages/pradosoft-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)
