One command gives AI agents instant codebase context. ~250 tokens replaces 50,000+ tokens of exploration. Auto-configures Claude Code, Cursor, Aider.
# Stacklit
**108,000 lines of code. 4,000 tokens of index.**
One command makes any repo AI-agent-ready. No server, no setup.
[](https://github.com/glincker/stacklit/actions)
[](https://github.com/glincker/stacklit/releases)
[](https://www.npmjs.com/package/stacklit)
[](https://opensource.org/licenses/MIT)
## Install and run
```bash
npx stacklit init
```
That is it. Downloads the binary, scans your codebase, generates the index, opens the visual map. One command.
Other install options:
```bash
npm install -g stacklit # install globally, then run: stacklit init
go install github.com/glincker/stacklit/cmd/stacklit@latest
```
Or grab a binary from [GitHub Releases](https://github.com/glincker/stacklit/releases) (macOS, Linux, Windows).
## CI / GitHub Action
Use [glincker/stacklit-action](https://github.com/glincker/stacklit-action) to keep the index fresh automatically. Auto-commit on push, or gate PRs with check mode:
```yaml
- uses: actions/checkout@v4
- uses: glincker/stacklit-action@v1 # auto-commit (default)
# or: with: { mode: check } # fail PR if index is stale
```
Add `permissions: contents: write` to the job when using `auto-commit` mode.

## What happens when you run it
```
$ stacklit init
[stacklit] found 342 files
[stacklit] parsed 342 files (0 errors)
[stacklit] done in 89ms -- wrote stacklit.json, DEPENDENCIES.md, stacklit.html
Opening visual map...
```
Three files appear in your project:
| File | What it is | Commit it? |
|------|-----------|------------|
| `stacklit.json` | Codebase index for AI agents | **Yes** |
| `DEPENDENCIES.md` | Mermaid dependency diagram | **Yes** (renders on GitHub) |
| `stacklit.html` | Interactive visualAgent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.