Repolode
MinishLab

MinishLab/semble

Code search library for AI coding agents that returns only the relevant code snippets, running on CPU with no API keys.

Stars
6,361
Forks
286
Open issues
7
Last commit
3 days ago

What is it?

Semble is a code search library built for coding agents such as Claude Code, Cursor and Codex. Given a natural-language or code query, it returns the matching snippets from a repository instead of having the agent grep for keywords and read whole files, which cuts the tokens the agent spends on exploration.

It splits files into code-aware chunks with tree-sitter and scores each query with two retrievers: static Model2Vec embeddings for semantic similarity and BM25 for identifier and API name matches. Results are fused with Reciprocal Rank Fusion and reranked with signals such as definition boosts and penalties for test files. Indexes are cached and updated incrementally when files change.

Semble can be used as an MCP server, as a CLI with an AGENTS.md integration, or through its Python API. It accepts local paths or git URLs, can search several repos together, and supports code, docs and config content types.

Key features

  • 01Returns ranked code snippets for natural-language or code queries.
  • 02Runs on CPU with no API keys, GPU or external services required.
  • 03Provides an MCP server with search and find-related tools.
  • 04Includes a CLI and Python library for scripts and custom tooling.
  • 05Searches several local or remote git repositories as one corpus.
  • 06Respects .gitignore and .sembleignore and updates indexes incrementally.

Use cases

  • Letting a coding agent find the relevant functions before editing a large codebase.
  • Searching across several microservice repositories for an endpoint or definition.
  • Reducing token usage of agent workflows that otherwise grep and read full files.
  • Scripting code search in CI or sandboxed environments without network API calls.

Quick start

  1. 1

    Install uv (see the uv installation guide)

  2. 2

    Install semble as a uv tool

    uv tool install semble
  3. 3

    Run the interactive installer to set up agent integrations

    semble install

Things to know

  • The README cites a specific embedding model downloaded from Hugging Face on first use, which requires network access once.

In collections

Topics

FAQ

What is semble?
Code search library for AI coding agents that returns only the relevant code snippets, running on CPU with no API keys. Semble is a code search library built for coding agents such as Claude Code, Cursor and Codex. Given a natural-language or code query, it returns the matching snippets from a repository instead of having the agent grep for keywords and read whole files, which cuts the tokens the agent spends on exploration.
Is semble free to use? What license does it have?
semble is open source under the MIT license. Check the license terms before using it in commercial products.
Is semble still maintained?
Actively maintained. The last commit to semble was on Nov 3, 2026.
What can I use semble for?
Letting a coding agent find the relevant functions before editing a large codebase. Searching across several microservice repositories for an endpoint or definition. Reducing token usage of agent workflows that otherwise grep and read full files. Scripting code search in CI or sandboxed environments without network API calls.
How do I install semble?
Install uv (see the uv installation guide) Install semble as a uv tool: uv tool install semble Run the interactive installer to set up agent integrations: semble install
Where can I get semble?
The source code and installation instructions are on GitHub: https://github.com/MinishLab/semble

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects