Skip to main content

embedsync

Incremental synchronization between source documents and vector indexes — detect changes, re-embed only deltas, and delete stale chunks.

License: MIT Python 3.11+ CI

Status: v0.5 — hash + Ollama embedders, paragraph chunks, JSONL destination, chunk-level re-embed, --full-reindex.

60-second try

docker compose run --rm plan  # plan sync for examples/docs
docker compose run --rm test  # pytest

Why this vs alternatives

Approach Strength Gap
embedsync Content-hash deltas + pluggable embedders Destinations still local (JSONL/memory)
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.4)

  • Content-hash change detection per document
  • Sync plan: add / update / delete actions
  • Hash embedder for offline/CI (--embedder hash)
  • Ollama embedder (--embedder ollama or ollama:nomic-embed-text)
  • JSONL or in-memory destination
  • Unchanged docs/chunks skip re-embedding on the next run

Architecture

embedsync run ./docs
    ├── LocalFileSource
    ├── StateStore (SQLite)
    ├── plan_sync() → diff
    └── Destination (Memory → pgvector next)

Installation

pip install embedsync
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 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 and Qdrant destinations
  • Notion and sitemap sources

License

MIT

Known limitations (v0.4)

  • Hash embeddings are not semantic — use --embedder ollama for local semantic vectors
  • JSONL is not a vector DB
  • Local markdown files only
  • Re-runs reuse .embedsync/state.db; pass --state-db for an isolated plan
  • Ollama must already be running and have the embedding model pulled

Release files for embedsync 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for embedsync 0.5.0
File Size Uploaded
embedsync-0.5.0.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for embedsync 0.5.0
File Interpreter ABI Platform
embedsync-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size:33.3 kB

Release files / embedsync-0.5.0.tar.gz

Download URL embedsync-0.5.0.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6f40fa96372859160daa2ede78e6d2d69f30225cb182479f26743cb09a3d584a
BLAKE2b-256 checksum
How to use checksums
2584def026d4fb4b59ea02f511f900575c6f2226dd3c766b591b266bc419f82a
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.5.0-py3-none-any.whl

Download URL embedsync-0.5.0-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab7ae23fa976f71b6854d5b928dff73698924ead2e2cb6b503ef1423bb3cbd51
BLAKE2b-256 checksum
How to use checksums
7f501f0c92709449ba62f68d2a900e88eed41d688cd03beb4f857e19b92b6d9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

0.9.0

2 release files

0.6.0

2 release files

This release

0.5.0 This release

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page