Metadata-Version: 2.4
Name: soma-search
Version: 0.1.1
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Summary: Local-first semantic code search
License: Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# soma-search

Local-first semantic code search. Index a repository once, then search it with
natural-language queries — fully offline after a one-time model download. No API
keys, no cloud, no per-query cost.

## Install

```
pip install soma-search
```

### Platform support

> **Heads up (0.1.1):** the only prebuilt wheel right now is for **macOS
> (Apple Silicon / arm64)**. On that platform `pip install soma-search` just
> works.
>
> On **Linux, Windows, and Intel macOS**, pip falls back to building from the
> source distribution, which needs a **Rust toolchain** (`rustup`) and a **C
> compiler** (`build-essential` / Xcode Command Line Tools) installed. If you
> don't have those, the install will fail — for now, use
> [`cargo install soma-search-cli`](https://crates.io/crates/soma-search-cli)
> instead. Prebuilt wheels for all platforms are on the way.

## Usage

```python
import soma
soma.index("./my-repo")
for hit in soma.search("parse a config file", k=5, path="./my-repo"):
    print(hit["path"], hit["start_line"], hit["score"])
```

Or use the `soma` CLI installed with the wheel:

```
soma index ./my-repo
soma search "validate auth token" -k 10 -p ./my-repo
soma serve ./my-repo          # MCP server for coding agents (Claude Code, etc.)
```

First run downloads the embedding model (`nomic-embed-text-v1.5`, a few hundred
MB) to the standard HuggingFace cache. Re-running `soma index` only re-embeds
files that changed.

## License

Apache-2.0

