Categories Renaissance Topic

Fixing the `opendiff` command line tool

On my Mac, you can use this command like…

opendiff index.html index-2.html

And it’ll open some built-in GUI app called FileMerge to show you the diff.

Screenshot of FileMerge comparing two HTML files, showing a difference in <h1> tags with 'Not Cool' on the left and 'Cool' on the right, and indicating 1 difference.

It wasn’t working for me. I wish I copied the exact error but it was something about the path being wrong or the executable not being available or something.

The solution that worked for me was to open XCode and go to Settings > Location. The Command Line Tools section didn’t have anything selected, and I had to select XCode from the list.

Xcode locations settings panel showing Derived Data, Archives, Compilation Cache, and Command Line Tools paths.

Then opendiff started working again. 🤷‍♀️

More From Author

You May Also Like

A Practical Guide To UX Strategy

For years, “UX strategy” felt like a confusing, ambiguous, and overloaded term to me. To…

How To Leverage Component Variants In Penpot

This article is a sponsored by Penpot Since Brad Frost popularized the use of design…

ToiletTree Fogless Shower Mirror

I know this is a weird product recommendation, but I’ve just thought about it too…