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.4 — hash + Ollama embedders, paragraph chunks, JSONL destination, chunk-level re-embed.

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 --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.4.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.4.0
File Size Uploaded
embedsync-0.4.0.tar.gz 18.9 kB Details

Built distribution (wheel)

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

Total release size:31.7 kB

Release files / embedsync-0.4.0.tar.gz

Download URL embedsync-0.4.0.tar.gz
Size 18.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d541a611da186f191300e3d63bafbdc206a3b2c2d104aad963f1ba8a40b41d0d
BLAKE2b-256 checksum
How to use checksums
c5b8b198df507976c75888f3041f39fb8dd71271dfd88903b9ef428137efbf68
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.4.0-py3-none-any.whl

Download URL embedsync-0.4.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e69e3b417d4a197c903f3faba4e70c21821600412d39ced4a80ce9d60e2ab3f
BLAKE2b-256 checksum
How to use checksums
5c22749283bf9c1dc382c08e21c9c17f636c32b79fa270c0ac424f34d72d08e1
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

0.5.0

2 release files

This release

0.4.0 This release

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