Stacklit CLI

CLI that builds a codebase index and a 250-token map so an agent does not read hundreds of files to find the right one.

  • 114 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • The `stacklit setup` command edits agent configs and installs a git hook that runs on every commit.
  • The CLI reads the whole project source and writes index files into the repository.
All reasons and checks

glincker/stacklit

Install

Manual install

npx stacklit init

The first command from the README: it downloads the binary, builds the index and opens the map. `stacklit setup` connects the agents.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The `stacklit setup` command edits agent configs and installs a git hook that runs on every commit.
  • The CLI reads the whole project source and writes index files into the repository.

This is third-party code. Review the repository files before installing.

What it does

Stacklit scans a codebase and writes `stacklit.json` to the project root: modules, their purpose, exports with signatures, dependencies, git activity and hints on where to add features and how to run tests. `DEPENDENCIES.md` with a Mermaid diagram and an interactive `stacklit.html` map appear next to it. Parsing uses tree-sitter for 11 languages. The agent then reads the index instead of crawling files. The `stacklit setup` command finds Claude Code, Cursor and Aider, injects a compact map of about 250 tokens into their configs, connects the `stacklit serve` MCP server with seven tools and installs a git hook that refreshes the index on every commit.

Who it is for. Developers on large repositories and monorepos where an agent spends context looking for the right file.

Good fit when

  • An agent in a monorepo searches for the authentication code anew every session.
  • You need a module dependency diagram for a README or an architecture discussion.
  • The index must live in the repository and refresh through a commit hook.
  • Several agents work in one project and should not rebuild the map each time.

Not a fit when

  • The project is tiny and an agent reads it whole with no loss.
  • You need search by code meaning: the index holds only module structure.
  • You must not add new files, git hooks or agent config edits to the repository.

Example request

Read `stacklit.json`, find the authentication module and show which modules it depends on.

Limitations

The index describes structure: modules, exports and links, while function bodies stay in the source. For languages outside the list of 11 only a line count and language detection are given. The `stacklit setup` command edits `CLAUDE.md`, `.mcp.json`, `.cursorrules` and installs a git hook, and for Aider it writes `.aider.conf.yml`, so review those changes before committing. The documentation is in English. The last commit in the repository dates from May 2026.

How to disable. Remove the `post-commit` git hook, the Stacklit blocks in `CLAUDE.md` and `.cursorrules`, the `stacklit` entry in MCP configs and the `stacklit.json` and `DEPENDENCIES.md` files. `npm uninstall -g stacklit` removes the binary.

FAQ

How do I install Stacklit?

Run `npx stacklit init` in the project root: the command downloads the binary, builds the index and opens the map. Install globally with `npm install -g stacklit` or `go install github.com/glincker/stacklit/cmd/stacklit@latest`.

How do I connect Stacklit to Claude Code and Cursor?

Run `stacklit setup` and the CLI finds the installed tools. For one tool use `stacklit setup claude` or `stacklit setup cursor`; they edit `CLAUDE.md`, `.cursorrules` and MCP configs.

Which files should I commit?

Commit `stacklit.json` and `DEPENDENCIES.md`. The `stacklit.html` file goes to gitignore and is recreated by `stacklit view`.

How do I keep the index fresh?

`stacklit init --hook` installs a git hook, and `stacklit diff` shows whether the index is stale. For CI there is the `glincker/stacklit-action` GitHub Action.

Which tools does the MCP server give?

`stacklit serve` opens seven tools: `get_overview`, `get_module`, `find_module`, `list_modules`, `get_dependencies`, `get_hot_files` and `get_hints`.

Discussion

No questions or reviews yet.

CLI tools

codesight maps a project in one run: routes, DB models, dependencies, env vars. It gives the map to an agent as files or through an MCP server

MCP serverExtended access1.4KRepository stars

A local repository map for agents: the atlas CLI and MCP find the relevant code by file purpose instead of opening everything.

CLIExtended access484Repository stars

A 13-skill delivery workflow for coding agents: from idea to plan, review, security audit, tests and a shipped pull request

PluginExtended access208Repository stars

An MCP server and CLI in Go: the agent keeps an index of code and database schema in the repository, versions it in Git and reads it whole before each task

MCP serverBroad access1.9KRepository stars

A local semantic code index: the agent searches by meaning, then follows hits into definitions, callers and dependency paths

MCP serverExtended access230Repository stars

Over twenty skills for coding agents: MCP and hooks, plan mode, a bug-fix protocol, prompting and a bash safety hook

SkillBroad access167Repository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Stacklit (this card)no114
Repomixnonot required29,161packs the whole repository into one file for a model; Stacklit keeps a compact index of modules and links and connects it to agents with setup
CodeGraphnonot required76,797keeps a local code graph behind an MCP server; Stacklit puts the index into the repository as a file any agent reads without a server

README in short

The documentation compares token spend on Express, FastAPI, Gin and Axum examples, lists the data extracted per language and describes manual setup without `stacklit setup`. Configuration in `.stacklitrc.json`, the GitHub Action and the four views of the visual map are covered separately.

README badge

Report a problem

Foxx AIStacklit
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.