townsendmerino

townsendmerino / ken

Public

Fast hybrid code search for agents. Pure Go, drop-in MCP-compatible with semble.

11
0
89% credibility
Found May 24, 2026 at 11 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Go
AI Summary

Ken is a code search tool that helps AI coding assistants find relevant code in your projects. Instead of manually searching through files or using slow grep commands, you simply ask questions like 'where do we handle authentication?' and ken instantly finds the most relevant code snippets. It works by indexing your codebase and using both keyword matching and AI-powered understanding to rank results. Ken connects to popular AI coding assistants like Claude Code, Cursor, and Codex, giving them fast, accurate code search without requiring API keys or cloud services. Everything runs locally on your computer.

How It Works

1
💡 You want your AI coding assistant to find code faster

You're using an AI coding assistant and notice it takes forever to search through your codebase or misses relevant files.

2
📦 You install ken in one click

You download a single small program to your computer—no extra tools or setup needed.

3
🤖 You connect ken to your AI coding assistant

You tell your coding assistant (like Claude Code, Cursor, or Codex) to use ken for searching your code.

4
🔍 You ask a question about your code

Instead of searching manually, you ask 'where do we handle user authentication?' and ken instantly finds the relevant files.

5
Choose your search style
🔤
Quick keyword search

Instant results using traditional text matching—no extra downloads needed

🧠
Smart semantic search

Download a small AI model once, then find code even when the words don't match exactly

6
📄 You get ranked code snippets with context

Ken shows you the most relevant code chunks, ranked by how well they match your question, with file names and line numbers.

Your AI assistant understands your codebase instantly

Now when you ask your coding assistant questions, it finds the right code immediately—no more guessing or missing files.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 11 to 11 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 ken?

Ken is a hybrid code search engine built in Go for AI agents. It combines lexical matching (BM25) with semantic embeddings to find relevant code chunks from natural language queries. The project is a Go port of the Python-based semble tool, designed as a drop-in MCP server that speaks the same JSON-RPC protocol, letting you swap it into existing agent setups without re-prompting. You install two binaries (`ken` and `ken-mcp`), optionally download a small embedding model, and search local repos from the CLI or through your agent's tool interface.

Why is it gaining traction?

The cold start problem kills Python-based agents. Ken's Go binaries start in 10-20ms versus the 500ms+ Python interpreter overhead that seems slow when you're running hundreds of queries per session. More importantly, the retrieval is tuned for agent input costs: at corpus scale, ken returns results in roughly 4,000 tokens versus 190,000 tokens for a grep-then-read workflow, a 44x reduction that matters when you're paying per token. The incremental indexing with file watching means an agent editing code mid-session sees its own changes without restarts. Pure Go means no Python environment, no GPU, no API keys, and trivial cross-compilation to any platform.

Who should use this?

AI coding agents (Claude Code, Cursor, Codex) that need to search large codebases will see the biggest benefit, especially on macOS where cold start latency is most noticeable. Developers building custom agent tooling with MCP will appreciate the drop-in compatibility with semble's tool schemas. Teams running code search in CI or containerized environments will value the single static binary with no runtime dependencies. If you're doing exhaustive refactoring or rename operations, stick with grep; ken is for "find me the chunk that answers this" queries where token budget matters.

Verdict

Ken is a well-documented, benchmark-driven tool with a clear niche: fast, token-efficient code search for agents in environments where Python overhead is a real constraint. The 0.899% credibility score reflects early-stage traction (11 stars), but the documentation is thorough, the parity testing against the Python reference is rigorous, and the design decisions are documented in ADRs. Worth trying if your agent workflow involves frequent code search calls.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.