PHPackages                             carmelosantana/ai-context-builder - 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. carmelosantana/ai-context-builder

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

carmelosantana/ai-context-builder
=================================

A composer package to build context files for AI chatbots.

1.4.0(1y ago)027MITPHPPHP ^8.1

Since Sep 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/carmelosantana/ai-context-builder)[ Packagist](https://packagist.org/packages/carmelosantana/ai-context-builder)[ RSS](/packages/carmelosantana-ai-context-builder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

AI Context Builder
==================

[](#ai-context-builder)

A Composer package to simplify building context from your source code.

- [Install](#install)
- [Usage](#usage)
    - [Basic Usage](#basic-usage)
    - [Configuration](#configuration)
    - [Output](#output)
- [Funding](#funding)
- [License](#license)

---

**Supports**

Easily create contextual intelligence from your project's source code when using chatbot for code assistance or autocompletion. This will dramatically improve the quality of the code or documentation generated.

**Features**

- Scan your composer project for PHP, CSS, and JS files.
- Automatically include composer dependencies in the context.
- Generate human-readable context files.
- Add additional paths or directories to the context.

Install
-------

[](#install)

Include `AiContextBuilder` in your project with [Composer](https://getcomposer.org/):

```
composer require --dev carmelosantana/ai-context-builder
```

Add the following configuration to your `composer.json` file:

```
{
    "scripts": {
        "ai": "CarmeloSantana\\AiContextBuilder\\ContextBuilder::generateContext",
    },
}
```

**Requirements:**

- [PHP](https://www.php.net/manual/en/install.php) 8.1 or above
- [Composer](https://getcomposer.org/)

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

The `AiContextBuilder` package is quite simple to use. After installation just run the following command:

```
composer ai
```

This will scan the `src` directory and any additional directories or files specified in the configuration. You will find the generated context files in the `.ai` directory at the root of your project.

### Configuration

[](#configuration)

You can pass additional paths or directories to be included in the context by providing a file with a list of paths:

```
composer ai path/to/your/paths.txt
```

The file should contain a list of paths separated by new lines. For example:

```
path/to/your/directory
path/to/your/file.php
```

### Output

[](#output)

Upon completion, `AiContextBuilder` will generate the following files:

- `files-all.txt`: Contains all scanned source files.
- `files-php.txt`: Contains only PHP files.
- `files-css.txt`: Contains only CSS files.
- `files-js.txt`: Contains only JavaScript files.
- `composer-*`: Contains files from each composer dependency.

Each file includes a summary of the scanned files and their content, formatted for easy integration with AI chatbots.

Funding
-------

[](#funding)

If you find this project useful or use it in a commercial environment, please consider donating:

- Bitcoin ➭ `bc1qhxu9yf9g5jkazy6h4ux6c2apakfr90g2rkwu45`
- Ethereum ➭ `0x9f5D6dd018758891668BF2AC547D38515140460f`
- Patreon ➭ Subscribe via [patreon.com/carmelosantana](https://www.patreon.com/carmelosantana)
- PayPal ➭ [Donate via PayPal](https://www.paypal.com/donate/?business=PWVK9L8VGN4VA&no_recurring=0&item_name=Thank+you+for+supporting+the+AI+Context+Builder!&currency_code=USD)

License
-------

[](#license)

The code is licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~6 days

Total

5

Last Release

590d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/597820?v=4)[Carmelo Santana](/maintainers/carmelosantana)[@carmelosantana](https://github.com/carmelosantana)

---

Top Contributors

[![carmelosantana](https://avatars.githubusercontent.com/u/597820?v=4)](https://github.com/carmelosantana "carmelosantana (13 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/carmelosantana-ai-context-builder/health.svg)

```
[![Health](https://phpackages.com/badges/carmelosantana-ai-context-builder/health.svg)](https://phpackages.com/packages/carmelosantana-ai-context-builder)
```

###  Alternatives

[log1x/acf-composer

Create fields, blocks, option pages, and widgets using ACF Builder and Sage 10

493760.2k13](/packages/log1x-acf-composer)[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

177813.7k6](/packages/markrogoyski-ipv4-subnet-calculator)[b13/menus

Easy and fast menus for TYPO3 Frontends

58534.7k1](/packages/b13-menus)[hfig/mapi

Pure PHP library for reading and manipulating Microsoft Outlook .msg messages (MAPI documents)

40420.9k2](/packages/hfig-mapi)

PHPackages © 2026

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