Is it possible to install only MongoDB command line tools on MacOS?

Solution 1:

This was totally easy in May 2018 - everything was at the top level of https://brew.sh and self-proclaimed "The Missing Package Manager for macOS (or Linux)"

Install https://brew.sh to get homebrew system running and then

brew tap mongodb/brew
brew install mongodb-community
brew install mongodb-database-tools

Now in late 2020, the tool no longer meets the criteria to be listed as a top-level installation, so you have to first tap a cask for installation.

Also, the tools are now available separate from the database engine separate from compass (which embeds the former). These links work if you don’t want to brew the tools.

  • https://www.mongodb.com/try/download/tools
  • https://www.mongodb.com/try/download/community

Solution 2:

I tried all the proposed solutions but they did not work with me, I downloaded these tools by:

brew install mongodb/brew/mongodb-database-tools

Solution 3:

As for today, the correct answer is this:

brew tap mongodb/brew
brew install mongodb-community

Solution 4:

It is possible now.

brew tap mongodb/brew
brew install mongodb-community-shell

Link: https://github.com/mongodb/homebrew-brew