# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop, winget 安装 mdbook

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

## 安装

```sh
sudo av install brew:mdbook
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mdbook
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mdbook
```

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

### Linux

- apk (92%):

```sh
sudo apk add mdbook
```

  证据: Alpine Linux edge package indexes: mdbook from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install mdbook
```

  证据: Debian stable package indexes: mdbook from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install mdbook
```

  证据: Fedora Rawhide package metadata: mdbook from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#mdbook
```

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

- pacman (92%):

```sh
sudo pacman -S mdbook
```

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

- zypper (92%):

```sh
sudo zypper install mdbook
```

  证据: openSUSE Tumbleweed package metadata: mdbook from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/mdbook
```

  证据: Scoop official bucket manifest trees: bucket/mdbook.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Rustlang.mdBook -e
```

  证据: Windows Package Manager source index: Rustlang.mdBook from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:mdbook
- **软件包管理器:** Homebrew
- **版本:** 0.5.4
- **来源摘要:** Create modern online books from Markdown files
- **主页:** <https://rust-lang.github.io/mdBook/>
- **仓库:** <https://github.com/rust-lang/mdBook>
- **最后更新:** 2026-07-06T21:38:51Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mdbook (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

mdBook is the Rust project's Markdown-based static book generator. The upstream README describes it as a utility for creating modern online books from Markdown files, and the GitHub repository description summarizes it as like GitBook but implemented in Rust.

### 项目历史

The official GitHub repository was created on 2015-07-07. mdBook grew in the Rust ecosystem as a documentation-oriented command-line tool: books are initialized with `mdbook init`, configured with `book.toml`, organized with `src/SUMMARY.md`, and rendered or served with commands such as `mdbook build` and `mdbook serve`.

The official user guide is itself an mdBook output, so the documentation doubles as a demonstration of the generated site format. The repository has continued active releases, with the GitHub releases API showing v0.5.3 published on 2026-05-19.

### 采用历史

The supplied package-manager metadata shows mdBook in Homebrew, Alpine, Debian, MacPorts, Nix, Arch, Scoop, winget, and openSUSE. That broad packaging matches its use as a documentation build tool rather than only as a Rust crate.

Within package-manager culture, mdBook became familiar because it appears in source trees and documentation build pipelines: installing `mdbook` is often enough to preview or publish a project's manual locally.

### 使用方式

A typical workflow is `mdbook init my-first-book`, edit Markdown files under `src`, maintain the chapter tree in `src/SUMMARY.md`, and run `mdbook serve --open` for live rebuilding and browser refresh. Publishing uses `mdbook build` to generate a `book` directory of static HTML.

The book configuration file is `book.toml` at the book root. The official guide describes it as TOML and shows a minimal `[book]` table with a title.

### 为什么软件包爱好者会关心

mdBook matters to package maintainers because it turned documentation into a reproducible command-line build artifact. Instead of relying on a hosted wiki or a JavaScript-heavy documentation system, projects can build a static manual from Markdown with one packaged binary.

It is also a visible Rust ecosystem tool: it uses Rust's distribution channels and is packaged widely enough that documentation builds can depend on the system package manager instead of a project-local install step.

### 时间线

- 2015-07-07: Official GitHub repository created.
- 2010s: mdBook established the `book.toml` plus `src/SUMMARY.md` structure documented in the official guide.
- 2026-05-19: GitHub releases API lists v0.5.3 published.

### Related projects

- The repository description explicitly compares mdBook to GitBook while emphasizing that mdBook is implemented in Rust.
- The official guide links the book format to Markdown content, TOML configuration, and static HTML publishing.

### 来源

- <https://api.github.com/repos/rust-lang/mdBook>
- <https://api.github.com/repos/rust-lang/mdBook/releases?per_page=15>
- <https://github.com/rust-lang/mdBook#readme>
- <https://rust-lang.github.io/mdBook>
- source_facts.package-manager


## 安全说明

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



## 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

- Unix: book.toml
## 其他软件包管理器记录

- Debian apt - librust-mdbook-dev - 0.4.48+ds-2: normalized package name match | Debian stable package indexes: librust-mdbook-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown book creator tool - Rust source code | https://rust-lang.github.io/mdBook/
- Debian apt - mdbook - 0.4.48+ds-2: normalized package name match | Debian stable package indexes: mdbook from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Markdown book creator tool | https://rust-lang.github.io/mdBook/
- Nix - mdbook: normalized package name match | nixpkgs package indexes: pkgs/by-name/md/mdbook/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - mdbook - 0.5.4-r0: normalized package name match | Alpine Linux edge package indexes: mdbook from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | mdBook is a utility to create modern online books from Markdown files | https://rust-lang.github.io/mdBook/
- apk - mdbook-bash-completion - 0.5.4-r0: normalized package name match | Alpine Linux edge package indexes: mdbook-bash-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Bash completions for mdbook | https://rust-lang.github.io/mdBook/
- apk - mdbook-fish-completion - 0.5.4-r0: normalized package name match | Alpine Linux edge package indexes: mdbook-fish-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Fish completions for mdbook | https://rust-lang.github.io/mdBook/
- apk - mdbook-zsh-completion - 0.5.4-r0: normalized package name match | Alpine Linux edge package indexes: mdbook-zsh-completion from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Zsh completions for mdbook | https://rust-lang.github.io/mdBook/
- dnf - mdbook - 0.5.3-3.fc45: normalized package name match | Fedora Rawhide package metadata: mdbook from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Creates a book from markdown files | https://crates.io/crates/mdbook
- pacman - mdbook - 0.5.4-1: normalized package name match | Arch Linux sync databases: mdbook from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Create book from markdown files, like Gitbook but implemented in Rust | https://github.com/rust-lang/mdBook
- zypper - mdbook - 0.4.49-1.4: normalized package name match | openSUSE Tumbleweed package metadata: mdbook from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Create books from markdown | https://github.com/rust-lang/mdBook
- MacPorts - mdbook: normalized package name match | MacPorts ports tree: textproc/mdbook/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/mdbook: normalized package name match | Scoop official bucket manifest trees: bucket/mdbook.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Rustlang.mdBook: normalized package name match | Windows Package Manager source index: Rustlang.mdBook from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

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


## 来源

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