Quickstart
You will have your first semantic diff in under a minute. It takes two files and one command.Step 1: Create two files
Createbefore.ts and after.ts. The example function is renamed and gains a parameter:
Step 2: Run the diff
Step 3: Read the output
~ update, + insert, - delete. The function rename is one action, not a delete and an insert.
Compare that to a line diff of the same change:
Nodes that did not change (like
TAX_RATE) produce no output. The diff core only emits actions for nodes that differ between the two trees.Step 4: Try JSON output
Pass--format=json for machine-readable output:
Insert, Delete, Update, or Move. The context field gives the containment chain (nearest ancestor first) so you can reconstruct where every change happened. See Machine Outputs for the full schema and the compact --format=llm mode.
Step 5: Diff a git working tree
Rundifferens with no arguments inside a git repository. It diffs the working tree against HEAD:
Step 6: Diff two directories
Compare two directories. Files present in both are diffed; files only on one side show as additions or removals:What’s next
- CLI reference: every command, flag, and format
- Guides: git integration, machine outputs, and benchmarks
- How it works: the matching algorithm, tier pipeline, and cross-file correlation