{"repo":"hey-granth/codectx","free":true,"listed":false,"github":"https://github.com/hey-granth/codectx","clone":"git clone https://github.com/hey-granth/codectx.git","description":"Codebase context compiler for AI agents. Graph-ranked, token-budgeted, tier-compressed output. Smarter than the existing ones.","language":"Python","stars":29,"topics":["ai","ai-agents","cli","cli-tool","context","model-context-protocol","python","python3","tree-sitter"],"license":"MIT","category":"ai-agents","readme_excerpt":"codectx A CLI tool that compiles repository context for AI agents — ranking files by importance, compressing them into structured summaries, and emitting a single markdown document optimized for LLM reasoning. The problem Feeding a raw repository to an AI agent wastes context. Most files are noise — tests, docs, boilerplate, lockfiles. The signal (core architecture, key abstractions, dependency structure) is buried. Naive approaches either blow past context limits or arbitrarily truncate. Neither helps an agent reason about a codebase. How codectx works codectx treats context generation as a compilation step: 1. Scans the repository and builds a dependency graph 2. Scores every file by fan-in centrality, git commit frequency, and entry-point proximity 3. Assigns tiers — top 15% get structured summaries, next 30% get signatures, rest get one-liners 4. Enforces a token budget, highest-signal files first 5. Emits a structured CONTEXT.md an agent can reason from immediately The output is not a source dump. Core files get AST-derived structured summaries: purpose, internal dependencies, public types, and function signatures — at roughly 10% of the token cost of the raw source. Benchmark Tested against five well-known Python repos. Naive baseline counts all source files excluding tests, docs, and examples — the same file set codectx analyzes. Repo Naive tokens codectx tokens Reduction ------ -------------- ---------------- ----------- fastapi 224k 78k 64.9% requests 41k 6k 84.7% ty","default_branch":null,"files":null,"tree":[],"storefront":"/r/hey-granth","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hey-granth/codectx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}