# 使用 Homebrew 安装 moco

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

## 安装

```sh
sudo av install brew:moco
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install moco
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:moco
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/moco>
- **版本:** 1.6.1
- **来源摘要:** Stub server with Maven, Gradle, Scala, and shell integration
- **主页:** <https://github.com/dreamhead/moco>
- **仓库:** <https://github.com/dreamhead/moco>
- **许可证:** MIT
- **源码归档:** <https://search.maven.org/remotecontent?filepath=com/github/dreamhead/moco-runner/1.6.1/moco-runner-1.6.1-standalone.jar>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- moco (cli)
- moco (别名)

## 依赖

- openjdk

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.6.1
- 本地数据: OK
- 上游仓库: https://github.com/dreamhead/moco
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

Moco is a Java stub-server and mocking framework from ZHENG Ye's dreamhead/moco project, with copyright dates in the upstream README beginning in 2012. The project was built around a small alternative to deploying temporary WAR files or embedded application servers for HTTP integration testing: write a JSON response description, run the standalone runner, and point tests or clients at the local stub endpoint.

### 项目历史

Its ecosystem role is deliberately practical. Moco can be embedded as a Java API in JUnit tests, run as a standalone server, or reached through Maven, Gradle, shell, and Scala integrations. The documentation covers HTTP, HTTPS, socket, REST, WebSocket, and SSE APIs, which places it in the Java testing niche alongside mock HTTP servers and service-virtualization tools rather than full API gateways.

### 使用方式

The Homebrew formula exposes the `moco` executable for command-line use, while the upstream project also publishes Maven artifacts such as `moco-core` and the standalone runner. The 2.0.0 line moved the project to Java 17 or later, marking a runtime baseline change for a tool that had long been used in build and integration-test workflows.

### 来源

- <https://formulae.brew.sh/formula/moco>
- <https://github.com/dreamhead/moco>
- <https://raw.githubusercontent.com/dreamhead/moco/master/README.md>
- <https://raw.githubusercontent.com/dreamhead/moco/master/moco-doc/usage.md>


## 安全说明

broad file, network, media, or database tool signal. generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- broad file, network, media, or database tool signal
- generalized runtime or code generation signal

## 源数据库详情

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


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [openjdk](https://pkg.so/zh-hans/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [mockserver](https://pkg.so/zh-hans/brew/mockserver/) - Shares pkgdb curated category or tags: api, cli, developer-tools, http, testing.
- [prism-cli](https://pkg.so/zh-hans/brew/prism-cli/) - Shares pkgdb curated category or tags: api, cli, developer-tools, testing.
- [byteman](https://pkg.so/zh-hans/brew/byteman/) - Shares pkgdb curated category or tags: cli, developer-tools, java, testing.
- [gor](https://pkg.so/zh-hans/brew/gor/) - Shares pkgdb curated category or tags: cli, developer-tools, http, testing.
- [lcov](https://pkg.so/zh-hans/brew/lcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [bats-core](https://pkg.so/zh-hans/brew/bats-core/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [allure](https://pkg.so/zh-hans/brew/allure/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [kcov](https://pkg.so/zh-hans/brew/kcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [sqlancer](https://pkg.so/zh-hans/brew/sqlancer/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, java, openjdk.
- [apib](https://pkg.so/zh-hans/brew/apib/) - Local package facts share a topical domain. Shared terms: api, cli, developer, developer-tools, http.
- [beakerlib](https://pkg.so/zh-hans/brew/beakerlib/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, integration, shell.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- cross-ecosystem install command graph
