A new open-source tool called Crespo is aiming to solve one of the most frustrating problems in AI-assisted development: context window limits that make feeding entire codebases to LLMs impractical. Created by Hrudul Krishna K V, a CS student who says he kept hitting AI's free tier limits while working on projects, Crespo uses real AST parsing via Tree-sitter—yes, the same parser GitHub, Neovim, and Zed rely on—to extract only what matters from a repository.
The Context Window Problem
You know the drill. Paste your codebase into ChatGPT or Claude. Hit the context limit before you get to the actual problem you're trying to solve. Try one file at a time instead? Now the AI has zero visibility into how modules connect, what imports exist, and where data flows through your architecture. Crespo takes a third path: extract the structural skeleton—imports, classes, functions, structs, enums—and discard the noise. The tool walks your repository while respecting .gitignore, skips test files and build artifacts, then runs actual language grammars through Tree-sitter rather than regex scraping or heuristic guessing. The output is a compact XML blueprint that preserves architectural understanding while dramatically reducing token count.
Supported Languages and Output Modes
Crespo currently supports ten languages out of the box: Python, JavaScript, TypeScript, JSX, TSX, Rust, Go, Java, C, and C++. The tool ships with three distinct modes. Structure mode (the default) generates an AST skeleton showing imports, classes, and functions—best for architecture reviews, onboarding, or providing LLM context. Summary mode requires a Groq API key but adds AI-generated one-line descriptions per file and function using that key. Concat mode preserves full source code with secrets redacted in structured XML format, useful when you genuinely need to pass entire repos to an LLM safely.
Token Reduction Benchmarks
The numbers here are genuinely impressive. In testing across eight real open-source repositories—Axios, Express, FastAPI, Flask, Requests, and others—Crespo's structure mode achieved an average token reduction of 86%. Express compressed from ~17,222 tokens down to just 707 (96% reduction). Axios went from ~61,494 tokens to 6,989 (89% reduction). Even smaller projects like the demo project Kara saw ~80% reduction. The only outlier was FastAPI at just 14% reduction—but that's because as a framework repo, its structure IS the content, and Crespo correctly preserves it rather than discarding useful framework scaffolding. Structure accuracy wasn't sacrificed for compression either. Tested by asking an LLM three questions from blueprints alone—components and connections, dependencies, entry point—the tool scored 2.75 out of 3 on average. The only partially correct answers came on framework-level repos where entry points are implicit rather than explicit, like FastAPI and Flask.
Security Features
For developers worried about accidentally leaking secrets when feeding code to LLMs, Crespo includes built-in redaction. It catches quoted assignments (api_key = "...", token: '...'), raw .env style entries (GROQ_KEY=abc123), and known key prefixes for Groq (gsk_), OpenAI (sk-), Anthropic (sk-ant-), GitHub (ghp_), AWS (AKIA), and Slack (xox). The tool also respects .gitignore during its initial walk, so it won't accidentally pull in sensitive files you've already told Git to ignore.
Key Takeaways
- Tree-sitter AST parsing provides accurate structural extraction without regex heuristics or fragile pattern matching
- 86% average token reduction preserves architectural understanding while fitting more code into context windows
- Three modes (structure, summary, concat) offer flexibility depending on your use case and privacy requirements
- Built-in secret redaction protects API keys before any data leaves your machine
The Bottom Line
If you're regularly fighting with context limits when debugging or refactoring unfamiliar codebases, Crespo is worth adding to your workflow. It's MIT licensed, available via pip, and the roadmap includes Ruby, PHP, Swift, and Kotlin support—plus more aggressive compression presets. Sometimes the best tools come from developers solving their own frustrations. GitHub: https://github.com/hrudulmmn/crespo | PyPI: pip install crespo