Install the MongoDB CLI

You can use the MongoDB Command Line Interface (mongocli) to deploy and manage MongoDB clusters in Atlas, Cloud Manager, and Ops Manager. For operating system and MongoDB service version requirements, see Compatibility.

To install the MongoDB CLI, choose one of the following methods:

  1. Install with a package manager like Homebrew, Yum, or Apt.
  2. Download and extract the binary.
  3. Clone the GitHub repository and install the MongoDB CLI with Go.

To install the MongoDB CLI using Homebrew, you must:

  1. Use a MacOS or Linux operating system.
  2. Install Homebrew.

Invoke the following brew commands:

brew tap mongodb/brew
brew install mongocli

To verify your mongocli installation, run the help command:

mongocli help

The command returns the available commands and options for the MongoDB CLI.

Configure the MongoDB CLI for your environment.

Give Feedback