PHPackages                             papi-ai/ingest-gitingest - 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. papi-ai/ingest-gitingest

ActiveLibrary

papi-ai/ingest-gitingest
========================

Remote repository ingestion for PapiAI via the gitingest CLI

v0.15.0(today)00MITPHPPHP ^8.2CI passing

Since Jul 27Pushed todayCompare

[ Source](https://github.com/papi-ai/ingest-gitingest)[ Packagist](https://packagist.org/packages/papi-ai/ingest-gitingest)[ RSS](/packages/papi-ai-ingest-gitingest/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

papi-ai/ingest-gitingest
========================

[](#papi-aiingest-gitingest)

Remote repository ingestion for [PapiAI](https://papi-ai.org), via the [gitingest](https://github.com/coderamp-labs/gitingest) CLI.

Install
-------

[](#install)

```
composer require papi-ai/ingest-gitingest
pipx install gitingest        # or: pip install gitingest
```

The `gitingest` binary is a runtime requirement, not a Composer dependency.

Usage
-----

[](#usage)

```
use PapiAI\Ingest\Depth;
use PapiAI\Ingest\Gitingest\GitingestIngestor;
use PapiAI\Ingest\IngestRequest;

$ingestor = new GitingestIngestor();

$digest = $ingestor->ingest(new IngestRequest(
    source: 'https://github.com/papi-ai/papi-core',
    depth: Depth::Full,
    tokenBudget: 8000,
));

echo $digest->toPrompt();
```

Private repositories take a token, which gitingest also reads from `GITHUB_TOKEN`:

```
new GitingestIngestor(token: $_ENV['GITHUB_TOKEN']);
```

When to use this, and when not to
---------------------------------

[](#when-to-use-this-and-when-not-to)

**Use it for remote sources.** Hand it a GitHub URL and it clones, filters and returns a digest, which a pure-PHP walker cannot do without reimplementing a clone. It also gives parity with what people already paste into models by hand.

**For local paths, use `NativeIngestor` instead.** gitingest handles them perfectly well, but shelling out to Python to walk a directory PHP can walk itself buys nothing and puts a dependency on the common path. `supports()` returns true for both, so ask `NativeIngestor` first when routing.

Behaviour
---------

[](#behaviour)

gitingest returns a finished prompt. This adapter parses it back into a `RepositoryDigest`, so callers can re-render at any budget through the same renderer every other ingestor uses. Parsing keys on the framing gitingest itself emits (a 48-character rule, then `FILE: `), and those constants live in `papi-ai/ingest` so both ends agree.

A missing binary throws before any work happens, with the install command in the message. The check resolves `PATH` rather than spawning anything, so asking costs nothing.

Remote state has no local mtimes or git blobs to hash, so the fingerprint is a hash of the digest gitingest returned: it changes exactly when what came back changes.

### Depth

[](#depth)

`Depth::Full` and `Depth::Tree` work out of the box. `Depth::Api` needs a symbol extractor, the same as everywhere else:

```
use PapiAI\Ingest\PhpSymbols\PhpSymbolExtractor;

new GitingestIngestor(extractor: new PhpSymbolExtractor());
```

Asking for `Api` without one throws rather than quietly returning a tree.

License
-------

[](#license)

MIT, Marcello Duarte

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/70713?v=4)[md](/maintainers/md)[@md](https://github.com/md)

---

Top Contributors

[![MarcelloDuarte](https://avatars.githubusercontent.com/u/144535?v=4)](https://github.com/MarcelloDuarte "MarcelloDuarte (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/papi-ai-ingest-gitingest/health.svg)

```
[![Health](https://phpackages.com/badges/papi-ai-ingest-gitingest/health.svg)](https://phpackages.com/packages/papi-ai-ingest-gitingest)
```

PHPackages © 2026

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