# 使用 Homebrew, Nix 安装 markdown-toc

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

## 安装

```sh
sudo av install brew:markdown-toc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install markdown-toc
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#markdown-toc
```

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

## 软件包事实

- **软件包键:** brew:markdown-toc
- **软件包管理器:** Homebrew
- **版本:** 1.2.0
- **来源摘要:** Generate a markdown TOC (table of contents) with Remarkable
- **主页:** <https://github.com/jonschlinkert/markdown-toc>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- markdown-toc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

markdown-toc is a Node.js API and CLI for generating and inserting tables of contents in Markdown files.

### 项目历史

The GitHub repository was created in 2013. The README describes markdown-toc as a tool that uses Remarkable to parse Markdown and can be used from the command line or as an API/plugin.

The project belongs to the ecosystem of README automation tools around Jon Schlinkert's packages, Verb, and Assemble-style documentation workflows. Its own README is generated with Verb using markdown-toc, making the package self-demonstrating.

### 采用历史

The official repository description says the package is used by many well-known projects and thousands of other projects. The README displays npm version/download badges and documents npm installation, while supplied package facts show Homebrew and Nix packaging as well.

### 使用方式

The common CLI workflow is to install markdown-toc globally, add a hidden <!-- toc --> marker to a README, and run markdown-toc -i README.md to inject or update the generated TOC. Without in-place mode, the CLI can print a TOC to standard output or JSON.

As an API, markdown-toc returns rendered content plus token data so build scripts can render a custom table of contents. Options cover heading depth, bullet style, slugification, filtering, indentation, and whether to include the first H1.

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

markdown-toc is a classic small Unixy documentation helper: it reads Markdown, emits Markdown, and is easy to wire into README generation. Package maintainers care because it has a stable CLI surface and also doubles as a library for build-time documentation automation.

### 时间线

- 2013: GitHub repository created.
- 2010s: README documents npm installation and CLI/API usage for README table-of-contents generation.
- 2026: Supplied package facts list Homebrew and Nix packaging.

### Related projects

- The README identifies Remarkable as the Markdown parser used by markdown-toc.
- The README notes it was generated with Verb and can be used as a Remarkable plugin.

### 来源

- <https://api.github.com/repos/jonschlinkert/markdown-toc>
- <https://github.com/jonschlinkert/markdown-toc>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

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

- Nix - markdown-toc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/markdown-toc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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