MinSync
Git diff-based incremental vector index for any repository. No external DB required.
- Github repository: https://github.com/NomaDamas/MinSync/
- Documentation: https://vkehfdl1.github.io/MinSync/
What it does
MinSync watches your git repository and keeps a local vector index in sync. It uses git diff to detect changes and only re-embeds what actually changed — no full re-indexing needed.
- Indexes all git-tracked files (respects
.gitignoreautomatically) - Incremental sync via
git diff— only changed chunks get re-embedded - Deterministic chunk IDs — same content always produces the same ID
- Crash-safe — interrupted syncs recover automatically
- Embedded vector DB (zvec) — no server, just a local file in
.minsync/ .minsyncignorefor excluding files you don't want indexed
Install
pip install minsync[zvec]
Or with uv:
uv add "minsync[zvec]"
For development (editable install):
uv add --editable "/path/to/MinSync[zvec]"
Embedding model setup
OpenAI (default):
pip install langchain-openai
export OPENAI_API_KEY="sk-..."
HuggingFace (local, no API key):
pip install langchain-huggingface sentence-transformers
Quick start
cd your-repo
# Initialize
minsync init
# or with HuggingFace:
minsync init --embedder "huggingface:sentence-transformers/all-MiniLM-L6-v2"
# Build initial index
minsync sync
# Search
minsync query "authentication flow" --k 5
# After pulling new changes
git pull
minsync sync # only re-embeds changed files
# Check index health
minsync verify
CLI commands
| Command | Description |
|---|---|
minsync init |
Initialize .minsync/ in current git repo |
minsync sync |
Incremental sync (or --full for rebuild) |
minsync query "text" |
Semantic search over indexed content |
minsync status |
Show sync status (up-to-date / behind / interrupted) |
minsync check |
Verify environment and dependencies |
minsync verify |
Check index consistency (with --fix to repair) |
Use minsync <command> --help for full option details.
Python API
from minsync import MinSync
from pathlib import Path
ms = MinSync(repo_path=Path("/path/to/repo"))
ms.init()
ms.sync()
results = ms.query("search text", k=10)
# Custom components
ms = MinSync(
repo_path=Path("/path/to/repo"),
chunker=MyChunker(), # implements Chunker protocol
embedder=MyEmbedder(), # implements Embedder protocol
vector_store=MyStore(), # implements VectorStore protocol
)
.minsyncignore
Works like .gitignore. Add patterns for git-tracked files you don't want indexed:
# Build artifacts
dist/
blog/
# Attachments
attachments/
*.png
*.pdf
# Config files
pyproject.toml
uv.lock
How it works
git diffdetects changed files since last sync- Changed files are re-chunked (markdown heading-based by default)
- Each chunk gets a deterministic ID from
sha256(repo_id + path + content_hash + ...) - Only chunks with new IDs get embedded — unchanged chunks skip the API call
- Stale chunks (old content) are automatically swept
All state lives in .minsync/ — delete it to start fresh.
Development
git clone https://github.com/NomaDamas/MinSync.git
cd MinSync
make install
uv run pytest
Metadata
Release files for MinSync 0.1.0
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 | |
|---|---|---|---|---|
| minsync-0.1.0.tar.gz | 184.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minsync-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 220.2 kB
Release files / minsync-0.1.0.tar.gz
| Download URL | minsync-0.1.0.tar.gz |
|---|---|
| Size | 184.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09ed0240786d6ba521d3fcd7a11a9c3722558efacb830a9af729159973a70ff6
|
|
BLAKE2b-256 checksum How to use checksums |
4793c1b660a02deb5a0c7b40b2f8d574fca2e5831a2178f15a9d20d054306212
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / minsync-0.1.0-py3-none-any.whl
| Download URL | minsync-0.1.0-py3-none-any.whl |
|---|---|
| Size | 36.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
37d3a601e00b1ffe7c002e0f6be20b884d46ad6782b1e63263269dc818855b32
|
|
BLAKE2b-256 checksum How to use checksums |
69c6610dece9bc6865285c83def6c2b0f8e0462ad3b44ea265e3dbdfcf0c5cbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for MinSync 0.1.0
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.