Indexing file system changes using merkle trees.
Merkel creates a cryptographic fingerprint of your directory tree using SHA-256 hashes. Files are hashed by content, directories by their children's hashes. This allows efficient detection of any changes in your codebase.
zig buildThe binary will be available at zig-out/bin/merkel.
# Initialize index for current directory
merkel init
# Initialize index for specific directory
merkel init /path/to/code
# Check for changes and update index
merkel check
# Show index status and information
merkel status
# Watch directory for real-time changes (Linux only)
merkel watch
# Show help
merkel help- Init: Scans directory tree and creates
.merkel/index.jsonwith hash fingerprints - Check: Rescans and compares against stored hashes, reporting changes
- Watch: Uses Linux inotify to monitor filesystem events in real-time
- Status: Shows when index was last updated and file count
Changes are detected at three levels:
- ADDED: New files or directories
- MODIFIED: Files with different content hashes
- DELETED: Missing files or directories
The tool ignores its own .merkel directory and hidden files by default.
- Zig 0.14.1 or later
- Linux (for watch functionality)
MIT License - see LICENSE file for details.