Semantic code search engine powered by embeddings and vector databases. Find code by meaning, not just keywords.
Primary command: sca (alias: semantic-code).
Traditional code search (grep, ripgrep) finds exact matches. Semantic search understands meaning:
- Ask questions: "How is authentication handled?" → finds auth code
- Explore unfamiliar codebases: "database connection setup" → finds DB init
- Find patterns: "error handling and recovery" → finds Result/error flows
- Embedding providers: ONNX (local), OpenAI, Gemini, Voyage, Ollama, Apple Neural Engine (feature-gated)
- Local vector kernels: HNSW by default, experimental DFRR, and exact
flat-scanground truth - Snapshot v2 + quantization: mmap-backed local bundles, subset/tile tooling, and storage preflight
- AST-aware splitting: Tree-sitter parsing with line-based fallback
- Change-aware reindex: Snapshot-driven change detection with WAL-backed local durability
- CLI-first: Deterministic output for automation and AI agents, including
estimate-storage,calibrate,snapshot-subset,search --stdin-batch, and structured tracing
Choose one install method:
brew install luiz-frias/tap/semantic-codecurl -fsSL https://github.com/Luiz-Frias/semantic-code-agents-rs/releases/latest/download/install.sh | shwinget install --id Luiz-Frias.SemanticCode -e(Windows)scoop bucket add semantic-code https://github.com/Luiz-Frias/semantic-code-agents-rs && scoop install semantic-code(Windows)mise use -g github:Luiz-Frias/semantic-code-agents-rs@latestcargo install semantic-code-cli --locked
This installs the sca and semantic-code commands.
For the full install matrix, see docs/release.md.
From the root of your codebase:
sca initThis creates .context/manifest.json and a default .context/config.toml.
Optional preflight:
sca estimate-storageThen index:
sca index --initsca search --query "error handling and recovery"Use --agent for NDJSON output, no prompts, and quiet stderr:
sca --agent search --query "error handling"Full documentation is available in docs/:
git clone https://github.com/Luiz-Frias/semantic-code-agents-rs.git
cd semantic-code-agents-rs
mise install
just setup| Command | Description |
|---|---|
just pc |
Pre-commit checks (staged files) |
just pc-full |
Full pre-commit gate |
just test-unit |
Fast unit tests |
just test-all |
Full test suite |
cargo run --bin sca -- --help |
Run the CLI |
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE)
at your option.