embedsync
Incremental synchronization between source documents and vector indexes — detect changes, re-embed only deltas, and delete stale chunks.
Status: v0.6 — hash + Ollama embedders, paragraph chunks, JSONL + pgvector destinations, chunk-level re-embed,
--full-reindex.
60-second try
pip install embedsync
embedsync plan examples/docs --state-db /tmp/embedsync-demo.db
# or with Docker:
docker compose run --rm plan
Why this vs alternatives
| Approach | Strength | Gap |
|---|---|---|
| embedsync | Content-hash deltas + pluggable embedders | Destinations: memory, JSONL, pgvector |
| Full re-embed pipelines | Simple mentally | Expensive; misses deletes |
| Framework ingestion (e.g. LlamaIndex) | Rich connectors | Change detection is DIY |
| One-off sync scripts | Fits one repo | No shared plan/state model |
Problem
RAG indexes rot when documents change. Full re-embeds are expensive and miss deletes. Every team rebuilds change detection from scratch.
Key features (v0.6)
- Content-hash change detection per document
- Sync plan: add / update / delete actions
--full-reindexto force re-embed of all current docs- Hash embedder for offline/CI (
--embedder hash) - Ollama embedder (
--embedder ollamaorollama:nomic-embed-text) - JSONL, in-memory, or pgvector destination
- Unchanged docs/chunks skip re-embedding on the next run
Architecture
embedsync run ./docs
├── LocalFileSource
├── StateStore (SQLite)
├── plan_sync() → diff
└── Destination (Memory / JSONL / pgvector)
Installation
pip install embedsync
pip install 'embedsync[pg]' # optional: pgvector destination
pip install -e ".[dev]"
Usage
embedsync health
embedsync plan examples/docs --state-db /tmp/embedsync-demo.db
embedsync run examples/docs --dry-run --state-db /tmp/embedsync-demo.db
embedsync run examples/docs --embedder hash --destination memory --state-db /tmp/embedsync-demo.db
embedsync run examples/docs --full-reindex --embedder hash --destination jsonl:/tmp/index.jsonl
embedsync run examples/docs --embedder hash --destination jsonl:/tmp/index.jsonl
# Requires Postgres with pgvector + pip install 'embedsync[pg]':
embedsync run examples/docs --embedder hash --destination pgvector:postgresql://user:pass@localhost/db
# Requires a running Ollama with an embedding model:
embedsync run examples/docs --embedder ollama --destination jsonl:/tmp/index.jsonl
embedsync run examples/docs --embedder ollama:nomic-embed-text --destination memory
Docker
docker compose run --rm test
docker compose run --rm plan
Configuration
| Variable | Default | Description |
|---|---|---|
EMBEDSYNC_STATE_DB |
.embedsync/state.db |
State database path |
EMBEDSYNC_LOG_LEVEL |
INFO |
Log level |
Ollama uses OLLAMA_HOST when set (otherwise the embedder default host).
Roadmap
- Pluggable embedder protocol + hash backend
- JSONL destination (local stand-in)
- Chunk-level stable IDs across edits
- Ollama embedder (
--embedder ollama) - pgvector destination
- Qdrant destination
- Notion and sitemap sources
License
MIT
Known limitations (v0.6)
- Hash embeddings are not semantic — use
--embedder ollamafor local semantic vectors - JSONL is not a vector DB; use
--destination pgvector:...for Postgres - Local markdown files only
- Re-runs reuse
.embedsync/state.db; pass--state-dbfor an isolated plan - Ollama must already be running and have the embedding model pulled
- pgvector destination needs
pip install 'embedsync[pg]'and thevectorextension
Release files for embedsync 0.6.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 | |
|---|---|---|---|
| embedsync-0.6.0.tar.gz | 21.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| embedsync-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:36.5 kB
Release files / embedsync-0.6.0.tar.gz
| Download URL | embedsync-0.6.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3c65aabadfd01590f5db25e040671213ff2e9a3b5c60a61f911d87fc6e4d88c
|
|
BLAKE2b-256 checksum How to use checksums |
f2d3a69786e030ba64f6efa7374650707be3f8c55a81f23b65b90a168b525355
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / embedsync-0.6.0-py3-none-any.whl
| Download URL | embedsync-0.6.0-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efbe1de06c05ded66c82099f14c6c0a8f9f7c73922060c616d06beeb085068c0
|
|
BLAKE2b-256 checksum How to use checksums |
ad8f6c7a452eaef9880265b4db29aacc0c943cba15daafd0ada0813b9babc849
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|