semgrepll - Local Semantic Code Search
Local semantic grep using embeddings - 100% offline capable.
Features
- Multi-backend support: llama.cpp, ONNX, Ollama
- Auto-detection: Automatically picks fastest available local backend
- Hybrid storage: SQLite (small projects) or LanceDB (large)
- 100% offline: No external connections
- Embedding caching: Fast re-indexing
- Semantic search: Find code by meaning, not just keywords
Backends (priority order)
| Rank | Backend | Speed | Notes |
|---|---|---|---|
| 1 | llama.cpp | ~1s | Fastest - requires GGUF model |
| 2 | ONNX | ~3s | Local - uses HF model files |
| 3 | Ollama | ~6s | Local server fallback |
Installation
pip install semgrepll
# Optional: ONNX backend support
pip install semgrepll[onnx]
Usage
# Index a project (auto-detects backend)
semgrep index /path/to/project
# Search semantically
semgrep search "authentication logic"
# List indexed projects
semgrep ls
Environment Variables
| Variable | Description | Default |
|---|---|---|
EMBED_BACKEND |
Backend: auto, llama, onnx, ollama | auto |
EMBED_MODEL |
Model name | mxbai-embed-large-v1 |
LLM_MODEL_PATH |
Path to GGUF model (for llama.cpp) | - |
ONNX_MODEL_PATH |
Path to ONNX model | auto-detect |
SEMGREP_BACKEND |
Storage: auto, sqlite, lance | auto |
Benchmark
| Backend | Speed |
|---|---|
| llama.cpp | ~1s |
| ONNX | ~3s |
| Ollama | ~6s |
License
MIT License - see LICENSE for details.
Metadata
Release files for semgrepll 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| semgrepll-1.3.1.tar.gz | 13.0 kB | Without provenance | Details for semgrepll-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| semgrepll-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for semgrepll-1.3.1-py3-none-any.whl |
Total release size: 25.7 kB
Release files / semgrepll-1.3.1.tar.gz
| Download URL | semgrepll-1.3.1.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec7d8d5b085e514318f7a9a484f334c0aa45fc8e584fedbb331263f79f7684cf
|
|
BLAKE2b-256 checksum How to use checksums |
60a4dad1dafa3853d2f510bff7ce8a816d535ff1f3abbb029937bd32f362c9e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / semgrepll-1.3.1-py3-none-any.whl
| Download URL | semgrepll-1.3.1-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d6e06f7feb4c34af098a1a30d0cdecc27ecf3f24ef22815f1c17718d3c75b5b
|
|
BLAKE2b-256 checksum How to use checksums |
bdc2038c772a44384c5be28b608fde93c26359a326cbef71ec452bee1956d1b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for semgrepll 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.