PHPackages                             diversified-design/php-blueprint - 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. [CLI &amp; Console](/categories/cli)
4. /
5. diversified-design/php-blueprint

ActiveLibrary[CLI &amp; Console](/categories/cli)

diversified-design/php-blueprint
================================

Generates a JSON blueprint of a PHP library's class signatures — optimised for coding-agent contexts.

v0.1.9(2mo ago)1183MITPHPPHP &gt;=8.2

Since Feb 19Pushed 2mo agoCompare

[ Source](https://github.com/diversified-design/PHP-Blueprint)[ Packagist](https://packagist.org/packages/diversified-design/php-blueprint)[ RSS](/packages/diversified-design-php-blueprint/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (11)Used By (3)

PHP Blueprint
=============

[](#php-blueprint)

A reflection-based tool that generates a JSON blueprint of a PHP library's class signatures, optimised for use as LLM context.

Purpose
-------

[](#purpose)

When providing library context to coding agents (like Claude Code), you want the class signatures (methods, types, docblocks) without the implementation noise. This tool gives you the equivalent of TypeScript `.d.ts` files or C/C++ headers — the public contract without implementation details.

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

[](#installation)

```
composer require --dev diversified-design/php-blueprint
```

Usage
-----

[](#usage)

```
# Basic — extract all classes from a directory
vendor/bin/blueprint src/

# Filter by namespace (recommended)
vendor/bin/blueprint src/ --namespace="Vendor\\Package"

# Specify output file
vendor/bin/blueprint src/ --namespace="Vendor\\Package" -o blueprint.json

# Include private/protected members
vendor/bin/blueprint src/ --namespace="Vendor\\Package" --include-private

# Truncate docs to first sentence
vendor/bin/blueprint src/ --namespace="Vendor\\Package" --short-docs

# All options
vendor/bin/blueprint src/ \
  --namespace="Vendor\\Package" \
  -o blueprint.json \
  -f json \
  --include-private \
  --include-internal \
  --short-docs \
  --compact-enums
```

### Options

[](#options)

OptionShortDescription`--output``-o`Output JSON file path (default: `blueprint.json` in working directory)`--namespace`Filter by namespace prefix (e.g. `Vendor\\Package`)`--exclude`Exclude namespace prefix (repeatable)`--include-private`Include private/protected members`--include-internal`Include `\Internal\` namespace classes`--short-docs`Truncate doc summaries to first sentence`--compact-enums`Truncate large constant/enum lists (&gt;5 entries)`--format``-f`Output format: `json`, `toon` (experimental), or `both` (default: `json`)`--config``-c`Path to config file`--no-config`Ignore config fileConfiguration
-------------

[](#configuration)

Create a `.blueprint.config.php` in your project root:

```
