Giter Club home page Giter Club logo

mongocli's Introduction

MongoDB CLI Logo

GO tests golangci-lint

mongocli is a tool for managing your MongoDB cloud services

Installing

Hombrew on macOS

brew tap mongodb/brew
brew install mongocli

Pre-built Binaries

Download the appropriate version for your platform from mongocli releases. Once downloaded, the binary can be run from anywhere. You don't need to install it into a global location. This works well for shared hosts and other systems where you don't have a privileged account.

Ideally, you should place this binary somewhere in your PATH for easy use. /usr/local/bin is the most probable location.

Build From Source

Prerequisite Tools

Fetch Source

git clone https://github.com/mongodb/mongocli.git
cd mongocli

Build

To build mongocli, run:

make build

The resulting mongocli binary is placed in ./bin.

Install

To install the mongocli binary in $GOPATH/bin, run:

make install

Note: running make build is not needed when running make install.

Usage

Run mongocli help for a list of available commands or check our online documentation for more details.

Getting API Keys

To use mongocli you'll need to get API keys, to do this please follow the documentation appropriate for the service you're using, Atlas, Ops Manager, or Cloud Manager

Configuring mongocli

Run mongocli config to set up your credentials, this is optional and you can use env variables instead.

If you're working with Ops Manager or Cloud Manager you need to define the service using --service

For Ops Manager, mongocli config --service ops-manager.

For Cloud Manager, mongocli config --service cloud-manager.

Environment Variables

You can use a combination of the next env variables to override your profile settings

  • MCLI_PUBLIC_API_KEY
  • MCLI_PRIVATE_API_KEY
  • MCLI_PROJECT_ID
  • MCLI_ORG_ID
  • MCLI_OPS_MANAGER_URL

Shell Completions

If you install via homebrew there's nothing else to do. For other installations please refer to your preferred shell instructions.

Bash

$ source <(mongocli completion bash)

To load completions for each session, execute once:

Linux:

mongocli completion bash > /etc/bash_completion.d/mongocli

macOS:

mongocli completion bash > /usr/local/etc/bash_completion.d/mongocli

Zsh

source <(mongocli completion zsh)

To load completions for each session, execute once:

mongocli completion zsh > "${fpath[1]}/_mongocli"

Fish

mongocli completion fish | source

Contributing

See our CONTRIBUTING.md Guide.

License

MongoDB CLI is released under the Apache 2.0 license. See LICENSE

mongocli's People

Contributors

andreaangiolillo avatar dependabot[bot] avatar gssbzn avatar jamesbroadhead avatar kimchelly avatar melissamahoney-mongodb avatar mihaibojin avatar p-mongo avatar renatoriccio avatar robcarlan-mlab avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.