cyto/phpdocumentor-llms
Composer 安装命令:
composer require cyto/phpdocumentor-llms
包简介
LLM-friendly single-file documentation template for phpDocumentor
README 文档
README
LLM-friendly single-file documentation template for phpDocumentor.
Generates documentation in a format optimized for Large Language Models (LLMs) context input.
Output
This template generates two files:
| File | Description |
|---|---|
llms.txt |
Index file with namespace overview and class list |
llms-full.txt |
Complete API documentation in a single file |
Installation
composer require --dev cyto/phpdocumentor-llms
Usage
Command Line
phpdoc --directory=src --target=docs --template="vendor/cyto/phpdocumentor-llms/themes/llms"
Configuration File (phpdoc.xml)
<?xml version="1.0" encoding="UTF-8" ?> <phpdocumentor configVersion="3"> <template name="vendor/cyto/phpdocumentor-llms/themes/llms"/> </phpdocumentor>
Composer Script
{
"scripts": {
"docs:llms": "phpdoc --directory=src --target=docs --template='vendor/cyto/phpdocumentor-llms/themes/llms'"
}
}
Then run:
composer docs:llms
Example Output
llms.txt (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)
# 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
- 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
- llms.txt specification
- phpDocumentor
- saggre/phpdocumentor-markdown - Markdown template (this project was inspired by)
License
MIT
cyto/phpdocumentor-llms 适用场景与选型建议
cyto/phpdocumentor-llms 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 458 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「documentation」 「phpdoc」 「template」 「markdown」 「phpDocumentor」 「ai」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 cyto/phpdocumentor-llms 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 cyto/phpdocumentor-llms 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 cyto/phpdocumentor-llms 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A simple tool for checking that your PHP classes and methods use PHPDocs (PHP DocBlocks Checker fork).
Bookdown.io With Bootswatch Styles And Prism Syntax Highlighting
Laravel package that generates RESTful API documentation in Markdown based on PHPDoc.
Laravel API documentation generating tool
Validates PHPDoc @param and @return tags against method signatures
A PHPDoc docblock interpreter that is simple, easy to use, and provides Attribute alternatives.
统计信息
- 总下载量: 458
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-02