# Install topiary with Homebrew, Nix, winget

Uniform formatter for simple languages, as part of the Tree-sitter ecosystem. Version 0.7.3 via Homebrew; verified 2026-07-04.

## Install

```sh
sudo av install brew:topiary
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install topiary
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#topiary
```

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

### Windows

- winget (92%):

```sh
winget install --id Tweag.Topiary -e
```

  Evidence: Windows Package Manager source index: Tweag.Topiary from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:topiary
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/topiary>
- **Version:** 0.7.3
- **Source summary:** Uniform formatter for simple languages, as part of the Tree-sitter ecosystem
- **Homepage:** <https://topiary.tweag.io/>
- **Repository:** <https://github.com/topiary/topiary>
- **Upstream docs:** <https://topiary.tweag.io/book>
- **License:** MIT
- **Source archive:** <https://github.com/topiary/topiary/archive/refs/tags/v0.7.3.tar.gz>
- **Last updated:** 2026-07-04T16:53:46+09:00
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- topiary (cli)
- topiary (alias)

## Build dependencies

- rust

## 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: 0.7.3
- Package-manager updated: 2026-07-04
- Local data: ok
- Upstream repository: https://github.com/topiary/topiary
- Upstream latest detected: v0.7.3 (current)
## Project history and usage

Topiary is a Rust code-formatting tool from Tweag that uses Tree-sitter grammars and query files to build formatters for multiple languages. Its project identity is a 'uniform formatter for simple languages' in the Tree-sitter ecosystem.

### Project history

Topiary's changelog records an early prototype release in June 2022 and v0.1.0 in March 2023. Tweag announced the project publicly in March 2023 as a universal formatter engine aimed at both formatter authors and end users: authors write declarative formatting queries rather than a parser and engine, while users get consistent style from a single tool.

The Topiary Book explains the core architecture: Topiary relies on Tree-sitter parse trees and Tree-sitter query captures to decide where to add spacing, line breaks, and formatting actions. This makes the project part of the broader editor and parser ecosystem rather than a standalone formatter for only one language.

Through 2024 and 2025, releases added packaging, a CLI crate, dynamically fetched grammars, coverage and query tooling, OpenSCAD, WIT, SDML, Nickel and OCaml work, prefetching, man pages, and Tree-sitter upgrades. The changelog shows v0.7.3 at the end of 2025, while crates.io lists topiary-cli 0.7.3 as the current published CLI package in early 2026.

### Adoption history

Topiary is still a specialist formatter rather than a universal default, but it has package-manager reach in the input metadata through Homebrew, Nix, and Winget. Its audience overlaps with Nix/Tweag/Tree-sitter users, formatter authors, language-tooling maintainers, and developers working on languages that lack a mature dedicated formatter.

### How it is used

Topiary is used either as a CLI formatter or as a framework for defining formatting behavior. Formatter authors provide Tree-sitter grammars and query files; users can run the CLI to format supported languages, prefetch grammars, check formatting in CI, and inspect coverage of formatting queries.

### Why package nerds care

Topiary matters to package nerds because it turns formatting support into packageable language data: grammars, query files, and CLI releases can be distributed separately from language compilers. That fits ecosystems such as Nix, Homebrew, Winget, Tree-sitter, and editor tooling, where small language tools are composed from reusable packages.

### Timeline

- 2022: v0.0.1 prototype recorded in the changelog.
- 2023: v0.1.0 released and Tweag announced Topiary.
- 2024: v0.5.1 era adds dynamic grammar handling and topiary-cli packaging appears on crates.io.
- 2025: v0.6.x and v0.7.x add language support, Topiary Book documentation, man pages, and Tree-sitter upgrades.
- 2026: crates.io lists topiary-cli 0.7.3 as the current published CLI release.

### Related projects

- Tree-sitter, Nickel, OCaml, OpenSCAD, WIT, SDML, Nix, Homebrew, Winget, formatter tooling.

### Sources

- <https://crates.io/crates/topiary-cli>
- <https://github.com/tweag/topiary#readme>
- <https://raw.githubusercontent.com/tweag/topiary/main/CHANGELOG.md>
- <https://topiary.tweag.io/>
- <https://topiary.tweag.io/book/>
- <https://topiary.tweag.io/book/getting-started/on-tree-sitter.html>
- <https://tweag.io/blog/2023-03-09-announcing-topiary/>
- source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

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

## Other Package-Manager Records

- Nix - topiary: normalized package name match | nixpkgs package indexes: pkgs/by-name/to/topiary/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- winget - Tweag.Topiary: normalized package name match | Windows Package Manager source index: Tweag.Topiary from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [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.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [ormolu](https://www.automicvault.com/pkg/brew/ormolu/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [perltidy](https://www.automicvault.com/pkg/brew/perltidy/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [air](https://www.automicvault.com/pkg/brew/air/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [alejandra](https://www.automicvault.com/pkg/brew/alejandra/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [astyle](https://www.automicvault.com/pkg/brew/astyle/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [black](https://www.automicvault.com/pkg/brew/black/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [cbfmt](https://www.automicvault.com/pkg/brew/cbfmt/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [darker](https://www.automicvault.com/pkg/brew/darker/) - Shares av.db curated category or tags: cli, code-formatting, developer-tools, formatter.
- [sql-formatter](https://www.automicvault.com/pkg/brew/sql-formatter/) - Local package facts share a topical domain. Shared terms: cli, code, code-formatting, developer, developer-tools.

## Combined YAML source

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