How mah-bin/blobtrack works
blobtrack is a command-line version control system for large binary files. Its main workflow adds a file by streaming it through content-defined chunking, SHA-256 fingerprinting and compression, then deduplicating chunks in local storage. Commits record ordered chunk references and a Merkle root; checkout reconstructs files, while log and garbage collection manage history and stored objects. Push and pull synchronize missing chunks and commit metadata with another repository. The graph follows documented workflows and shown module references; some command-handler internals are only partially excerpted.
Main entry points: commands.py Command handlers · remote_sync.py Remote sync · local_store.py Chunk object store · main.py CLI entry
Components 13
Command interface
- CLI entry
blobtrack/cli/main.py - Command handlers
blobtrack/cli/commands.py
Content engine
- CDC chunker
blobtrack/core/chunker.py - Chunk processor
blobtrack/core/hasher.py - Compression
blobtrack/core/packer.py - Merkle trees
blobtrack/core/merkle_tree.py - Tree differ
blobtrack/core/differ.py
Local repository
- Metadata index
blobtrack/storage/index_db.py - Chunk object store
blobtrack/storage/local_store.py
History and sync
- Commit history
blobtrack/storage/index_db.py - Remote sync
blobtrack/storage/remote_sync.py
Other components
- User
- Remote repository
Connections 18
- User → CLI entry: runs commands
blobtrack/cli/main.py - CLI entry → Command handlers: dispatches to
blobtrack/cli/main.py - Command handlers → CDC chunker: streams files
README.md - Command handlers → Chunk processor: processes chunks
README.md - Chunk processor → Compression: compresses chunks
blobtrack/core/hasher.py - Command handlers → Compression: decompresses chunks
README.md - Command handlers → Merkle trees: builds trees
blobtrack/cli/commands.py - Command handlers → Tree differ: computes deltas
blobtrack/cli/commands.py - Tree differ → Merkle trees: walks trees
blobtrack/core/differ.py - Command handlers → Metadata index: records metadata
blobtrack/cli/commands.py - Command handlers → Chunk object store: stores chunks
README.md - Command handlers → Commit history: reads and writes commits
README.md - Command handlers → Remote sync: invokes sync
blobtrack/cli/commands.py - Remote sync → Remote repository: transfers chunks and commits
blobtrack/storage/remote_sync.py - Remote sync → Chunk object store: reads and writes chunks
blobtrack/storage/remote_sync.py - Remote sync → Metadata index: synchronizes metadata
blobtrack/storage/remote_sync.py - Command handlers → Chunk object store: restores files
README.md - Command handlers → Chunk object store: collects orphans
README.md