# 使用 Homebrew, MacPorts 安装 mongocli

查看 mongocli 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:mongocli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mongocli
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mongocli
```

  证据: MacPorts ports tree: databases/mongocli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:mongocli
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mongocli>
- **版本:** 2.0.7
- **来源摘要:** MongoDB CLI enables you to manage your MongoDB in the Cloud
- **主页:** <https://www.mongodb.com/docs/mongocli/current/>
- **仓库:** <https://github.com/mongodb/mongodb-cli>
- **上游文档:** <https://www.mongodb.com/docs/mongocli/current/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/mongodb/mongodb-cli/archive/refs/tags/mongocli/v2.0.7.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mongocli (cli)
- mongocli (别名)

## 构建依赖

- go

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.0.7
- 本地数据: OK
- 上游仓库: https://github.com/mongodb/mongodb-cli
- 检测到的最新版本: mongocli/v2.0.7 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

MongoDB CLI, invoked as mongocli, was built by MongoDB as a terminal interface for MongoDB management services. Its repository describes it as a modern command-line interface for managing MongoDB services from the terminal, with simple one-line commands for Ops Manager and Cloud Manager automation.

### 项目历史

The tool's role narrowed after MongoDB separated Atlas administration into the Atlas CLI. MongoDB CLI 2.0.0, released on 2024-03-14, fully deprecated mongocli atlas commands and directed users to migrate Atlas workflows to the Atlas CLI. That leaves mongocli primarily in the Ops Manager and Cloud Manager niche: automation, alerts, backups, clusters, agents, logs, maintenance windows, metrics, processes, and security settings for managed MongoDB deployments outside the dedicated Atlas CLI path.

### 使用方式

Homebrew and MacPorts package it as a single mongocli executable for administrators and CI jobs that need scripted access to Cloud Manager or Ops Manager without using the web UI.

### 来源

- <https://formulae.brew.sh/formula/mongocli>
- <https://github.com/mongodb/mongodb-cli>
- <https://www.mongodb.com/docs/mongocli/current/command/mongocli-ops-manager/>
- <https://www.mongodb.com/docs/mongocli/current/release-notes/>
- <https://www.mongodb.com/try/download/mongocli>


## 安全说明

infrastructure mutation or orchestration signal.

- **Geiger 风险:** orange / 中
- infrastructure mutation or orchestration signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: $XDG_CONFIG_HOME/mongocli/config.toml, ~/.config/mongocli/config.toml
- macOS: /Users/{username}/Library/Application Support/mongocli/config.toml
- Windows: %AppData%\mongocli\config.toml

## Credential files

- Linux: $XDG_CONFIG_HOME/mongocli/config.toml, ~/.config/mongocli/config.toml
- macOS: /Users/{username}/Library/Application Support/mongocli/config.toml
- Windows: %AppData%\mongocli\config.toml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mongocli
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 其他软件包管理器记录

- MacPorts - mongocli: normalized package name match | MacPorts ports tree: databases/mongocli/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [mongosh](https://pkg.so/zh-hans/brew/mongosh/) - Shares pkgdb curated category or tags: cli, developer-tools, mongodb.
- [mongodb-atlas-cli](https://pkg.so/zh-hans/brew/mongodb-atlas-cli/) - Shares pkgdb curated category or tags: cli, developer-tools, mongodb.
- [pyp](https://pkg.so/zh-hans/brew/pyp/) - Shares pkgdb curated category or tags: automation, cli, developer-tools.
- [mongo-orchestration](https://pkg.so/zh-hans/brew/mongo-orchestration/) - Shares pkgdb curated category or tags: cli, developer-tools, mongodb.
- [recur](https://pkg.so/zh-hans/brew/recur/) - Shares pkgdb curated category or tags: automation, cli, developer-tools.
- [atomist-cli](https://pkg.so/zh-hans/brew/atomist-cli/) - Shares pkgdb curated category or tags: automation, cli, developer-tools.
- [gh](https://pkg.so/zh-hans/brew/gh/) - Shares pkgdb curated category or tags: automation, cli, developer-tools.
- [just](https://pkg.so/zh-hans/brew/just/) - Shares pkgdb curated category or tags: automation, cli, developer-tools.
- [algolia](https://pkg.so/zh-hans/brew/algolia/) - Local package facts share a topical domain. Shared terms: automation, cli, cloud, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/mongocli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mongocli.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
