Skip to main content

Local-first semantic code search

Project description

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 instead. Prebuilt wheels for all platforms are on the way.

Usage

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

soma_search-0.1.1.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

soma_search-0.1.1-cp39-abi3-macosx_11_0_arm64.whl (6.5 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file soma_search-0.1.1.tar.gz.

File metadata

  • Download URL: soma_search-0.1.1.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for soma_search-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d712092273de86c6804b17555676d3450bcf957ecfea2fdf084cd9d5de43ad25
MD5 12fbdd47be35b7f7720b8829b7d76ca2
BLAKE2b-256 fe00d21dc68015b6f3bbb8086dd32351864d5b6a2293125e7d570a2ca9c9f28a

See more details on using hashes here.

File details

Details for the file soma_search-0.1.1-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for soma_search-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e0b30200dea4cb1533cb9ba9ab64b6f2792495f5a1963b14fed966b23d1eceb6
MD5 232e7fe534e8e5f47131f185903b6ba7
BLAKE2b-256 c255176829f013e49e89c20260271b44e5179451252033c1ebc34d38e88277c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page