How To Run Meld on Mac OS X Yosemite Without Homebrew, MacPorts, or Think

I love Meld. It’s is my favorite diff tool, and one of the tools I missed the most when I switched over to Mac from Linux.

Except, you can run Meld on Mac too. The easiest way is using Homebrew, via brew install meld. If you don’t have Homebrew on your Mac yet, it will only take a minute to install via one simple command, and you will probably end up installing it at some point anyway.

Make sure the file is still executable sudo chmod a+x /usr/local/bin/meld

Old Post:

Note: `brew install meld` will probably fail, but the error will show you the proper command to run. In February of 2016 for me that command was `brew install homebrew/gui/meld`, some people report that `brew install homebrew/x11/meld` worked for them. Just read the outputted message carefully. It will probably have to pull in a lot of dependencies so it might take a while, but it should work.

For some reason Homebrew did not work for me on my new Mac back in February of 2015, so I had to look for other options (hence the “Without Homebrew, MacPorts, or Think” part in the original title of this article).

After some intense Googling, I came across this AWESOME fork of Meld. It is Meld packaged with all of the dependencies into a regular .dmg. Pleae make sure to visit the official project page – Meld for OSX.

Note: I am linking to release tagged osx-v1, there have been other releases since then. Some of them did not work for all users, but the latest release (OSX – 3.15.2) suppose to work. You might have to try a few release to find the one that works for you. The author of of that package posts his updates in the comments sometimes, so be on a lookout for that. If all fails I recommend using version osx-v1, since it seems to work for most users.

As I said earlier, Meld.dmg “just worked” for me, except that it didn’t work in the command line, and that is where I need it the most.

I wrote the following script (in python since you already need it to run meld) and placed it in ~/bin folder (making sure to add ~/bin to my PATH, see bellow).

Note: There is a cleaner version posted in the comments that should work with 3 arguments, allowing you to use meld as a merge tool. I have not tested it, but it looks like it should work, and it might be worth your time to try it first.

I then added that folder to my PATH via export PATH=~/bin:$PATH entry in my .bashrc file, to make sure that meld command got picked up in my terminal. You can reload your bash config via . ~/.bashrc or just restart the terminal. Type in meld and it should work.

I’ve been using it for a few weeks many months now, and yet to run into any problems. So there you have it, a working Meld on Mac OS X Yosemite, without having to use any 3rd party tools.

It shouldn’t require a wrapper script any longer. I haven’t had the time to 100% clean the wrapper script, but it seems functional and is based on what you guys have suggested here. You can find the script in /Applications/Meld.app/Contents/MacOS/Meld after you have installed Meld. If you have suggestions or fixes that you’d like to add to it, I’d love to hear from you.

No, man. Thank you for maintaining this page. It’s been awesome! The feedback on this page has been amazing and I would have honestly stopped at 1.8 (it pretty much fit the bill for what I needed) if it wasn’t for the feedback on your page.

Ops – didn’t check this thread in a while. I also didn’t notice that you couldn’t report issues on my fork in github.

I’ll see how to enable that and get back to you guys in here.. I did test on multiple Macs with Yosemite, but I’d really like this fork to be useful. I hated meld on macports and it’s about the best diff/merge tool I ever used. I’d like to spread it around.. 🙂

I just tried the .dmg version, but alas it does not run for me.
I’d love to try and debug the beta, but there doesn’t seem to be a way to make contact with Yousef.
I’d actually gotten the MacPorts version of meld running under Quartz without X11 on my Mavericks system, but that was a year ago. It looks like I’m gonna have to refresh my understanding of the lore.

Yes, the osx-v1 version does work.
The later versions just crash.
The error I get with osx-v3 is:
9/12/15 11:09:27.898 PM com.apple.launchd.peruser.501[228]: (org.gnome.meld.332320[38819]) Exited with code: 1

I am not a python guy and only a recent mac guy, so I’d like to add to the above comments with the following points:

Paste the python script show a the bottom of this post into a text file and save it as “meld”. It can go on your desktop for now – my editor didn’t give me access to /usr/local/bin/ which was already in my path (I think that a default PATH entry. Check yours by typing “echo $PATH” into a terminal.)

Copy the file you saved onto the desktop into “/usr/local/bin/”. (You may need to show your hidden files for this, please Google that part).

You need to make you file executable, so open a terminal and navigate to /usr/local/bin/. Type
“chmod +x meld”

This should now work if you’re more of a noob like me. Python script that worked for me for both diff and merge, with the Meld Error fix is as follows. Please check the single and double quotes have not been botched by your text editor, check you have a double hyphen before “args”.

With the steps outlined above, Meld still only runs from SourceTree when I run SourceTree using the command line tool (stree) or by double-clicking the executable from the SourceTree package contents. I guess this is a permissions thing but I haven’t figured out why yet.

This method is not working for me. I have tried it. It is throwing “Meld Error” open console/Terminate options. I have put the script in ~/bin dir. But still not sure. If u know fix please let me know.