skillfed

semble

Fast and Accurate Code Search for Agents

semble v0.5.5 131.2K downloads/30d#11,598 on PyPI5,879
Permissive license MIT License Copyright (c) 2026 Thomas van Dongen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) Active released

What it is and what it does

Semble is a code search engine designed for AI agents and developers. It builds an index of a codebase using embeddings from model2vec, then answers natural-language queries by returning only the relevant code snippets—not full files. The library runs entirely on CPU with no external APIs or GPU required, and caches both indexes and the embedding model locally.

You can use Semble three ways: as an MCP server (for Claude Code, Cursor, Codex, and other agents), as a CLI tool for one-off searches, or as a Python library for programmatic access. It reads .gitignore and .sembleignore to control which files are indexed, and automatically skips well-known non-source directories. The fact sheet indicates indexing takes roughly 500 ms for an average repo and queries return in roughly 1 ms, with token savings estimated at ~99% compared to reading full files.

Use it for:

  • Integrate code search into Claude Code, Cursor, or other MCP-compatible agents so they can find relevant snippets without grepping or reading full files.
  • Build a CLI tool to search a remote repository (cloned on demand) or local codebase without setting up a full development environment.
  • Use as a Python library to add semantic code search to custom tooling, RAG pipelines, or agent workflows.
  • Quickly locate code patterns (e.g., 'how is authentication handled?') across unfamiliar codebases during onboarding or code review.
  • Track token savings across searches to quantify efficiency gains when using Semble instead of traditional grep-and-read workflows.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Semble is a code search library that indexes and searches codebases using embeddings, returning relevant code snippets in response to natural-language queries with minimal token overhead.

Yes. Semble is actively maintained, has low install friction, carries a permissive MIT license, and solves a real problem for agent-assisted development. It has no known vulnerabilities and supports current Python versions (3.10–3.13). Install it if you work with coding agents or need fast, token-efficient code search; the MCP integration and CLI are both straightforward to set up.

Install

semble on PyPI

pip

pip install semble

uv

uv add semble

poetry

poetry add semble

Installing semble

Before you install

Low friction: pure Python wheel with 7 runtime dependencies including model2vec for embeddings and questionary for CLI prompts. Active maintenance—released 2 days ago with 5879 repository stars and continuous commits.

License in practice

MIT License permits unrestricted commercial and private use, modification, and redistribution with only attribution and license-text retention required.

Quickstart

pip install semble

from semble import SembleIndex

index = SembleIndex.from_path("./my-project")
results = index.search("authentication flow")
for result in results:
    print(result)

Requires Python 3.10 or later. On first use, downloads an embedding model from Hugging Face (one-time, requires network access).

Verify before relying

  • Whether the embedding model download size and cache footprint are acceptable for resource-constrained environments.
  • Performance characteristics when indexing very large codebases (millions of lines) or with many concurrent searches.
  • Compatibility and behavior with non-standard or mixed-language repositories.

Package facts

License MIT License Copyright (c) 2026 Thomas van Dongen Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 7 — model2vec, vicinity, numpy, pathspec, orjson, questionary, semble-grammars
Maintenance actively maintained — 2 days since the last release
Last repo commit
First released
Downloads 131,242/month — #11,598 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: semble-0.5.5-py3-none-any.whl

Keywords: code-search, hybrid-search, semantic-search, mcp, agent, rag, embeddings

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Software Development :: Libraries

Tags

code search for agentssemantic code searchembedding-based code retrievalmcp code search serveragent-friendly code indexingfast codebase searchlocal code search no api
agent-integrationcode-searchembeddings

More Libraries packages

Further reading