hey-granth

Codebase context compiler for AI agents. Graph-ranked, token-budgeted, tier-compressed output. Smarter than the existing ones.

18
0
100% credibility
Found Mar 20, 2026 at 18 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Python
AI Summary

codectx is a command-line tool that analyzes a codebase, ranks files by importance using dependency graphs and git history, compresses them into structured summaries, and outputs a single Markdown document optimized for large language models.

How It Works

1
🕵️ Discover codectx

You hear about this handy tool that turns your messy code project into a neat summary AI can easily understand.

2
📥 Set it up

You add it to your computer in one quick step, like installing a simple app.

3
📁 Pick your project

You point it to the folder holding all your project's files.

4
🔍 Let it analyze

It scans everything, picks the most important parts, and squeezes them into smart summaries – you watch the progress and feel excited as it works.

5
Customize if you want

You can tweak things like how much detail to include or focus on recent changes, but it works great right away too.

🎉 Get your smart summary

A clean file pops out with your project's blueprint – now feed it to your AI helper and watch it understand your code perfectly, saving tons of time!

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 18 to 18 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is codectx?

codectx is a Python CLI tool that scans your repo, builds a dependency graph, and ranks files by importance using git history, fan-in centrality, and entry-point proximity. It compresses the codebase context into a single markdown file—full source for entry points, structured summaries for core modules, signatures for supporting ones, and one-liners for the rest—all fitted to a token budget for LLM consumption. This solves the problem of dumping raw repos into AI agents like GitHub Copilot or Cursor, where noise from tests and boilerplate drowns out architecture and key logic.

Why is it gaining traction?

It outperforms naive codebase indexing by slashing tokens 76% on average (e.g., rich from 354k to 28k), fitting even large GitHub codebases into 128k windows, while preserving signal via tiered compression and Mermaid dep graphs. Standout user features include watch mode for live updates, semantic search via `--query`, task profiles like `--task debug`, and multi-language support for Python, JS/TS, Go, Rust, and more. Developers hook on the auditable ranked-files table and safety checks for sensitive files.

Who should use this?

Backend engineers debugging large monorepos with GitHub Copilot or Continue, where context limits kill reasoning. AI agent builders feeding codebase context to LLMs for RAG or MCP tasks. Teams documenting architecture via auto-generated CONTEXT.md for onboarding or VSCode/Cursor extensions.

Verdict

Try it for repos over 50k tokens—benchmarks deliver real compression wins, docs are solid with config examples, and tests cover core paths. At 18 stars and 1.0% credibility, it's alpha-stage raw; expect bugs in edge cases, but MIT license and PyPI-ready make it low-risk to eval.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.