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.

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.

Then opendiff started working again. 🤷♀️

