Back to browse
GitHub Repository

Static analysis engine that maps any codebase into ranked, token-budgeted context — offline, zero LLM cost

2 starsPython

ContextPack – CLI that maps any codebase into ranked context

by Sashank06·Apr 14, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemBig Brain

Two-pass scanner prunes folders before reading files, but keyword patterns beat structural analysis.

Strengths
  • Import graph traversal across 9 languages weights files by actual dependencies, not just heuristics.
  • Token-budgeted assembly with 20/80 metadata/snippet split prevents mid-file truncation.
  • Fully offline operation with zero API costs makes it viable for sensitive codebases.
Weaknesses
  • Pattern detection is keyword-based not structural, limiting accuracy on complex architectures.
  • Monorepo support is limited, and the space already has Cursor, Continue, and Sourcegraph Cody.
Target Audience

Developers working with unfamiliar codebases or building LLM code analysis tools

Similar To

Cursor · Continue · Sourcegraph Cody

Post Description

I'm a sophomore CS student and built this as a side project to solve a problem I kept running into — jumping into an unfamiliar codebase with no idea where to start.

It's a static analysis engine that: - Walks the repo in two passes (no unnecessary file reads) - Builds an import graph across 9 languages to rank files by importance - Assembles a token-budgeted context map in under 10 seconds - Works fully offline, no API key needed

I've tested it on Next.js and gemini-cli. It's not perfect — pattern detection is keyword-based not structural, and monorepo support is limited. Happy to discuss the tradeoffs.

Would genuinely love feedback on the engineering approach or anything that seems wrong/naive.

Install:pip install context-engine-cli

Similar Projects