$git clone https://github.com/MinishLab/sembleQuickstart • CLI • MCP Server • Installation • Benchmarks
| 1 | <h2 align="center"> |
| 2 | <img width="30%" alt="semble logo" src="https://raw.githubusercontent.com/MinishLab/semble/main/assets/images/semble_logo.png"><br/> |
| 3 | Fast and Accurate Code Search for Agents<br/> |
| 4 | <sub>Uses ~98% fewer tokens than grep+read</sub> |
| 5 | </h2> |
| 6 | |
| 7 | <div align="center"> |
| 8 | <h2> |
| 9 | <a href="https://pypi.org/project/semble/"><img src="https://img.shields.io/pypi/v/semble?color=%23007ec6&label=pypi%20package" alt="Package version"></a> |
| 10 | <a href="https://app.codecov.io/gh/MinishLab/semble"> |
| 11 | <img src="https://codecov.io/gh/MinishLab/semble/graph/badge.svg?token=SZKRFKPPCG" alt="Codecov"> |
| 12 | </a> |
| 13 | <a href="https://github.com/MinishLab/semble/blob/main/LICENSE"> |
| 14 | <img src="https://img.shields.io/badge/license-MIT-green" alt="License - MIT"> |
| 15 | </a> |
| 16 | </h2> |
| 17 | |
| 18 | [Quickstart](#quickstart) • |
| 19 | [CLI](#cli) • |
| 20 | [MCP Server](#mcp-server) • |
| 21 | [Installation](docs/installation.md) • |
| 22 | [Benchmarks](#benchmarks) |
| 23 | |
| 24 | |
| 25 | </div> |
| 26 | |
| 27 | Semble is a code search library built for agents. It returns the exact code snippets they need instantly, using ~98% fewer tokens than grep+read. Indexing and searching a full codebase end-to-end takes under a second, with ~200x faster indexing and ~10x faster queries than a code-specialized transformer, at 99% of its retrieval quality (see [benchmarks](#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. |
| 28 | |
| 29 | ## Quickstart |
| 30 | |
| 31 | 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. |
| 32 | |
| 33 | The fastest way to get started is the interactive installer. Install [uv](https://docs.astral.sh/uv/getting-started/installation/), then run: |
| 34 | |
| 35 | ```bash |
| 36 | uv tool install semble |
| 37 | semble install |
| 38 | ``` |
| 39 | |
| 40 | `semble install` detects installed coding agents such as Claude Code, Codex, and OpenCode, and then lets you choose which integrations to enable: |
| 41 | |
| 42 | - **MCP server**: lets the agent call Semble directly as a tool. |
| 43 | - **Instructions**: adds CLI usage guidance to AGENTS.md / CLAUDE.md. |
| 44 | - **Sub-agent**: installs a dedicated `semble-search` sub-agent. |
| 45 | |
| 46 | To undo the setup, run `semble uninstall`. |
| 47 | |
| 48 | For manual setup instructions (MCP config per agent, AGENTS.md snippet, sub-agent files), see the [installation docs](docs/installation.md). |
| 49 | |
| 50 | <details> |
| 51 | <summary>Updating Semble</summary> |
| 52 | |
| 53 | ```bash |
| 54 | uv tool upgrade semble # upgrade |
| 55 | uv cache clean semble # for MCP users (restart your MCP client after) |
| 56 | ``` |
| 57 | |
| 58 | </details> |
| 59 | |
| 60 | <details> |
| 61 | <summary>Unattended install</summary> |
| 62 | |
| 63 | For sandboxed or scripted environments, skip the prompts with `--agent` and, optionally, `--type`: |
| 64 | |
| 65 | ```bash |
| 66 | semble install --agent claude --type mcp subagent --yes |
| 67 | ``` |
| 68 | |
| 69 | `--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). |
| 70 | |
| 71 | </details> |
| 72 | |
| 73 | ## Main Features |
| 74 | |
| 75 | - **Fast**: indexes an average repo in ~250 ms and answers queries in ~1.5 ms, all on CPU. |
| 76 | - **Accurate**: NDCG@10 of 0.854 on our [benchmarks](#benchmarks), on par with code-specialized transformer models, at a fraction of the size and cost. |
| 77 | - **Token-efficient**: returns only the relevant chunks, using [~98% fewer tokens than grep+read](#benchmarks). |
| 78 | - **Zero setup**: runs on CPU with no API keys, GPU, or external services required. |
| 79 | - **MCP server**: works with Claude Code, Cursor, Codex, OpenCode, VS Code, and any other MCP-compatible agent. |
| 80 | - **Local and remote**: pass a local path or a git URL. |
| 81 | |
| 82 | ## CLI |
| 83 | |
| 84 | 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. |
| 85 | |
| 86 | ```bash |
| 87 | # Search a local r |