Docs Menu

Docs HomeMongoDB Command Line Interface

Quick Start

On this page

  • Prerequisites
  • Download and Install MongoDB CLI
  • Generate Programmatic Access Keys
  • Configure the MongoDB CLI
  • Next Steps

MongoDB CLI provides a command-line interface for managing your MongoDB Atlas, MongoDB Cloud Manager, and MongoDB Ops Manager projects and clusters. This tutorial demonstrates how to download, install, and configure MongoDB CLI. Then, for each platform, it demonstrates how to create a ready-to-go MongoDB cluster.

The reference pages for the commands mentioned in this tutorial are available in the mongocli section.

Before you begin, review and ensure that your environment is compatible for installing and using MongoDB CLI.

This tutorial requires the following:

See Install or Update the MongoDB CLI for information on downloading and installing MongoDB CLI. After installing MongoDB CLI, run the following command to verify installation:

mongocli help

MongoDB CLI uses Programmatic Access Keys to access the Atlas, Cloud Manager, or Ops Manager projects. Your Programmatic API Key must have:

  • The project owner or higher role

  • The access list entry for your IP address or CIDR range

To learn more about generating the Programmatic API Key, see:

Now that you've installed and configured MongoDB CLI for accessing your MongoDB service, proceed to:

←  Customize the MongoDB CLI Output Using a Go TemplateGet Started with MongoDB Atlas →
Share Feedback