|
| 1 | +# Stacklit |
| 2 | + |
| 3 | +**Your codebase, in 1,500 tokens.** |
| 4 | + |
| 5 | +One command generates a committed JSON index that any AI agent can read. No server, no setup. |
| 6 | + |
| 7 | +## Quick start |
| 8 | + |
| 9 | +```bash |
| 10 | +npx stacklit init |
| 11 | +``` |
| 12 | + |
| 13 | +This scans your codebase and generates: |
| 14 | + |
| 15 | +- `stacklit.json` -- machine-readable codebase index (commit this) |
| 16 | +- `stacklit.mmd` -- Mermaid dependency diagram (renders on GitHub) |
| 17 | +- `stacklit.html` -- interactive visual map with 4 views (gitignored) |
| 18 | + |
| 19 | +## Why |
| 20 | + |
| 21 | +AI coding agents burn most of their context window figuring out where things live. Reading one large file to find a function signature costs thousands of tokens. Every session starts from scratch. |
| 22 | + |
| 23 | +`stacklit.json` gives any agent a complete map of your codebase -- modules, dependencies, exports, types, activity -- in about 1,500 tokens. Commit it once, every agent benefits. |
| 24 | + |
| 25 | +## MCP server |
| 26 | + |
| 27 | +```bash |
| 28 | +stacklit serve |
| 29 | +``` |
| 30 | + |
| 31 | +Add to Claude Desktop or Cursor MCP config: |
| 32 | + |
| 33 | +```json |
| 34 | +{ |
| 35 | + "mcpServers": { |
| 36 | + "stacklit": { |
| 37 | + "command": "stacklit", |
| 38 | + "args": ["serve"] |
| 39 | + } |
| 40 | + } |
| 41 | +} |
| 42 | +``` |
| 43 | + |
| 44 | +Six tools: `get_overview`, `get_module`, `find_module`, `get_dependencies`, `get_hot_files`, `get_hints`. |
| 45 | + |
| 46 | +## CLI |
| 47 | + |
| 48 | +``` |
| 49 | +stacklit init # scan, generate all outputs, open HTML |
| 50 | +stacklit generate # regenerate from current source |
| 51 | +stacklit view # regenerate HTML and open in browser |
| 52 | +stacklit diff # check if index is stale |
| 53 | +stacklit serve # start MCP server |
| 54 | +``` |
| 55 | + |
| 56 | +## Language support |
| 57 | + |
| 58 | +Go (AST), TypeScript, JavaScript, Python, Rust, Java (regex), plus generic fallback for any language. |
| 59 | + |
| 60 | +## Links |
| 61 | + |
| 62 | +- [GitHub](https://github.com/glincker/stacklit) |
| 63 | +- [Full documentation](https://github.com/glincker/stacklit#readme) |
| 64 | +- [Releases](https://github.com/glincker/stacklit/releases) |
| 65 | + |
| 66 | +## License |
| 67 | + |
| 68 | +MIT |
0 commit comments