Introduction
We've all been there. You're working on a technical project, everything is beautifully version-controled in Git and then comes the documentation, the contract or the proposal. Suddenly, you are forced into Microsoft Word of manual versions or hunting through randomly created auto-recovery versions.
Git is incredible, but treats .docx files as opaque binary blogs. If you change a single word in a single 50-page document, Git sees it as a completely different binary file. No line-by-line diffs or easy to following version history.
I decided to solve this by building dvault, a single, self-contained tool that brings Git-like version control, snapshots, branching, and readable word-level diffs to Word documents. No cloud, no Git dependencies, no subscription or technical training required.
The Core Challenge: Cracking the Binary Blob
A docx file is essentially a zipped collection of XML parts. The main text body lives in a highly structured layout. To make version control work like Git, Dvault doe not just hash the file; it unpacks the structure to look at the actual content.
Rust iterators make iterating through XML a far more pleasent experience.
1. Section-Aware, Word-Level Diffs
Standard line-by-line diffs do not work well for prose. If you edit one word in a massive paragraph, a tradition diff highlights the entire paragraph as deleted and replaced.
Dvault extracts the text elements and processes them so that the specific changed words are highlighted. Even better, it uses Word's own native paragraph styles to detect the nearest heading. When you dvault diff, every change hunk is lable with the section header.
2. Zero-Git Collaboration - OneDrive & Email Workflows
Developers love central Git servers, but businesses do not. I wanted DVault to work where non-technical teams already live, in shared folders like OneDrive & SharePoit and email.
- Shared Folders: Dvault stores snapshots in an append-only content-addressed object store (.dvault/objects/) and tracks the DAG in a local SQLite database. To prevent sync conflicts on the database, it uses a per-machine identity override via environmental variables and an advisory file-locking system (dvault lock).
- The Email handoff: For external clients who only have Word, Dvault generates a lightweight handoff.json metadata slip. You email the doc with the slip, When you edit and email it back, DVault verifies the baseline version to prevent silent clobbering and automatically attributes the new commit to them.
Why Rust was the perfect fit
Other than that I lvoe the language, when building a utility meant to bridge the gap between technical and non-technical uses, deployment friction is the ultimate project killer. Rust made it possible to hit three strict requirements.
- Zero dependencies: I did not want users to install Python, Node or external libraries. Rust compiles down to a single, lighweight binary. Drop in your path and it just works.
- Extreme Portability: It runs identically natively or inside a lightweight Docker container. For strict corporate environments where running local binaries is restricted, a simple Docker alias lets users interact with OneDrive-synced vaults seamlessly.
- Speed with Safety: Parsing zipped XML structures, calculating SHA-256 for deduplication and rendering real-time graphs (dvault log --graph) needs to be instant. Rust delivers the performance without the risk of memory instability.
Bringing it to the Web
To make this completely accessible to the people who refuse to use a CLI (boggles my mind), I embedded a lightweight local web sever directly into the binary. Running dvault serve launches a local UI with zero external assets.
Check it out
The project is fully open source under MIT. If you are tired for dealing with untracked document versions or want to dig into the Rust and SQLite architecture, I'd love for to take a look, try it out or contribute.
shapedthought
/
dvault
Git-like version control for Word documents — without Git, and without needing to know Git.
dvault
Git-like version control for Word documents — without Git, and without needing to know Git.
dvault is a single self-contained binary that gives you version history, snapshots, and readable diffs for your .docx files. Instead of comparing opaque binary blobs, it extracts the actual text and shows you what changed in plain language:
--- report.docx (b71d003)
+++ report.docx (working copy)
@@ -1,4 +1,4 @@
Executive Summary
-Revenue for Q3 was $4.2M.
+Revenue for Q3 was $4.8M.
What you get:
-
Readable, content-level diffs of
.docx— across the body and headers, footers, footnotes, and comments — with the changed words highlighted and each change labelled with the section it's in. Alsocomparetwo loose files with no vault. -
Milestone history: snapshots,
log(with a--graph),show, word-countstats, andtags you can use anywhere a commit is expected - Branching and merging (whole-file conflict…
I'd love to hear your thoughts in the comments.




Top comments (0)