# 使用 Homebrew 安装 github-markdown-toc

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

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

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:github-markdown-toc
- **软件包管理器:** Homebrew
- **版本:** 2.0.1
- **来源摘要:** Easy TOC creation for GitHub README.md (in go)
- **主页:** <https://github.com/ekalinin/github-markdown-toc.go>
- **仓库:** <https://github.com/ekalinin/github-markdown-toc.go>
- **最后更新:** 2026-07-29T16:05:02+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gh-md-toc (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

github-markdown-toc is the Go implementation of ekalinin's GitHub README table-of-contents generator. It produces GitHub-style Markdown links for headings in local files, remote GitHub files, multiple documents, or standard input.

### 项目历史

The Go repository began in July 2015 as a compiled alternative to the original shell-oriented github-markdown-toc tool. Its README highlights the reasons for the Go rewrite: no curl, wget, awk, or similar runtime dependencies; cross-platform binaries; regular-expression parsing; and processing multiple documents.

The release history moved quickly through 0.x tags in 2015 and 2016, reached 1.0.0 in 2018, and later added a 2.x line in 2025. The README documents installation through prebuilt release archives, Go install, source builds, and Homebrew under the gh-md-toc executable.

### 采用历史

The tool fits a common GitHub documentation practice: long README files often include a manually pasted table of contents, but GitHub's generated heading anchors can be fussy to reproduce by hand. github-markdown-toc packages that convention into a repeatable CLI for maintainers.

### 使用方式

Practitioners pipe Markdown to gh-md-toc, point it at local README files, or give it GitHub URLs. Options control serial processing, heading depth, indentation, escaping, GitHub tokens, and GitHub Enterprise Server endpoints.

The generated output is usually copied into the source README, making the tool part of documentation maintenance rather than a runtime dependency of the documented project.

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

For package-manager users, the appeal is a single static-feeling command that replaces shell pipelines and browser guessing with a reproducible GitHub-compatible TOC generator. It is small, narrow, and easy to install for documentation chores.

### 时间线

- 2015: Initial Go implementation commit appears.
- 2015: 0.1.0 and early 0.x tags establish the gh-md-toc command.
- 2018: 1.0.0 is tagged.
- 2025: v2.0.0 starts the 2.x release line.
- 2026: v2.0.1 appears in the release stream.

### Related projects

- github-markdown-toc.go is related to the original github-markdown-toc project, GitHub-flavored Markdown, GitHub Enterprise Server, and README maintenance workflows.

### 来源

- <https://github.com/ekalinin/github-markdown-toc.go>
- <https://github.com/ekalinin/github-markdown-toc.go/releases>
- <https://pkg.go.dev/github.com/ekalinin/github-markdown-toc.go>


## 安全说明

narrow executable package without higher-risk signals.

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


## Combined YAML source

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


## 来源

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