PHPackages                             cyto/phpdocumentor-llms - 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. [Templating &amp; Views](/categories/templating)
4. /
5. cyto/phpdocumentor-llms

ActivePhpdocumentor-template[Templating &amp; Views](/categories/templating)

cyto/phpdocumentor-llms
=======================

LLM-friendly single-file documentation template for phpDocumentor

v1.0.0(6mo ago)0388↓58.6%MITPHPPHP ^8.1

Since Dec 2Pushed 6mo agoCompare

[ Source](https://github.com/hajime-matsumoto/phpdocumentor-llms)[ Packagist](https://packagist.org/packages/cyto/phpdocumentor-llms)[ RSS](/packages/cyto-phpdocumentor-llms/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

phpDocumentor LLMs Template
===========================

[](#phpdocumentor-llms-template)

LLM-friendly single-file documentation template for [phpDocumentor](https://www.phpdoc.org/).

Generates documentation in a format optimized for Large Language Models (LLMs) context input.

Output
------

[](#output)

This template generates two files:

FileDescription`llms.txt`Index file with namespace overview and class list`llms-full.txt`Complete API documentation in a single fileInstallation
------------

[](#installation)

```
composer require --dev cyto/phpdocumentor-llms
```

Usage
-----

[](#usage)

### Command Line

[](#command-line)

```
phpdoc --directory=src --target=docs --template="vendor/cyto/phpdocumentor-llms/themes/llms"
```

### Configuration File (phpdoc.xml)

[](#configuration-file-phpdocxml)

```

```

### Composer Script

[](#composer-script)

```
{
    "scripts": {
        "docs:llms": "phpdoc --directory=src --target=docs --template='vendor/cyto/phpdocumentor-llms/themes/llms'"
    }
}
```

Then run:

```
composer docs:llms
```

Example Output
--------------

[](#example-output)

### llms.txt (Index)

[](#llmstxt-index)

```
# My Project

> API Documentation for My Project

## Overview

This documentation covers the following namespaces:

- `\App\Controller` (5 classes)
- `\App\Service` (3 classes)
- `\App\Repository` (2 classes, 1 interfaces)

## Classes

- `\App\Controller\UserController`: Handles user-related HTTP requests
- `\App\Service\AuthService`: Authentication and authorization service
...
```

### llms-full.txt (Full Documentation)

[](#llms-fulltxt-full-documentation)

```
# My Project - Full API Documentation

> Complete API documentation for My Project

---

## \App\Controller\UserController

Handles user-related HTTP requests

- **Type**: Class
- **Extends**: `\App\Controller\AbstractController`

### Methods

#### index()

\`\`\`php
public index(): Response
\`\`\`

Returns list of all users.

**Returns:** Response - JSON response with user list

---
...
```

Use Cases
---------

[](#use-cases)

- **AI Code Assistants**: Feed API documentation as context to Claude, GPT, etc.
- **RAG Systems**: Single file is easier to chunk and index
- **Code Reviews**: Quick reference for understanding project structure

Related
-------

[](#related)

- [llms.txt specification](https://llmstxt.org/)
- [phpDocumentor](https://www.phpdoc.org/)
- [saggre/phpdocumentor-markdown](https://github.com/Saggre/phpDocumentor-markdown) - Markdown template (this project was inspired by)

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance66

Regular maintenance activity

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

203d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1797285?v=4)[Hajime MATSUMOTO](/maintainers/hajime-matsumoto)[@hajime-matsumoto](https://github.com/hajime-matsumoto)

---

Top Contributors

[![HajimeMat-AVAP](https://avatars.githubusercontent.com/u/55294484?v=4)](https://github.com/HajimeMat-AVAP "HajimeMat-AVAP (2 commits)")

---

Tags

phpdocdocumentationaiphpDocumentormarkdowntemplatellmllms

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cyto-phpdocumentor-llms/health.svg)

```
[![Health](https://phpackages.com/badges/cyto-phpdocumentor-llms/health.svg)](https://phpackages.com/packages/cyto-phpdocumentor-llms)
```

###  Alternatives

[saggre/phpdocumentor-markdown

Markdown template for phpDocumentor3

2293.1k41](/packages/saggre-phpdocumentor-markdown)[cvuorinen/phpdoc-markdown-public

phpDocumentor template that generates Markdown documentation of the public API

3513.8k29](/packages/cvuorinen-phpdoc-markdown-public)[nelson6e65/phpdoc-vuepress

Template for generating your PHP API documentation in a pretty VuePress format.

234.6k2](/packages/nelson6e65-phpdoc-vuepress)

PHPackages © 2026

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