
I Built a Local Codebase Search Tool for AI Queries — Without Uploading a Single Line of Code
Every AI coding tool I’ve used has the same problem: to understand your codebase, it needs to see your codebase. Which means sending it somewhere. For most projects that’s fine. For anything with proprietary logic, unreleased features, or internal API details — it’s a problem you think about every time you paste something. I wanted a different option. So I built ctx-kit : a local BM25 search engine for your codebase. It finds the files most relevant to your question, formats them as a context block, and lets you paste that into any AI tool. Nothing is sent automatically. How it works # Index your project (runs locally, saves to .ctx-index.json) ctx index . # Ask a question ctx ask "how does authentication work?" Output: # Context for: how does authentication work? ## src/auth/jwt.py (relevance: 4.21) python def create_token(user_id: str) -> str: """Create a signed JWT for the given user.""" ... def verify_token(token: str) -> dict: """Verify and decode a JWT. Raises if invalid.""" ...
Continue reading on Dev.to Python
Opens in a new tab


