# 使用 Homebrew, MacPorts, Nix 安装 gtree

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

## 安装

```sh
sudo av install brew:gtree
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gtree
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gtree
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gtree
```

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

## 软件包事实

- **软件包键:** brew:gtree
- **软件包管理器:** Homebrew
- **版本:** 1.14.9
- **来源摘要:** Generate directory trees and directories using Markdown or programmatically
- **主页:** <https://ddddddo.github.io/gtree/>
- **仓库:** <https://github.com/ddddddO/gtree>
- **最后更新:** 2026-07-27T14:57:53+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gtree (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

gtree is a Go package and CLI family for turning structured input into ASCII trees, directory skeletons, and verification checks. It began as a developer-facing Go library, then grew into command-line tooling for Markdown, JSON, YAML, and TOML tree generation.

### 项目历史

The public repository traces back to a first commit on 2019-02-12. Its README frames the library as a simple way for Go programs to output tree structures, then documents CLI surfaces around Markdown and structured-data input.

The project split its practical surface into the `gtree` CLI for Markdown-based trees, directory creation, and directory verification, plus `xtree` for JSON, YAML, and TOML input. A WebAssembly-backed web page, Tree Maker, extends the same Markdown-to-tree idea into a browser tool.

### 采用历史

gtree moved into package-manager workflows through Go modules and release artifacts, with the README documenting installation through `go install`, Homebrew, Nix, MacPorts, Scoop, Docker images, and binary packages. The input metadata records Homebrew, MacPorts, and Nix packaging.

### 使用方式

Developers can call package functions such as `OutputFromRoot`, `MkdirFromRoot`, `VerifyFromRoot`, and Markdown equivalents from Go code. CLI users pipe Markdown unordered lists into `gtree output`, use templates to create directories and files, or compare a Markdown description with an existing filesystem tree.

`xtree` covers another common package-user workflow: piping JSON, YAML, or TOML into a tree renderer for quick inspection of nested configuration or API-shaped data.

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

gtree is not a replacement for the classic Unix `tree` command; it is more of a programmable tree printer and scaffolding verifier. That makes it interesting to package nerds who care about small Go CLIs, documentation examples, generated project skeletons, and terminal-friendly visualization of nested data.

### 时间线

- 2019-02-12: Public repository first commit.
- 2021-05-30: GitHub repository metadata records repository creation.
- 2022-08-19: Release metadata includes v1.7.12.
- 2020s: README documents Go package, Markdown CLI, WebAssembly Tree Maker, and xtree structured-data workflows.

### Related projects

- The README acknowledges related tree-output tools for cloud storage, including stree for Amazon S3 and gcstree for Google Cloud Storage. In use, gtree also sits near the classic `tree` utility, Markdown processors, and small JSON/YAML/TOML inspection tools.

### 来源

- <https://api.github.com/repos/ddddddO/gtree>
- <https://api.github.com/repos/ddddddO/gtree/releases?per_page=100>
- <https://ddddddo.github.io/gtree/>
- <https://github.com/ddddddO/gtree>
- <https://pkg.go.dev/github.com/ddddddO/gtree>


## 安全说明

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


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

- Nix - gtree: normalized package name match | nixpkgs package indexes: pkgs/by-name/gt/gtree/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - gtree: normalized package name match | MacPorts ports tree: sysutils/gtree/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

View the package source record on GitHub. [combined/gtree.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gtree.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
