semsearch

Crates.iosemsearch
lib.rssemsearch
version1.1.2
created_at2025-12-06 04:28:39.042905+00
updated_at2025-12-06 04:58:32.316697+00
descriptionSearch your filesystem semantically.
homepagehttps://github.com/xandwr/semsearch
repositoryhttps://github.com/xandwr/semsearch
max_upload_size
id1969609
size129,150
Xander (xandwr)

documentation

README

semsearch

Semantic code search that just works. Ask questions in plain English, get ranked file locations.

Usage

semsearch "find the authentication handler"

Auto-indexes on first run, caches for instant subsequent searches.

Options

semsearch [OPTIONS] [QUERY]

Arguments:
  [QUERY]  Natural language search query

Options:
  -n, --limit <N>   Max results (default: 10)
  -p, --path <DIR>  Project path (default: walks up to .git)
      --json        Output as JSON
      --reindex     Force full reindex
      --stats       Show index statistics
  -v, --verbose     Show progress even when cached
  -h, --help        Print help

Examples

# Search current project
semsearch "error handling logic"

# JSON output for scripting
semsearch --json "database queries" | jq '.[] | .path'

# Search specific directory
semsearch -p /path/to/project "API endpoints"

# Check index status
semsearch --stats

Output

Human-readable (default):

src/auth.rs:42                     0.89  pub async fn validate_token...
src/handlers/login.rs:1            0.82  //! Login and authentication...

JSON (--json):

[
  {"path": "src/auth.rs", "line": 42, "score": 0.89, "snippet": "..."},
  ...
]

How It Works

  1. Detects project root (walks up to .git)
  2. Indexes all text files via fsindex
  3. Chunks content, embeds with BGE-small-en-v1.5 via fastembed
  4. Stores vectors in usearch index
  5. Caches at ~/.cache/semsearch/<project-hash>/
  6. Incremental updates on file changes

Install

cargo install --path .

License

None (unpublished)

Commit count: 0

cargo fmt