Precision Diffsby The Pierre Computer Company

Precision Diffs

Fast, exact diffing for modern apps. Fully open source, built on Shiki, insanely customizable, and packed with the features you need. Made with love by The Pierre Computer Company.

Documentation

Currently v0.5.0

Diff layout styles

Choose from stacked (unified) or split (side-by-side). Both use CSS Grid and Shadow DOM under the hood, meaning fewer DOM nodes and faster rendering.

Adapts to any Shiki theme

Precision Diffs are built with Shiki for syntax highlighting and general theming. Our components automatically adapt to blend in with your theme selection, including across color modes.

Love the Pierre themes? Install our Pierre VS Code Theme pack with light and dark flavors.

Choose how changes are styled

Your diffs, your choice. Render changed lines with classic diff indicators (+/–), full-width background colors, or vertical bars. You can even highlight inline changes—character or word based—and toggle line wrapping, hide numbers, and more.

Bring your own fonts

Precision Diffs adapts to any font, font-size, line-height, and even font-feature-settings you may have set. Configure font options with your preferred CSS method globally or on a per-component basis.

Comments & Annotations

Precision Diffs provide a flexible annotation framework for injecting additional content and context. Use it to render your own line comments, annotations from CI jobs, and other third-party content.

Y
You3h

Good lord, I refuse to look at diffs ever again after this.

A
Amadeus2h

Wait, how long have we been working on this?

M
Mark2h

*checks notes*… it’s not been a short amount of time.

Accept/Reject Changes

Annotations can also be used to build interactive code review interfaces similar to AI-assisted coding tools like Cursor. Use it to track the state of each change, inject custom UI like accept/reject buttons, and provide immediate visual feedback.

Line selection

Turn on line selection with enableLineSelection: true. When enabled, clicking a line number will select that line. Click and drag to select multiple lines, or hold Shift and click to extend your selection. You can also control the selection programmatically.

No selection

Diff arbitrary files

In addition to rendering standard Git diffs and patches, you can pass any two files in Precision Diffs and get a diff between them. This is especially useful when comparing across generative snapshots where linear history isn't always available. Edit the css below to see the diff.

With love from The Pierre Computer Company

Our team has decades of cumulative experience in open source, developer tools, and more. We’ve worked on projects like Coinbase, GitHub, Bootstrap, Twitter, Medium, and more. This stuff is our bread and butter, and we’re happy to share it with you.