Semble Code Search
Fast, snippet-level code retrieval for coding agents with far less context consumption.
- Source repo
- MinishLab/semble
- Stars
- ★ 6.5k
- Last updated
- 4d ago v0.8.0
- FARS reviewed
- Nov 07, 2026 +3 new
- License
- MIT
- Primary language
- Python
- FA score
- 71/100 · Some gaps
At a glance
- How it runs
- Works with
- Universal · cross-platformCodex · Claude Code
- Cost
- Free, no paid service needed
- Setup effort
- Low · running in minutes
- You'll need
- Typical use
- A developer using Codex, Claude Code, Cursor, or another MCP client wants an agent to answer implementation questions without repeatedly grepping and opening whole files.
- Not a fit if
- Teams that must install fully offline without pre-downloading the model
- Users who need tests, examples, or .d.ts files ranked highly
- Teams needing independent validation of the speed and token-savings claims
- Website
- minish.ai/packages/semble/introduction ↗ set on GitHub
- Maintenance
- Commits in the last 30 dayslast commit 2026-11-28latest release v0.8.0 (2026-11-28)+3.0 ★/day over 7 days
- Source review
- 71/100 · Some gaps
What does this agent do, and when should you use it?
Semble is a local code-search library for coding agents, delivered through a CLI, Python API, MCP server, and installable search sub-agent. It reads a local directory or clones a remote Git repository on demand, uses tree-sitter to create code-aware chunks, and retrieves them with Model2Vec embeddings, BM25, and Reciprocal Rank Fusion. Natural-language or code queries produce focused snippets with file paths and line ranges instead of entire files. Indexing and search run on CPU without API keys, a GPU, or an external inference service, although the default embedding model must be downloaded from Hugging Face on first use unless a compatible local model is supplied. The project's benchmark of roughly 1,250 queries across 63 repositories and 19 languages reports an NDCG@10 of 0.854 and about 99% lower token use than grep+read.
SembleIndex.from_path() reads a local repository, while SembleIndex.from_git() obtains a remote Git repository; content selection can cover code, docs, config, or combinations of them. Semble chunks files with tree-sitter, measures semantic similarity with static Model2Vec embeddings from potion-code-16M-v2, and runs BM25 to match identifiers and API names. It combines both rankings through Reciprocal Rank Fusion, then applies adaptive query weighting, definition boosts, identifier-stem matching, file-coherence boosts, and penalties for tests, compatibility or legacy shims, examples, and .d.ts declarations. search returns chunks exposing file_path, start_line, end_line, and content; find_related retrieves code similar to a specified file and line. Indexes are persisted after the first search and incrementally refreshed from file modification times, while the savings command estimates tokens avoided relative to reading the complete files containing returned chunks.
- A developer using Codex, Claude Code, Cursor, or another MCP client wants an agent to answer implementation questions without repeatedly grepping and opening whole files.
- An engineer onboarding to a large or unfamiliar repository needs concise, path-and-line-referenced results for concepts such as authentication flow or model persistence.
- A team writing development automation needs standalone repository search through semble search where no MCP session is available.
- A Python tooling author wants to embed code, documentation, and configuration retrieval through SembleIndex and follow a result with similarity search.
- A team that cannot use hosted inference APIs can prepare a compatible Model2Vec model locally and perform indexing and querying on CPU.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
uv tool install semble
How do you install or deploy this agent?
A shell and uv are required. Install the package and launch the interactive integration setup:
uv tool install semble
semble installThe installer detects coding agents including Codex, Claude Code, and OpenCode, then offers MCP, CLI instructions in AGENTS.md/CLAUDE.md, and a semble-search sub-agent. An unattended Codex example is:
semble install --agent codex --type mcp subagent --yesThe default setup needs network access on first use to download and cache the embedding model from Hugging Face. For offline runtime, set SEMBLE_MODEL_NAME to a local path containing a Model2Vec-compatible model. Remove installed integrations with semble uninstall.
How do you use this agent?
Search a local repository:
semble search "authentication flow" ./my-projectSearch a remote repository:
semble search "save model to disk" https://github.com/MinishLab/model2vecLimit results or select a different content class:
semble search "save model to disk" ./my-project --top-k 10
semble search "deployment guide" ./my-project --content docs
semble search "authentication flow" ./my-project --max-snippet-lines 10Find code related to a known location:
semble find-related src/auth.py 42 ./my-projectFor library use, create an index with SembleIndex.from_path("./my-project") and call index.search("save model to disk", top_k=3); each result exposes its path, start and end lines, and snippet content. MCP clients can invoke search or find_related with repo set to a local path or an HTTPS Git URL.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
Inherits capabilities of connected MCP servers; audit third-party servers before enabling.
What are this agent's strengths and limitations?
- The same retrieval engine is available through a CLI, Python API, MCP server, and dedicated sub-agent, covering several coding-agent workflows.
- Its hybrid Model2Vec and BM25 retrieval, followed by definition boosts and code-aware noise penalties, addresses both conceptual questions and exact symbol searches.
- Indexing and querying execute locally on CPU without API credentials, a GPU, or a hosted inference service.
- Cached indexes refresh incrementally as files change, avoiding a complete rebuild during ordinary local MCP sessions.
- The published benchmark reports roughly 500 ms indexing for an average repository, approximately 1 ms queries, and about 99% fewer tokens than grep+read.
- The default configuration requires a first-use download from Hugging Face; a fully offline installation must supply a compatible Model2Vec model through SEMBLE_MODEL_NAME.
- Installation depends on uv, and the selected MCP, instruction-file, or sub-agent integration must be configured for each coding client.
- Retrieval reflects Semble's chunking and ranking policy; tests, examples, legacy or compat paths, and .d.ts files may rank lower even when they matter to a particular investigation.
- The speed, quality, and token-efficiency claims come from the project's own benchmark and estimation method, with no independent production validation supplied.
- Saved indexes, usage statistics, and the Hugging Face model consume local storage; remote-repository search also requires network access and clones repositories on demand.
How does this agent compare with similar options?
Against grep+read, Semble returns selected snippets rather than reading complete matching files. Its benchmark reports about 99% fewer tokens on average and 97% recall at roughly 2,000 tokens, versus 85% recall for grep+read with a 100,000-token context. Against the 137M-parameter CodeRankEmbed model, the project reports comparable retrieval quality while indexing about 220 times faster and querying about 17 times faster. These figures are all from the project's described benchmark.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| Semble Code Search This agent | 71 · Some gaps | CLIFree | ★ 6.5k | 4d ago | Python | Codex · Claude Code |
| XERJ | 65 · Some gaps | CLIFree | ★ 23k | 4d ago | Rust | Claude Code |
| GraphMind Code Graph | 55 · Major gaps | Desktop appFreemium | ★ 219 | 2d ago | Rust | Claude Code · Claude.ai |
| Graft Code Context Layer | 52 · Major gaps | CLIFree + model costs | ★ 12k | 14d ago | TypeScript | Codex · Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The CLI/MCP searches the specified local repository by default and returns file paths and code snippets. The docs explain indexing, caching, ignore rules, model downloads, and cleanup, making the data flow fairly clear. Remote Git URLs are cloned on demand and first use downloads a model from Hugging Face; the sample shows no dedicated sensitive-data handling guidance, so that criterion loses points. The installer supports interactive confirmation and a --yes bypass, and uninstall is documented, but the supplied files do not show the configuration write and recovery implementation. Dependencies have version bounds, but no vulnerability audit evidence is provided. License and author details are clear, while publisher identity is unverified, so attribution is not fully established.
The README, CLI, and installation guide are broadly consistent about search, caching, and MCP use. Dependency ranges are bounded, MCP is an optional extra, and the CLI reports when MCP dependencies are missing. It gives explicit errors for missing paths and unresolved code locations and warns when cache saving fails. The supplied files do not cover every failure case, so these criteria retain deductions.
The README, skill, and installation guide identify coding agents as the audience and show natural-language, symbol, code, documentation, configuration, and multi-repository searches. Capability boundaries are visible from the CLI/MCP tools and content types, but the skill broadly recommends using Semble before Grep/Glob/find for code location; although it reserves grep for finding every literal occurrence, the trigger boundary could be more precise. The project declares support for several agents and Python 3.10–3.13, and describes CPU-local operation; the README also explains remote model downloads and configurable caching.
The README organizes quickstart, CLI, MCP, installation, benchmarks, implementation, and licensing. The installation guide covers automated and manual setup for many agents, upgrades, uninstall, and extensive examples. Naming is consistent across the CLI, MCP, and skill, and the MIT license file is complete. setuptools_scm manages versions dynamically, and installed configurations pin the current version with upgrade instructions. The sample has no clear changelog and does not establish maintenance responsibility or support commitments, so those criteria lose points.
The CLI defaults to JSON, offers text output, and supports result-count and snippet-length controls; the skill and README provide usable search and related-code examples. The hybrid semantic and lexical retrieval design and token, speed, and quality claims are accompanied by benchmark documentation, but the sample contains only a summary and chart references, not enough underlying material to verify the results. First-use model download, indexing, and caching also have startup and storage costs, so value and cost-benefit do not receive full marks.
The README gives concrete feature, installation, storage, and algorithm descriptions; the CLI source supports some error-handling and output claims, while pyproject.toml, the license, and CI configuration corroborate package metadata, licensing, and project declarations. Benchmark methodology points to a separate document that is not included in the sample, and this review did not execute the product. Documentation and source corroboration is therefore incomplete, so these criteria do not receive full marks.
- First use requires a network download of the Hugging Face model; searches using remote Git URLs also clone repositories on demand. Check that the target repository and local cache location fit your data-handling requirements.
- The skill recommends Semble first for locating code; for every occurrence of a literal string, the skill itself recommends using grep.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
What's Changed * fix: honor .git/info/exclude at the search root by @nitayk in https://github.com/MinishLab/semble/pull/330 * chore: Release 0.8.0 by @Pringled in https://github.com/MinishLab/semble/pull/335 New Contributors * @nitayk made their first contribution in https://github.com/MinishLab/semble/pull/330 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.4...v0.8.0View on GitHub ↗ -
Release notes excerpt
What's Changed * feat: update model to blink-code-16m by @stephantul in https://github.com/MinishLab/semble/pull/332 * feat: update blink to int8 by @stephantul in https://github.com/MinishLab/semble/pull/333 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.3...v0.7.4View on GitHub ↗ -
Release notes excerpt
What's Changed * fix: Fall back to in-process chunking when worker pool fails by @Pringled in https://github.com/MinishLab/semble/pull/326 Full Changelog: https://github.com/MinishLab/semble/compare/v0.7.2...v0.7.3View on GitHub ↗
FAQ
Does Semble require an API key or paid model provider?
Which files does it search?
Must the index be rebuilt manually after code changes?
Can it run in an isolated network environment?
What data is stored locally?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.