git diff. You can also run the CLI directly to compare a whole changeset and
find moves between files.
Install the driver
From your repository, run:diff=differens rules to .gitattributes. By default it registers every
extension listed by differens languages. Set driverExtensions in
differens.toml to choose a subset:
git diff and git diff --staged now show semantic summaries for matching files.
Other files keep their normal Git output. The driver receives one file pair at a
time, so use the standalone CLI to detect moves across files. After moving or
replacing the installed executable, run the installer again.
To remove the driver:
diff=differens from the affected .gitattributes rules too, keeping any
other attributes on those lines. See the Git API reference
for the underlying Rust functions.
Read a Git driver report
For the TypeScript rename and body edit in the quickstart, save the original as the committedsrc/checkout.ts, make the new edit, then run:
differens directly rather than running one driver per file.
Compare the working tree
With no arguments,differens compares the working tree against HEAD:
Compare commits
Use a range or two refs:differens HEAD~1 HEAD produces:
Compare directory snapshots
.git,
node_modules, target, dist, build, and vendor. Large or unsupported
semantic inputs can fall back to lines.
File and directory comparisons work outside a Git repository. Use ./ or absolute
paths when a filename could also resolve as a Git ref, and -- before filenames
that begin with a dash.
What the reports tell you
Differens names syntax changes, groups edits under declarations, and detects supported moves. Use JSON for the original actions, or--format=llm for compact
summaries with source locations. A move does not establish that behavior stayed
the same; read the source or a line diff when reviewing behavior.
Formatting-only edits often disappear when the parsed structure stays the same.
Parsing, matching, and output still take time; see benchmarks
for measured workloads.
Choosing a line diff or semantic report
Reformatting can disappear when the parsed structure stays the same, but
semantic comparison still costs parsing and matching. See
benchmarks for measured native results.