diff --git a/README.md b/README.md index c1bd00acd5..742bb02b5e 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,18 @@ -

- MongoDB CLI Logo -

- +## MongoDB Atlas CLI ![GO tests](https://github.com/mongodb/mongocli/workflows/GO%20tests/badge.svg) ![golangci-lint](https://github.com/mongodb/mongocli/workflows/golangci-lint/badge.svg) -The MongoDB CLI is a modern command line interface that enables you to manage your MongoDB services from the terminal. - -![mongocli-atlas-quickstart](https://user-images.githubusercontent.com/461027/126986233-0dd5c82a-2c75-4887-ab66-eb018c59e093.gif) +The MongoDB Atlas CLI repository contains the following modern command line interfaces: +- [Atlas CLI](atlascli.md) +- [MongoDB CLI](mongocli.md) Use simple, one-line commands to interact with MongoDB Atlas, Cloud Manager, or Ops Manager, and to automate management tasks for your deployments. -## Documentation - -See the [official docs](https://docs.mongodb.com/mongocli/stable/) for instructions on how to -install, set up, and reference available commands. - -## Installing - -### Homebrew on macOS - -```bash -brew install mongocli -``` - -### Pre-built Binaries - -Download the appropriate version for your platform from [mongocli releases](https://github.com/mongodb/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 -- [Git](https://git-scm.com/) -- [Go (at least Go 1.17)](https://golang.org/dl/) - -#### Fetch Source - -```bash -git clone https://github.com/mongodb/mongocli.git -cd mongocli -``` - -#### Build - -To build `mongocli`, run: - -```bash -make build -``` - -The resulting `mongocli` binary is placed in `./bin`. - -#### Install - -To install the `mongocli` binary in `$GOPATH/bin`, run: - -```bash -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](https://docs.mongodb.com/mongocli/master/) for more details. - -### Getting API Keys - -To use `mongocli` you'll need to get API keys, to get them follow the documentation -appropriate for the service you're using, -[Atlas](https://docs.atlas.mongodb.com/configure-api-access/), -[Ops Manager](https://docs.opsmanager.mongodb.com/current/tutorial/configure-public-api-access/), -or [Cloud Manager](https://docs.cloudmanager.mongodb.com/tutorial/manage-programmatic-api-keys/) - -### Configuring `mongocli` - -Run `mongocli config` to set up your credentials, -this is optional, you can use [env variables](https://docs.mongodb.com/mongocli/stable/configure/environment-variables/) instead. - -If you're working with Atlas Gov, Ops Manager or Cloud Manager you need to define the service using `--service` - -For Atlas Gov, `mongocli config --service cloudgov`. - -For Ops Manager, `mongocli config --service ops-manager`. - -For Cloud Manager, `mongocli config --service cloud-manager`. - -### Shell Completions - -If you install via [homebrew](#hombrew-on-macos) no additional actions are needed. - -To get specific instructions for your preferred shell run: - -```bash -mongocli completion --help -``` - ## Contributing See our [CONTRIBUTING.md](CONTRIBUTING.md) guide. ## License -MongoDB CLI is released under the Apache 2.0 license. See [LICENSE](LICENSE) +MongoDB CLI and Atlas CLI are released under the Apache 2.0 license. See [LICENSE](LICENSE) diff --git a/atlascli.md b/atlascli.md new file mode 100644 index 0000000000..3e1d144b3d --- /dev/null +++ b/atlascli.md @@ -0,0 +1,66 @@ +# Atlas CLI (Pre-Release) + +The MongoDB Atlas CLI is a modern command line interface that enables you to manage MongoDB Atlas from the terminal. + +![atlascli-atlas-quickstart](https://user-images.githubusercontent.com/5663078/156184669-57c8ddce-6f0a-4e84-9311-2d996cb27942.gif) + +## Installing + +Atlas CLI is currently in the pre-release phase. Do not use it in a production environment. + +### Pre-built Binaries + +Download the appropriate version for your platform from [Atlas CLI releases](https://github.com/mongodb/mongocli/releases). +After you download the library, you can run it from anywhere and 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. + +You can place this binary somewhere in your `PATH` for ease of use. +`/usr/local/bin` is the most probable location. + +### Build From Source + +#### Fetch Source + +```bash +git clone https://github.com/mongodb/mongocli.git +cd mongocli +``` + +#### Build + +To build `atlascli`, run: + +```bash +make build-atlascli +``` + +The resulting `atlas` binary is placed in `./bin`. + +#### Install + +To install the `atlas` binary in `$GOPATH/bin`, run: + +```bash +make install-atlascli +``` + +**Note:** running `make build-atlascli` is not needed when running `make install-atlascli`. + + +## Usage + +To get a list of available commands, run `atlas help` +or check our documentation for more details. + +### Configuring Atlas CLI +To use `atlascli`, open your terminal, run `atlas auth login`, and follow the prompted steps. + +### Shell Completions + +If you install via [homebrew](#hombrew-on-macos) no additional actions are needed. + +To get specific instructions for your preferred shell, run: + +```bash +atlas completion --help +``` \ No newline at end of file diff --git a/mongocli.md b/mongocli.md new file mode 100644 index 0000000000..ae9ad40784 --- /dev/null +++ b/mongocli.md @@ -0,0 +1,93 @@ +# MongoDB CLI + +The MongoDB CLI is a modern command line interface that enables you to manage your MongoDB services from the terminal. + +![mongocli-atlas-quickstart](https://user-images.githubusercontent.com/461027/126986233-0dd5c82a-2c75-4887-ab66-eb018c59e093.gif) + +Use simple, one-line commands to interact with MongoDB Atlas, Cloud Manager, or Ops Manager, and automate management tasks for your deployments. + +## Documentation + +See the [official docs](https://docs.mongodb.com/mongocli/stable/) for instructions on how to +install, set up, and reference available commands. + +## Installing + +### Homebrew on macOS + +```bash +brew install mongocli +``` + +### Pre-built Binaries + +Download the appropriate version for your platform from [mongocli releases](https://github.com/mongodb/mongocli/releases). +After you download the library, you can run it from anywhere and 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. + +You can place this binary somewhere in your `PATH` for ease of use. +`/usr/local/bin` is the most probable location. + +### Build From Source + +#### Fetch Source + +```bash +git clone https://github.com/mongodb/mongocli.git +cd mongocli +``` + +#### Build + +To build `mongocli`, run: + +```bash +make build +``` + +The resulting `mongocli` binary is placed in `./bin`. + +#### Install + +To install the `mongocli` binary in `$GOPATH/bin`, run: + +```bash +make install +``` + +**Note:** running `make build` is not needed when running `make install`. + +## Usage + +To get a list of available commands, run `mongocli help` +or check our [documentation](https://docs.mongodb.com/mongocli/master/) for more details. + +### Configuring MongoCLI with Atlas +To use `mongocli` with Atlas, open your terminal, run `mongocli auth login`, and follow the prompted steps. + +### Configuring MongoCLI with Ops Manager and Cloud Manager + +#### Getting API Keys (Ops manager / Cloud Manager) +To use `mongocli`, create API keys. To learn more, see the documentation for the service you're using: +- [Atlas](https://docs.atlas.mongodb.com/configure-api-access/), +- [Ops Manager](https://docs.opsmanager.mongodb.com/current/tutorial/configure-public-api-access/), +- [Cloud Manager](https://docs.cloudmanager.mongodb.com/tutorial/manage-programmatic-api-keys/) + +#### Set up your credentials +To set up your credentials, run `mongocli config`, or use [env variables](https://docs.mongodb.com/mongocli/stable/configure/environment-variables/) instead. + +If you're working with Atlas Gov, Ops Manager or Cloud Manager you need to define the service using `--service` + +- For Atlas Gov, `mongocli config --service cloudgov` +- For Ops Manager, `mongocli config --service ops-manager` +- For Cloud Manager, `mongocli config --service cloud-manager` + +### Shell Completions + +If you install via [homebrew](#hombrew-on-macos) no additional actions are needed. + +To get specific instructions for your preferred shell, run: + +```bash +mongocli completion --help +``` \ No newline at end of file