# 使用 Homebrew, dnf, Nix 安装 mdsh

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

## 安装

```sh
sudo av install brew:mdsh
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mdsh
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install mdsh
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mdsh
```

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

## 软件包事实

- **软件包键:** brew:mdsh
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mdsh>
- **版本:** 0.9.2
- **来源摘要:** Markdown shell pre-processor
- **主页:** <https://zimbatm.github.io/mdsh/>
- **仓库:** <https://github.com/zimbatm/mdsh>
- **上游文档:** <https://github.com/zimbatm/mdsh#readme>
- **许可证:** MIT
- **源码归档:** <https://github.com/zimbatm/mdsh/archive/refs/tags/v0.9.2.tar.gz>
- **已生成:** 2026-07-08T07:18:31+00:00

## 可执行文件

- mdsh (cli)
- mdsh (别名)

## 构建依赖

- rust

## 安装行为

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

## 版本和新鲜度

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

mdsh is a Rust Markdown shell preprocessor that updates Markdown files in place by including files, executing commands, and refreshing generated blocks. The project describes itself as similar to literate programming or notebooks, but for shell commands in Markdown.

### 项目历史

The public repository was created on 2019-02-15. Its README explains the original problem as keeping README snippets, command output, and embedded file contents synchronized without manually copying text.

Unlike many preprocessors that emit a separate generated file, mdsh is designed around idempotent in-place updates. The README and project site document a compact Markdown extension for command blocks, comments, links, raw Markdown output, code-block output, and shell variable expansion.

### 采用历史

Official installation instructions recommend `cargo install mdsh`, Nix installation, Nix flakes, and use as a pre-commit hook. The input package-manager facts list Homebrew, dnf, and Nix packages.

GitHub metadata showed ongoing maintenance through 2026 and a modest but real open-source footprint, with repository topics around Markdown, pre-processing, and shell.

### 使用方式

By default, `mdsh` processes `./README.md`; `--inputs`, `--output`, and `--work-dir` let users choose files and execution directories. The `--frozen` mode is intended for CI checks that fail when generated documentation is stale.

The README documents commands for reading files, executing shell commands, producing raw Markdown or code blocks, expanding environment variables, cleaning generated blocks, and installing mdsh as a pre-commit hook.

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

mdsh matters to package-oriented developers because it turns a README into a reproducible build artifact without leaving Markdown. It is small, scriptable, CI-friendly, and sits in the same culture as literate shell docs, generated examples, and pre-commit-enforced documentation freshness.

### 时间线

- 2019: Public GitHub repository created.
- 2019: README license block identifies copyright for zimbatm and contributors.
- 2026: Repository metadata showed continued updates and availability through Cargo, Nix, Homebrew, and dnf-related packaging facts.

### Related projects

- The README compares mdsh with literate programming, Jupyter Notebooks, active code/Pandoc filters, and Enola.dev ExecMD.
- The project deliberately chooses in-place Markdown updates rather than a separate rendered-document pipeline.

### 来源

- <https://api.github.com/repos/zimbatm/mdsh>
- <https://github.com/zimbatm/mdsh#readme>
- <https://zimbatm.github.io/mdsh/>
- source_facts.package-manager


## 安全说明

generalized runtime or code generation signal.

- **Geiger 风险:** yellow / 中
- generalized runtime or code generation signal

## 源数据库详情

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

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

- Nix - mdsh: normalized package name match | nixpkgs package indexes: pkgs/by-name/md/mdsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- dnf - mdsh - 0.7.0-8.fc44: normalized package name match | Fedora Rawhide package metadata: mdsh from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Markdown shell pre-processor | https://crates.io/crates/mdsh


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/zh-hans/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [rust](https://www.automicvault.com/zh-hans/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [mdbook](https://www.automicvault.com/zh-hans/pkg/brew/mdbook/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown, rust.
- [action-docs](https://www.automicvault.com/zh-hans/pkg/brew/action-docs/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [cargo-docset](https://www.automicvault.com/zh-hans/pkg/brew/cargo-docset/) - Shares av.db curated category or tags: cli, developer-tools, documentation, rust.
- [cmdshelf](https://www.automicvault.com/zh-hans/pkg/brew/cmdshelf/) - Shares av.db curated category or tags: cli, developer-tools, rust, shell.
- [comrak](https://www.automicvault.com/zh-hans/pkg/brew/comrak/) - Shares av.db curated category or tags: cli, developer-tools, markdown, rust.
- [docfx](https://www.automicvault.com/zh-hans/pkg/brew/docfx/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [docmd](https://www.automicvault.com/zh-hans/pkg/brew/docmd/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [github-markdown-toc](https://www.automicvault.com/zh-hans/pkg/brew/github-markdown-toc/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.

## Combined YAML source

View the package source record on GitHub. [combined/mdsh.yml](https://github.com/automic-vault/db/blob/main/combined/mdsh.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
