MinishLab/semblePublic

Fast and Accurate Code Search for Agents. Uses 99% fewer tokens than grep+read

AI summary: A highly token-efficient, CPU-bound code search tool designed specifically for AI agents via MCP.

Stars
6.2K
+12 today
Forks
271
Watchers
18
Open issues
2
Open PRs
0
Contributors
~10
Commits
150
Branches
6

PythonMITCreated Apr 6, 2026Last push 1d agoLatest release v0.6.1+36 stars this week+188 this month

Quick answers

What is semble?
A highly token-efficient, CPU-bound code search tool designed specifically for AI agents via MCP.
What does semble do?
Semble is a fast, CPU-only code search library built to dramatically reduce token consumption for coding agents. Instead of forcing agents to grep and read entire files, Semble allows them to query the codebase in natural language and returns only the exact, relevant code snippets. It builds an embedding index of an average repository in under 500 milliseconds and executes queries in ~1 millisecond. Providing retrieval quality on par with code-specialized transformers, Semble integrates seamlessly with tools like Claude Code, Cursor, and any MCP-compatible client. It requires no API keys, GPUs, or external services, functioning entirely locally to optimize both cost and context window usage.
Who is semble for?
Developers using AI coding agents who want to minimize token usage and API costs. It is ideal for users with large codebases who need their agents to perform fast, semantic code searches completely locally via MCP.
How do I get started with semble?
uv tool install semble && semble install
How popular is semble on GitHub?
MinishLab/semble has 6,178 stars and 271 forks on GitHub, and gained 36 stars in the last 7 days.
What license does semble use?
MinishLab/semble is released under the MIT license.

Star history

since Jul 28, 2026
02K4K6KJul 2026Aug 2026Sep 2026Oct 2026
6.2K stars as of Oct 4, 2026. Measured daily since Jul 28, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
OctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 1 commit2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 1 commit2026-04-10: 2 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 3 commits2026-04-15: 10 commits2026-04-16: 8 commits2026-04-17: 1 commit2026-04-18: 1 commit2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 1 commit2026-04-22: 5 commits2026-04-23: 2 commits2026-04-24: 3 commits2026-04-25: 1 commit2026-04-26: 5 commits2026-04-27: 1 commit2026-04-28: 2 commits2026-04-29: 4 commits2026-04-30: 4 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 5 commits2026-05-05: 2 commits2026-05-06: 0 commits2026-05-07: 2 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 7 commits2026-05-12: 2 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 2 commits2026-05-18: 6 commits2026-05-19: 3 commits2026-05-20: 2 commits2026-05-21: 4 commits2026-05-22: 3 commits2026-05-23: 0 commits2026-05-24: 2 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 1 commit2026-05-28: 1 commit2026-05-29: 1 commit2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 2 commits2026-06-04: 4 commits2026-06-05: 1 commit2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 4 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 3 commits2026-06-19: 0 commits2026-06-20: 1 commit2026-06-21: 0 commits2026-06-22: 2 commits2026-06-23: 1 commit2026-06-24: 0 commits2026-06-25: 0 commits2026-06-26: 0 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 0 commits2026-07-01: 0 commits2026-07-02: 0 commits2026-07-03: 1 commit2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 1 commit2026-07-07: 0 commits2026-07-08: 1 commit2026-07-09: 0 commits2026-07-10: 0 commits2026-07-11: 0 commits2026-07-12: 0 commits2026-07-13: 1 commit2026-07-14: 0 commits2026-07-15: 0 commits2026-07-16: 0 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 0 commits2026-07-20: 0 commits2026-07-21: 1 commit2026-07-22: 3 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 0 commits2026-07-27: 1 commit2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 1 commit2026-08-02: 0 commits2026-08-03: 2 commits2026-08-04: 1 commit2026-08-05: 0 commits2026-08-06: 1 commit2026-08-07: 0 commits2026-08-08: 0 commits2026-08-09: 0 commits2026-08-10: 0 commits2026-08-11: 1 commit2026-08-12: 1 commit2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 0 commits2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 0 commits2026-08-23: 0 commits2026-08-24: 0 commits2026-08-25: 1 commit2026-08-26: 1 commit2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 0 commits2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 2 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 1 commit2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 5 commits2026-09-12: 1 commit2026-09-13: 0 commits2026-09-14: 0 commits2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 1 commit2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 0 commits2026-09-22: 0 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 4 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 1 commit2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits
149 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Actively maintained

    Pushed within 48 hours

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What semble does

Semble is a fast, CPU-only code search library built to dramatically reduce token consumption for coding agents. Instead of forcing agents to grep and read entire files, Semble allows them to query the codebase in natural language and returns only the exact, relevant code snippets. It builds an embedding index of an average repository in under 500 milliseconds and executes queries in ~1 millisecond. Providing retrieval quality on par with code-specialized transformers, Semble integrates seamlessly with tools like Claude Code, Cursor, and any MCP-compatible client. It requires no API keys, GPUs, or external services, functioning entirely locally to optimize both cost and context window usage.

Developers using AI coding agents who want to minimize token usage and API costs. It is ideal for users with large codebases who need their agents to perform fast, semantic code searches completely locally via MCP.

  • Ultra-Fast Indexing: Builds a complete local code index in under 500 milliseconds and answers natural language queries in ~1 millisecond.
  • High Token Efficiency: Returns highly specific snippets rather than full files, utilizing roughly 99% fewer tokens than standard grep-and-read workflows.
  • CPU-Only Execution: Operates entirely on the CPU without requiring a GPU, external API keys, or cloud services.
  • Seamless MCP Integration: Acts as a Model Context Protocol server, directly plugging into agents like Claude Code, Cursor, and OpenCode.
  • Targeted Content Filtering: Allows users to restrict searches specifically to code, documentation, configuration files, or everything.
  • Git Ignore Compliance: Automatically respects .gitignore and custom .sembleignore files to exclude irrelevant or sensitive files from the index.

Where teams use it

Context Window Optimization

Helps developers prevent their AI agents from blowing out their context window by retrieving only the exact relevant lines of code instead of entire files.

Natural Language Code Discovery

Allows agents and developers to find complex logic flows (like 'authentication flow' or 'database connection') using semantic queries rather than rigid regex patterns.

Offline Agent Capabilities

Equips local, privacy-focused coding agents with powerful semantic search capabilities without needing to transmit codebase data to external embedding APIs.

Cross-Repository Search

Enables users to quickly index and search remote git repositories on-demand directly from the CLI to locate specific implementation details.

Getting started: uv tool install semble && semble install

README

main branch

semble logo
Fast and Accurate Code Search for Agents
Uses ~99% fewer tokens than grep+read

Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~99% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second for most repos, matching the retrieval quality of a code-specialized transformer while indexing ~380x faster and querying ~17x faster (see benchmarks). Everything runs on CPU with no API keys, GPU, or external services. Use it as an MCP server, a CLI tool via AGENTS.md, or a dedicated sub-agent, and any coding agent (Claude Code, Cursor, Codex, OpenCode, etc.) gets instant access to any repo.

semble install detecting Claude Code, Cursor, and Codex, then semble search returning ranked code snippets from pydantic

Quickstart

Your agent queries Semble in natural language (e.g. "How is authentication handled?") and gets back only the relevant code snippets, without grepping or reading full files.

The fastest way to get started is the interactive installer. Install uv, then run:

uv tool install semble
semble install

semble install detects installed coding agents such as Claude Code, Codex, and OpenCode, and then lets you choose which integrations to enable:

  • MCP server: lets the agent call Semble directly as a tool.
  • Instructions: adds CLI usage guidance to AGENTS.md / CLAUDE.md.
  • Sub-agent: installs a dedicated semble-search sub-agent.

To undo the setup, run semble uninstall.

For manual setup instructions (MCP config per agent, AGENTS.md snippet, sub-agent files), see the installation docs.

Updating Semble
uv tool upgrade semble   # upgrade
uv cache clean semble    # for MCP users (restart your MCP client after)
Unattended install

For sandboxed or scripted environments, skip the prompts with --agent and, optionally, --type:

semble install --agent claude --type mcp subagent --yes

--agent accepts one or more agent ids (e.g. claude, codex, pi); --type accepts mcp, instructions, subagent, or all (default: all); --yes skips the confirmation prompt (requires --agent for a fully non-interactive run).

Main Features

  • Fast: indexes an average repo in ~500 ms and answers queries in ~1 ms, all on CPU.
  • Accurate: NDCG@10 of 0.854 on our benchmarks, on par with code-specialized transformer models, at a fraction of the size and cost.
  • Token-efficient: returns only the relevant chunks, using ~99% fewer tokens than grep+read.
  • Zero setup: runs on CPU with no API keys, GPU, or external services required.
  • MCP server: works with Claude Code, Cursor, Codex, OpenCode, VS Code, and any other MCP-compatible agent.
  • Local and remote: pass a local path or a git URL, or several of them to search related repos together.

CLI

Semble also ships as a standalone CLI. This is useful in scripts or anywhere you want search results without an MCP session. Indexes are built and cached on first run, and invalidated automatically when files change.

# Search a local repo (index is built and cached automatically)
semble search "authentication flow" ./my-project

# Search a remote repo (cloned on demand)
semble search "save model to disk" https://github.com/MinishLab/model2vec

# Search several repos at once (results are prefixed with the repo name)
semble search "invoice endpoint" ./service-a ./service-b

# Limit results
semble search "save model to disk" ./my-project --top-k 10

# Search docs/config/everything instead of just code
semble search "deployment guide" ./my-project --content docs   # or: config, all

# Find code similar to a known location
semble find-related src/auth.py 42 ./my-project

# Show only the first N lines of each result's snippet (0 = path/line range only)
semble search "authentication flow" ./my-project --max-snippet-lines 10

--content accepts code (default), docs, config, or all. --format accepts json (default) or text. path defaults to the current directory when omitted; git URLs are accepted. If semble is not on $PATH, use uvx --from "semble[mcp]" semble in its place. semble --version (or -V) prints the installed version.

Passing several paths or URLs searches them as one corpus, so a query from repo A can find an endpoint defined in repo B. Each index is cached per repo and merged at query time. Result paths are prefixed with the repo name (service-b/api/invoices.py) and the output includes a repos map from prefix to absolute path or URL. Pass the prefixed path to find-related to search across all repos from a known location.

Controlling which files are indexed

Semble reads .gitignore and .sembleignore files to determine which files to index. Both files use standard gitignore syntax and their patterns are merged. .sembleignore lets you add semble-specific rules without touching .gitignore. Rules are applied recursively, so a .sembleignore in a subdirectory applies to that subtree.

Excluding files: add patterns the same way you would in .gitignore:

# .sembleignore
generated/     # exclude generated dir
*.pb.go.       # exclude Go protobuf files

Including non-default extensions: prefix the extension pattern with ! to force-include files that semble wouldn't index by default:

# .sembleignore
!*.proto       # include Protobuf files
!*.cob         # include COBOL files

Semble also always skips a set of well-known non-source directories regardless of ignore files (e.g. node_modules/, .venv/, dist/, build/, __pycache__/, and similar).

Savings

semble savings shows how many tokens semble has saved across all your searches:

semble savings
  Semble Token Savings
  ════════════════════════════════════════════════════════════════════════

  Total saved:  ~714.2M tokens  (94%)
  Total calls:  14.3k
  Efficiency:  ███████████████████████░  94%

  By Period
  ────────────────────────────────────────────────────────────────────────
  Period             Calls           Saved  Ratio
  ────────────────────────────────────────────────────────────────────────
  Today                198    ~1.4M tokens  ███████████████████████░  95%
  Last 7 days        13.1k  ~707.2M tokens  ███████████████████████░  94%
  All time           14.3k  ~714.2M tokens  ███████████████████████░  94%

  By Call Type
  ────────────────────────────────────────────────────────────────────────
  #     Call type            Calls  Share
  ────────────────────────────────────────────────────────────────────────
  1.    search               14.1k  ████████████████    99%
  2.    find_related           205  █░░░░░░░░░░░░░░░     1%
  ════════════════════════════════════════════════════════════════════════

Savings are calculated as follows: for each call, semble records the total character count of the unique files containing returned chunks and the character count of the snippets returned. Estimated tokens saved is (file chars − snippet chars) / 4 (4 chars per token). This is a conservative estimate: the baseline is reading matched files in full, which is how coding agents often explore unfamiliar code.

Storage

By default, your Semble savings statistics and any saved indexes are stored in the OS cache folder (~/Library/Caches/semble/ on macOS, ~/.cache/semble/ on Linux, %LOCALAPPDATA%\semble\Cache\ on Windows). To override this location you can supply an environment variable SEMBLE_CACHE_LOCATION which should be the full path to the target cache location e.g. ~/my-folder/my-caches/semble.

Files larger than 1 MB are skipped during indexing to keep index builds lean. Skipped files are reported as a warning at index time. If you work with large generated or ingested documents, you can raise (or lower) this limit with the SEMBLE_MAX_FILE_BYTES environment variable (in bytes).

On first use, Semble also downloads the embedding model from Hugging Face and caches it in the standard Hugging Face cache (~/.cache/huggingface/ by default, or $HF_HOME if set); this only happens once and requires network access.

Use semble clear to remove cached data: semble clear index (saved indexes), semble clear savings (usage stats), semble clear orphans (indexes for repos no longer present on disk), or semble clear all (everything).

Library usage

Semble can also be used as a Python library for programmatic access, useful when building custom tooling or integrating search directly into your own code.

from semble import ContentType, SembleIndex

# Index a local directory (code only, the default)
index = SembleIndex.from_path("./my-project")

# Index docs and prose (markdown, rst, etc.)
index = SembleIndex.from_path("./my-project", content=ContentType.DOCS)

# Index everything (code, docs, and config)
index = SembleIndex.from_path("./my-project", content=[ContentType.CODE, ContentType.DOCS, ContentType.CONFIG])

# Index code and docs together
index = SembleIndex.from_path("./my-project", content=[ContentType.CODE, ContentType.DOCS])

# Index a remote git repository
index = SembleIndex.from_git("https://github.com/MinishLab/model2vec")

# Merge indexes from several repos into one (chunk paths are prefixed with the repo name)
index = SembleIndex.merge([("./service-a", SembleIndex.from_path("./service-a")), ("./service-b", SembleIndex.from_path("./service-b"))])

# Search the index with a natural-language or code query
results = index.search("save model to disk", top_k=3)

# Find code similar to a specific result
related = index.find_related(results[0], top_k=3)

# Each result exposes the matched chunk
result = results[0]
result.chunk.file_path   # "model2vec/model.py"
result.chunk.start_line  # 127
result.chunk.end_line    # 150
result.chunk.content     # "def save_pretrained(self, path: PathLike, ..."

MCP Server

Semble runs as an MCP server so agents can search any codebase directly as a native tool call. Repos are indexed on demand and cached; local paths are re-indexed automatically on file changes.

Tool Description
search Search a codebase with a natural-language or code query. Pass repo as a local path or an https:// git URL (or a list of them to search several repos together) and content as code, docs, config, or all (default: code).
find_related Given a file path and line number, return chunks semantically similar to the code at that location.

For per-agent setup instructions, see the installation docs.

Benchmarks

We benchmark quality and speed across ~1,250 queries over 63 repositories in 19 languages (left), and token efficiency against grep+read at equivalent recall levels (right).

Speed vs quality Token efficiency: recall vs. retrieved tokens

The quality benchmark (left) scores retrieval quality (NDCG@10) against total latency; semble matches the quality of the 137M-parameter CodeRankEmbed while indexing 380x faster. The token efficiency benchmark (right) measures how many tokens each method needs to reach a given recall level; semble uses 99% fewer tokens on average and hits 97% recall at only 2k tokens, while grep+read needs a full 100k context window to reach 85%. See benchmarks for per-language results, ablations, and full methodology.

How it works

Semble splits each file into code-aware chunks using tree-sitter, then scores every query against the chunks with two complementary retrievers: static Model2Vec embeddings using the code-specialized potion-code-16M-v2 model for semantic similarity, and BM25 for lexical matches on identifiers and API names. The two score lists are fused with Reciprocal Rank Fusion (RRF).

After fusing, results are reranked with a set of code-aware signals:

Ranking signals
  • Adaptive weighting. Symbol-like queries (Foo::bar, _private, getUserById) get more lexical weight, while natural-language queries stay balanced between semantic and lexical retrievers.
  • Definition boosts. A chunk that defines the queried symbol (a class, def, func, etc.) is ranked above chunks that merely reference it.
  • Identifier stems. Query tokens are stemmed and matched against identifier stems in a chunk, giving an additional weight to chunks that contain them. For example, querying parse config boosts chunks containing parseConfig, ConfigParser, or config_parser.
  • File coherence. When multiple chunks from the same file match the query, the file is boosted so the top result reflects broad file-level relevance rather than a single out-of-context chunk.
  • Noise penalties. Test files, compat//legacy/ shims, example code, and .d.ts declaration stubs are down-ranked so canonical implementations surface first.

Because the embedding model is static with no transformer forward pass at query time, all of this runs in milliseconds on CPU.

Indexes are cached to disk automatically on the first search. On subsequent runs, Semble walks the file tree and compares modification times; added, removed, or changed files are reindexed incrementally, without rebuilding the rest of the index. A full rebuild only happens if the indexing settings change (e.g., after a semble upgrade that changes the model, chunking, or cache format). In MCP mode, the index is checked and refreshed automatically as files change, so results stay current across the session.

Using a custom model

If you would like to use another model, you can set your SEMBLE_MODEL_NAME environment variable to a local path or Hugging Face repository. This path is read verbatim, and should contain a Model2Vec compatible model. This is particularly useful if you can't access Hugging Face at runtime.

Acknowledgements

Thanks to Greptile for providing free access to their AI code review platform.

License

MIT

Citing

If you use Semble in your research, please cite the following:

@software{minishlab2026semble,
  author       = {{van Dongen}, Thomas and Stephan Tulkens},
  title        = {Semble: Fast and Accurate Code Search for Agents},
  year         = {2026},
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.19785932},
  url          = {https://github.com/MinishLab/semble},
  license      = {MIT}
}
View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Releases and announcements

29 total
  1. v0.6.1v0.6.1Sep 25, 2026

    ## What's Changed * benchmarks: Add zvec-grep to benchmarks by @Pringled in https://github.com/MinishLab/semble/pull/268 * chore: Hide HF unauthenticated warning by @Pringled in https://github.com/MinishLab/semble/pull/270 * chore: Simplify SEMBLE_MAX_FILE_BYTES handling and CLI logging setup by @Pringled in https://github.com/MinishLab/semble/pull/271 * chore: Remove dead code and deduplicate internals by @Pringled in https://github.com/MinishLab/semble/pull/272 * feat: Add idle TTL for MCP in-memory index cache by @Pringled in https://github.com/MinishLab/semble/pull/273 * feat: Add Grok Build, Qwen Code, Cline, and Kilo Code installer support by @Pringled in https://github.com/MinishLab/semble/pull/275 **Full Changelog**: https://github.com/MinishLab/semble/compare/v0.6.0...v0.6.1

  2. v0.6.0v0.6.0Sep 11, 2026

    ## What's Changed * Correct eleven gold annotations pointing at dead, shim, or deprecated files by @Hartistic in https://github.com/MinishLab/semble/pull/259 * fix: remove max length by @stephantul in https://github.com/MinishLab/semble/pull/264 * feat: Add progress bar and pretty print for CLI by @Pringled in https://github.com/MinishLab/semble/pull/261 * docs: Add readme demo by @Pringled in https://github.com/MinishLab/semble/pull/265 * feat: Add multi repo search support by @Pringled in https://github.com/MinishLab/semble/pull/263 * feat: Fix chunk source line counting, add semble-only benchmark option by @Pringled in https://github.com/MinishLab/semble/pull/266 * chore: Pin dependencies by @Pringled in https://github.com/MinishLab/semble/pull/267 ## New Contributors * @Hartistic made their first contribution in https://github.com/MinishLab/semble/pull/259 **Full Changelog**: https://github.com/MinishLab/semble/compare/v0.5.6...v0.6.0

  3. v0.5.6v0.5.6Sep 5, 2026

    ## What's Changed * Make max file size configurable via SEMBLE_MAX_FILE_BYTES and warn on skipped files by @TommyC81 in https://github.com/MinishLab/semble/pull/252 * fix: permission issues in sandboxes by @stephantul in https://github.com/MinishLab/semble/pull/256 * fix: Double embedding pass on fresh index by @Pringled in https://github.com/MinishLab/semble/pull/260 ## New Contributors * @TommyC81 made their first contribution in https://github.com/MinishLab/semble/pull/252 **Full Changelog**: https://github.com/MinishLab/semble/compare/v0.5.5...v0.5.6

  4. v0.5.5v0.5.5Aug 12, 2026

    ## What's Changed * docs: update readme to include model alternative by @stephantul in https://github.com/MinishLab/semble/pull/248 * feat: add content filter to MCP by @Pringled in https://github.com/MinishLab/semble/pull/247 **Full Changelog**: https://github.com/MinishLab/semble/compare/v0.5.4...v0.5.5

  5. v0.5.4v0.5.4Aug 6, 2026

    ## What's Changed * feat: Add clear orphans command by @jedijashwa in https://github.com/MinishLab/semble/pull/243 * fix: Fix Windows console issues by @Pringled in https://github.com/MinishLab/semble/pull/244 ## New Contributors * @jedijashwa made their first contribution in https://github.com/MinishLab/semble/pull/243 **Full Changelog**: https://github.com/MinishLab/semble/compare/v0.5.3...v0.5.4

Code frequency

additions and deletions
+30.2K-30.2KWeek of 2026-04-05: +4,201 linesWeek of 2026-04-05: -80 linesWeek of 2026-04-12: +17,796 linesWeek of 2026-04-12: -3,420 linesWeek of 2026-04-19: +21,587 linesWeek of 2026-04-19: -4,295 linesWeek of 2026-04-26: +3,390 linesWeek of 2026-04-26: -493 linesWeek of 2026-05-03: +1,039 linesWeek of 2026-05-03: -582 linesWeek of 2026-05-10: +660 linesWeek of 2026-05-10: -436 linesWeek of 2026-05-17: +30,214 linesWeek of 2026-05-17: -22,976 linesWeek of 2026-05-24: +854 linesWeek of 2026-05-24: -495 linesWeek of 2026-05-31: +1,919 linesWeek of 2026-05-31: -430 linesWeek of 2026-06-07: +315 linesWeek of 2026-06-07: -87 linesWeek of 2026-06-14: +1,695 linesWeek of 2026-06-14: -108 linesWeek of 2026-06-21: +229 linesWeek of 2026-06-21: -238 linesWeek of 2026-06-28: +164 linesWeek of 2026-06-28: -29 linesWeek of 2026-07-05: +11,072 linesWeek of 2026-07-05: -9,545 linesWeek of 2026-07-12: +19 linesWeek of 2026-07-12: -9 linesWeek of 2026-07-19: +819 linesWeek of 2026-07-19: -125 linesWeek of 2026-07-26: +24,357 linesWeek of 2026-07-26: -212 linesWeek of 2026-08-02: +220 linesWeek of 2026-08-02: -106 linesWeek of 2026-08-09: +184 linesWeek of 2026-08-09: -101 linesWeek of 2026-08-16: +0 linesWeek of 2026-08-16: -0 linesWeek of 2026-08-23: +154 linesWeek of 2026-08-23: -19 linesWeek of 2026-08-30: +8,416 linesWeek of 2026-08-30: -36 linesWeek of 2026-09-06: +19,166 linesWeek of 2026-09-06: -1,990 linesWeek of 2026-09-13: +30 linesWeek of 2026-09-13: -0 linesWeek of 2026-09-20: +0 linesWeek of 2026-09-20: -0 linesApr 5, 2026Sep 20, 2026
+148.5K lines added, -45.8K removed over the last year.

Commits per week

last 52 weeks
230Week of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 4 commitsWeek of 2026-04-12: 23 commitsWeek of 2026-04-19: 12 commitsWeek of 2026-04-26: 16 commitsWeek of 2026-05-03: 9 commitsWeek of 2026-05-10: 9 commitsWeek of 2026-05-17: 20 commitsWeek of 2026-05-24: 5 commitsWeek of 2026-05-31: 7 commitsWeek of 2026-06-07: 4 commitsWeek of 2026-06-14: 4 commitsWeek of 2026-06-21: 3 commitsWeek of 2026-06-28: 1 commitsWeek of 2026-07-05: 2 commitsWeek of 2026-07-12: 1 commitsWeek of 2026-07-19: 4 commitsWeek of 2026-07-26: 2 commitsWeek of 2026-08-02: 4 commitsWeek of 2026-08-09: 2 commitsWeek of 2026-08-16: 0 commitsWeek of 2026-08-23: 2 commitsWeek of 2026-08-30: 2 commitsWeek of 2026-09-06: 7 commitsWeek of 2026-09-13: 1 commitsWeek of 2026-09-20: 4 commitsWeek of 2026-09-27: 1 commitsOct 5, 2025Sep 27, 2026
149 commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 0 commitsSun 1:00 — 0 commitsSun 2:00 — 0 commitsSun 3:00 — 0 commitsSun 4:00 — 0 commitsSun 5:00 — 0 commitsSun 6:00 — 0 commitsSun 7:00 — 0 commitsSun 8:00 — 0 commitsSun 9:00 — 0 commitsSun 10:00 — 1 commitsSun 11:00 — 3 commitsSun 12:00 — 3 commitsSun 13:00 — 0 commitsSun 14:00 — 0 commitsSun 15:00 — 0 commitsSun 16:00 — 0 commitsSun 17:00 — 0 commitsSun 18:00 — 0 commitsSun 19:00 — 1 commitsSun 20:00 — 1 commitsSun 21:00 — 0 commitsSun 22:00 — 0 commitsSun 23:00 — 0 commitsMon 0:00 — 0 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 0 commitsMon 5:00 — 0 commitsMon 6:00 — 0 commitsMon 7:00 — 1 commitsMon 8:00 — 9 commitsMon 9:00 — 4 commitsMon 10:00 — 0 commitsMon 11:00 — 2 commitsMon 12:00 — 0 commitsMon 13:00 — 0 commitsMon 14:00 — 3 commitsMon 15:00 — 1 commitsMon 16:00 — 3 commitsMon 17:00 — 1 commitsMon 18:00 — 2 commitsMon 19:00 — 0 commitsMon 20:00 — 1 commitsMon 21:00 — 0 commitsMon 22:00 — 0 commitsMon 23:00 — 0 commitsTue 0:00 — 0 commitsTue 1:00 — 0 commitsTue 2:00 — 0 commitsTue 3:00 — 0 commitsTue 4:00 — 0 commitsTue 5:00 — 0 commitsTue 6:00 — 0 commitsTue 7:00 — 1 commitsTue 8:00 — 4 commitsTue 9:00 — 1 commitsTue 10:00 — 0 commitsTue 11:00 — 3 commitsTue 12:00 — 0 commitsTue 13:00 — 0 commitsTue 14:00 — 2 commitsTue 15:00 — 1 commitsTue 16:00 — 1 commitsTue 17:00 — 2 commitsTue 18:00 — 2 commitsTue 19:00 — 1 commitsTue 20:00 — 0 commitsTue 21:00 — 1 commitsTue 22:00 — 0 commitsTue 23:00 — 0 commitsWed 0:00 — 0 commitsWed 1:00 — 0 commitsWed 2:00 — 0 commitsWed 3:00 — 0 commitsWed 4:00 — 0 commitsWed 5:00 — 0 commitsWed 6:00 — 1 commitsWed 7:00 — 2 commitsWed 8:00 — 2 commitsWed 9:00 — 5 commitsWed 10:00 — 2 commitsWed 11:00 — 2 commitsWed 12:00 — 4 commitsWed 13:00 — 0 commitsWed 14:00 — 1 commitsWed 15:00 — 2 commitsWed 16:00 — 2 commitsWed 17:00 — 3 commitsWed 18:00 — 4 commitsWed 19:00 — 1 commitsWed 20:00 — 0 commitsWed 21:00 — 0 commitsWed 22:00 — 0 commitsWed 23:00 — 0 commitsThu 0:00 — 0 commitsThu 1:00 — 0 commitsThu 2:00 — 0 commitsThu 3:00 — 0 commitsThu 4:00 — 0 commitsThu 5:00 — 0 commitsThu 6:00 — 0 commitsThu 7:00 — 2 commitsThu 8:00 — 10 commitsThu 9:00 — 6 commitsThu 10:00 — 2 commitsThu 11:00 — 0 commitsThu 12:00 — 0 commitsThu 13:00 — 1 commitsThu 14:00 — 0 commitsThu 15:00 — 2 commitsThu 16:00 — 1 commitsThu 17:00 — 1 commitsThu 18:00 — 0 commitsThu 19:00 — 1 commitsThu 20:00 — 1 commitsThu 21:00 — 3 commitsThu 22:00 — 0 commitsThu 23:00 — 0 commitsFri 0:00 — 0 commitsFri 1:00 — 0 commitsFri 2:00 — 0 commitsFri 3:00 — 0 commitsFri 4:00 — 0 commitsFri 5:00 — 0 commitsFri 6:00 — 1 commitsFri 7:00 — 3 commitsFri 8:00 — 4 commitsFri 9:00 — 1 commitsFri 10:00 — 2 commitsFri 11:00 — 5 commitsFri 12:00 — 1 commitsFri 13:00 — 2 commitsFri 14:00 — 4 commitsFri 15:00 — 2 commitsFri 16:00 — 0 commitsFri 17:00 — 1 commitsFri 18:00 — 0 commitsFri 19:00 — 0 commitsFri 20:00 — 0 commitsFri 21:00 — 0 commitsFri 22:00 — 0 commitsFri 23:00 — 0 commitsSat 0:00 — 0 commitsSat 1:00 — 0 commitsSat 2:00 — 1 commitsSat 3:00 — 0 commitsSat 4:00 — 0 commitsSat 5:00 — 0 commitsSat 6:00 — 0 commitsSat 7:00 — 1 commitsSat 8:00 — 1 commitsSat 9:00 — 1 commitsSat 10:00 — 1 commitsSat 11:00 — 1 commitsSat 12:00 — 0 commitsSat 13:00 — 0 commitsSat 14:00 — 1 commitsSat 15:00 — 0 commitsSat 16:00 — 0 commitsSat 17:00 — 0 commitsSat 18:00 — 0 commitsSat 19:00 — 0 commitsSat 20:00 — 0 commitsSat 21:00 — 0 commitsSat 22:00 — 0 commitsSat 23:00 — 0 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
May 18, 2026daily#14+72
  • public-apis/public-apis

    A collective list of free APIs

    486.1K stars · Python

  • donnemartin/system-design-primer

    Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

    373.2K stars · Python

  • practical-tutorials/project-based-learning

    Curated list of project-based tutorials

    285.8K stars · Python

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    251.2K stars · Python

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    206.7K stars · TypeScript