# 使用 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
- **软件包管理器页面:** <https://formulae.brew.sh/formula/markdown-toc>
- **版本:** 1.2.0
- **来源摘要:** Generate a markdown TOC (table of contents) with Remarkable
- **主页:** <https://github.com/jonschlinkert/markdown-toc>
- **仓库:** <https://github.com/jonschlinkert/markdown-toc>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/markdown-toc/-/markdown-toc-1.2.0.tgz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- markdown-toc (cli)
- markdown-toc (别名)

## 依赖

- node

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.2.0
- 本地数据: OK
- 上游仓库: https://github.com/jonschlinkert/markdown-toc
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

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

## 源数据库详情

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


## 相关链接

- [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.
- [mark](https://pkg.so/zh-hans/brew/mark/) - Shares pkgdb curated category or tags: cli, documentation, markdown, productivity.
- [marp-cli](https://pkg.so/zh-hans/brew/marp-cli/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [papeer](https://pkg.so/zh-hans/brew/papeer/) - Shares pkgdb curated category or tags: cli, markdown, productivity, remarkable.
- [backlog-md](https://pkg.so/zh-hans/brew/backlog-md/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [mdcat](https://pkg.so/zh-hans/brew/mdcat/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [mdless](https://pkg.so/zh-hans/brew/mdless/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [treemd](https://pkg.so/zh-hans/brew/treemd/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [mdfried](https://pkg.so/zh-hans/brew/mdfried/) - Shares pkgdb curated category or tags: cli, markdown, productivity.
- [markdown-toc](https://pkg.so/zh-hans/npm/markdown-toc/) - Same normalized package name appears in another local ecosystem. Shared terms: cli, contents, documentation, generate, markdown.
- [adr-tools](https://pkg.so/zh-hans/npm/adr-tools/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, documentation, markdown, markdown-toc, node.
- [markdown-toc](https://pkg.so/zh-hans/npm/markdown-toc/) - Same normalized package name in another local ecosystem.

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