PHPackages                             ineersa/ai-index - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ineersa/ai-index

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ineersa/ai-index
================

AI index for Symfony projects with map, callgraph and wiring information.

v0.1.2(3mo ago)012MITPHPPHP &gt;=8.5

Since Apr 22Pushed 3mo agoCompare

[ Source](https://github.com/ineersa/ai-index)[ Packagist](https://packagist.org/packages/ineersa/ai-index)[ RSS](/packages/ineersa-ai-index/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (8)Versions (4)Used By (0)

ineersa/ai-index
================

[](#ineersaai-index)

Standalone AI index tooling for Symfony projects.

It provides a CLI binary (`vendor/bin/ai-index`) to:

- install agent templates and AGENTS section (`setup`)
- export Symfony DI wiring metadata (`wiring:export`)
- generate per-class and namespace AI index files (`generate`)

---

Status
------

[](#status)

Current status: **usable / beta**.

Implemented:

- setup recipe (idempotent)
- DI wiring export from compiled Symfony container
- class docs index generation (`src/**/docs/*.toon`)
- namespace index regeneration (`src/**/ai-index.toon`)
- mandatory callgraph generation via PHPStan + `ineersa/call-graph`

Still recommended before first stable release:

- add unit + integration test suites
- run consumer parity checks in more projects

---

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

[](#installation)

### From Packagist (normal)

[](#from-packagist-normal)

```
composer require --dev ineersa/ai-index
```

This package now installs and uses `phpstan/phpstan` + `ineersa/call-graph` as runtime dependencies.

### Local path dependency (development)

[](#local-path-dependency-development)

In consumer `composer.json`:

```
{
  "repositories": [
    {
      "type": "path",
      "url": "packages/ai-index",
      "options": { "symlink": true }
    }
  ]
}
```

Then:

```
composer require --dev ineersa/ai-index:@dev -W
```

---

Quick start
-----------

[](#quick-start)

From the Symfony project root:

```
vendor/bin/ai-index setup
vendor/bin/ai-index generate --changed
```

`generate` auto-runs wiring export first (parity with the original flow).

For full regeneration:

```
vendor/bin/ai-index generate --all --force
```

---

Commands
--------

[](#commands)

`setup`
-------

[](#setup)

Install templates and upsert AGENTS section.

```
vendor/bin/ai-index setup [--project-root=...] [--dry-run] [--force]
```

Behavior:

- copies templates:
    - `.agents/skills/ai-index/SKILL.md`
    - `.agents/index-maintainer.md`
- upserts `AGENTS.md` section between markers:
    - ``
    - ``
- idempotent by default

`wiring:export`
---------------

[](#wiringexport)

Export DI wiring map as Toon.

```
vendor/bin/ai-index wiring:export [--project-root=...] [--output=...] [--dry-run]
```

Default output: `var/reports/di-wiring.toon`.

`generate`
----------

[](#generate)

Generate class docs + namespace indexes.

```
vendor/bin/ai-index generate [--project-root=...] [--all|--changed|] [--force] [--dry-run] [--skip-wiring] [--skip-namespace]
```

By default this command:

1. generates callgraph via PHPStan call-graph config,
2. exports DI wiring map,
3. regenerates class docs indexes,
4. regenerates namespace indexes (unless `--skip-namespace`).

Outputs:

- `var/reports/di-wiring.toon`
- `src/**/docs/*.toon`
- `src/**/ai-index.toon`

---

Configuration (`.ai-index.php`)
-------------------------------

[](#configuration-ai-indexphp)

Create this file in the consumer project root to override defaults.

```
