Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Semble is a fast code search library for local and remote repositories. It combi
## Quickstart

```bash
pip install semble
pip install semble # Install with pip
uv add semble # Install with uv
```

```python
Expand All @@ -38,6 +39,9 @@ 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, ..."

# Find code similar to a specific location in the codebase
related = index.find_related("model2vec/model.py", line=127, top_k=3)
```

## Main Features
Expand Down Expand Up @@ -80,6 +84,19 @@ Add to `~/.opencode/config.json`:
}
```

#### Cursor
Add to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in your project):
```json
{
"mcpServers": {
"semble": {
"command": "uvx",
"args": ["--from", "semble[mcp]", "semble"]
}
}
}
```

### Tools

| Tool | Description |
Expand All @@ -89,7 +106,9 @@ Add to `~/.opencode/config.json`:

## Benchmarks

Quality and speed across all methods on ~1,250 queries over 63 repositories in 19 languages.
Quality and speed across all methods on ~1,250 queries over 63 repositories in 19 languages. X-axis is total latency (index + first query); y-axis is NDCG@10. Marker size reflects model parameter count.

![Speed vs quality](assets/images/speed_vs_ndcg_cold.png)

| Method | NDCG@10 | Index time | Query p50 |
|--------|--------:|-----------:|----------:|
Expand Down
Binary file added assets/images/speed_vs_ndcg_cold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/speed_vs_ndcg_warm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion benchmarks/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import matplotlib.ticker as ticker
import numpy as np

_RESULTS_DIR = Path(__file__).parent / "results"
_RESULTS_DIR = Path(__file__).parent.parent / "assets" / "images"


class _Method(TypedDict):
Expand Down
Loading