# Install gtree with Homebrew, MacPorts, Nix

Generate directory trees and directories using Markdown or programmatically. Version 1.14.9 via Homebrew; verified 2026-07-01.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gtree
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gtree
```

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:gtree
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/gtree>
- **Version:** 1.14.9
- **Source summary:** Generate directory trees and directories using Markdown or programmatically
- **Homepage:** <https://ddddddo.github.io/gtree/>
- **Repository:** <https://github.com/ddddddO/gtree>
- **Upstream docs:** <https://ddddddo.github.io/gtree>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/ddddddO/gtree/archive/refs/tags/v1.14.9.tar.gz>
- **Last updated:** 2026-07-01T18:22:32Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gtree (cli)
- gtree (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.14.9
- Package-manager updated: 2026-07-01
- Local data: ok
- Upstream repository: https://github.com/ddddddO/gtree
- Upstream latest detected: v1.14.9 (current)
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

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

### Sources

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


## Security Notes

No matching local secret-handling manifest was found for gtree. Nucleus package metadata is still published here so future coverage has a stable package URL.


## Source Database Details

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

## Other Package-Manager Records

- 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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [action-docs](https://www.automicvault.com/pkg/brew/action-docs/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [cheat](https://www.automicvault.com/pkg/brew/cheat/) - Shares av.db curated category or tags: cli, developer-tools, documentation, go.
- [docfx](https://www.automicvault.com/pkg/brew/docfx/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [docmd](https://www.automicvault.com/pkg/brew/docmd/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [github-markdown-toc](https://www.automicvault.com/pkg/brew/github-markdown-toc/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [go-md2man](https://www.automicvault.com/pkg/brew/go-md2man/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [grip](https://www.automicvault.com/pkg/brew/grip/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [mdbook](https://www.automicvault.com/pkg/brew/mdbook/) - Shares av.db curated category or tags: cli, developer-tools, documentation, markdown.
- [mmark](https://www.automicvault.com/pkg/brew/mmark/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, documentation, go.

## Combined YAML source

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


## Sources

- 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
