PHPackages                             421c/autodoc-php - 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. 421c/autodoc-php

ActiveLibrary[API Development](/categories/api)

421c/autodoc-php
================

Automatic OpenApi documentation and TypeScript generation tool for PHP projects

v2.0.0(4w ago)121.5k↓30.7%11MITPHPPHP ^8.5

Since Mar 5Pushed 4w ago2 watchersCompare

[ Source](https://github.com/421C/autodoc-php)[ Packagist](https://packagist.org/packages/421c/autodoc-php)[ RSS](/packages/421c-autodoc-php/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (10)Dependencies (19)Versions (35)Used By (1)

PHP autodoc
===========

[](#php-autodoc)

PHP autodoc generates OpenAPI 3.1.0 documentation and TypeScript types directly from your PHP code. It reads native type declarations, performs static analysis, and uses PHPDoc when available. As your code changes, the generated documentation and types stay aligned with it.

For Laravel projects there is [autodoc-laravel](https://github.com/421C/autodoc-laravel), which plugs into routing, request validation, Eloquent models and query builders, API resources, paginated responses and the authenticated user.

This package includes a built-in interactive viewer for exploring the generated OpenAPI documentation.

**[Read the documentation](https://phpautodoc.com) or [explore the demo](https://phpautodoc.com/demo).**

Upgrading from v1? See the [upgrade guide](https://phpautodoc.com/v2-upgrade).

### OpenAPI

[](#openapi)

Registered routes become OpenAPI operations with parameters, request bodies, responses and schemas. Serve the generated OpenAPI 3.1.0 document through the bundled viewer or export it as JSON:

```
vendor/bin/autodoc openapi --config=config/autodoc.php
```

When caching is disabled, the OpenAPI document is regenerated each time the viewer is loaded.

### TypeScript

[](#typescript)

`autodoc ts` keeps frontend declarations synchronized with PHP classes, enums, PHPStan type aliases, PHPDoc expressions and API routes:

```
vendor/bin/autodoc ts --config=config/autodoc.php
```

See the [TypeScript documentation](https://phpautodoc.com/docs/typescript).

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

[](#installation)

Requires PHP 8.5 or newer.

For Laravel:

```
composer require 421c/autodoc-laravel
```

For other frameworks or standalone use:

```
composer require 421c/autodoc-php
```

Continue with the [installation and configuration documentation](https://phpautodoc.com).

###  Health Score

54

—

FairBetter than 97% of packages

Maintenance94

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity67

Established project with proven stability

 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

Every ~15 days

Recently: every ~42 days

Total

33

Last Release

29d ago

Major Versions

v1.17.0 → v2.0.02026-07-19

PHP version history (2 changes)v1.0.0PHP ^8.1

v2.0.0PHP ^8.5

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43956161?v=4)[Edžus](/maintainers/edzus)[@edzus](https://github.com/edzus)

---

Top Contributors

[![edzus](https://avatars.githubusercontent.com/u/43956161?v=4)](https://github.com/edzus "edzus (3 commits)")[![BrianHenryIE](https://avatars.githubusercontent.com/u/4720401?v=4)](https://github.com/BrianHenryIE "BrianHenryIE (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/421c-autodoc-php/health.svg)

```
[![Health](https://phpackages.com/badges/421c-autodoc-php/health.svg)](https://phpackages.com/packages/421c-autodoc-php)
```

###  Alternatives

[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.2k12.6M140](/packages/dedoc-scramble)[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k148.6M671](/packages/zircote-swagger-php)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1892.4M48](/packages/dereuromark-cakephp-ide-helper)[phparkitect/phparkitect

Enforce architectural constraints in your PHP applications

9244.5M32](/packages/phparkitect-phparkitect)[deptrac/deptrac

Deptrac is a static code analysis tool that helps to enforce rules for dependencies between software layers.

3.0k9.8M248](/packages/deptrac-deptrac)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

55344.7k5](/packages/jolicode-castor)

PHPackages © 2026

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