# 使用 Homebrew 安装 moco

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install moco
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:moco
- **软件包管理器:** Homebrew
- **版本:** 1.6.1
- **来源摘要:** Stub server with Maven, Gradle, Scala, and shell integration
- **主页:** <https://github.com/dreamhead/moco>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- moco (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.6.1
## 项目历史与用法

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


## 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
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
