# 使用 Homebrew, Nix, pacman 安装 mermaid-cli

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

## 安装

```sh
sudo av install brew:mermaid-cli
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mermaid-cli
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#mermaid-cli
```

  证据: nixpkgs package indexes: pkgs/by-name/me/mermaid-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S mermaid-cli
```

  证据: Arch Linux sync databases: mermaid-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:mermaid-cli
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mermaid-cli>
- **版本:** 11.16.0
- **来源摘要:** CLI for Mermaid library
- **主页:** <https://github.com/mermaid-js/mermaid-cli>
- **仓库:** <https://github.com/mermaid-js/mermaid-cli>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/@mermaid-js/mermaid-cli/-/mermaid-cli-11.16.0.tgz>
- **最后更新:** 2026-06-30T20:35:41Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mmdc (cli)
- mmdc (别名)

## 依赖

- node

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 11.16.0
- 管理器更新时间: 2026-06-30
- 本地数据: OK
- 上游仓库: https://github.com/mermaid-js/mermaid-cli
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

mermaid-cli is the command-line front end for Mermaid, the text-to-diagram JavaScript library. The repository describes it as a CLI that takes a Mermaid definition file and produces SVG, PNG, or PDF output; the Mermaid documentation page for the CLI redirects readers to the separate `mermaid-js/mermaid-cli` project.

### 项目历史

The practical interface is the `mmdc` command, used in documentation builds, CI pipelines, and local authoring workflows where diagrams must be rendered from `.mmd` source files without opening the Mermaid live editor. The package supports global npm installation, Docker-oriented usage, theming, transparent backgrounds, custom CSS injection, and file conversion workflows such as `mmdc -i input.mmd -o output.svg`.

### 使用方式

For Homebrew, the package-manager niche is making Mermaid rendering available as a normal system CLI, alongside its npm package identity. It sits between documentation generators and browser automation: users write Mermaid syntax in source-controlled text files, then render stable image or document artifacts for READMEs, static sites, and release documentation.

### 来源

- <https://formulae.brew.sh/formula/mermaid-cli>
- <https://github.com/mermaid-js/mermaid-cli>
- <https://github.com/mermaid-js/mermaid-cli/releases>
- <https://mermaid.js.org/config/mermaidCLI.html>


## 安全说明

没有找到 mermaid-cli 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mermaid-cli
- **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

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

- Nix - mermaid-cli: normalized package name match | nixpkgs package indexes: pkgs/by-name/me/mermaid-cli/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - mermaid-cli - 11.16.0-2: normalized package name match | Arch Linux sync databases: mermaid-cli from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Generate images from Mermaid files | https://github.com/mermaid-js/mermaid-cli


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [node](https://pkg.so/zh-hans/brew/node/) - Runtime dependency declared by Homebrew.
- [dvisvgm](https://pkg.so/zh-hans/brew/dvisvgm/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation, pdf, svg.
- [doxygen](https://pkg.so/zh-hans/brew/doxygen/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [docutils](https://pkg.so/zh-hans/brew/docutils/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [docbook-xsl](https://pkg.so/zh-hans/brew/docbook-xsl/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [asciidoc](https://pkg.so/zh-hans/brew/asciidoc/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [asciidoctor](https://pkg.so/zh-hans/brew/asciidoctor/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [mscgen](https://pkg.so/zh-hans/brew/mscgen/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation, png, svg.
- [mdbook](https://pkg.so/zh-hans/brew/mdbook/) - Shares pkgdb curated category or tags: cli, developer-tools, documentation.
- [action-docs](https://pkg.so/zh-hans/brew/action-docs/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, documentation, node.
- [terramaid](https://pkg.so/zh-hans/brew/terramaid/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, developer, developer-tools, diagrams, documentation.
- [reveal-md](https://pkg.so/zh-hans/brew/reveal-md/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, documentation, node.

## Combined YAML source

View the package source record on GitHub. [combined/mermaid-cli.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mermaid-cli.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
- external package-manager database matches
- cross-ecosystem install command graph
