# Install terraform-docs with Homebrew, chocolatey, MacPorts, Nix, scoop, winget

Tool to generate documentation from Terraform modules. Version 0.24.0 via Homebrew; verified 2026-05-11.

## Install

```sh
sudo av install brew:terraform-docs
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install terraform-docs
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install terraform-docs
```

  Evidence: MacPorts ports tree: devel/terraform-docs/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#terraform-docs
```

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

### Windows

- Chocolatey (92%):

```sh
choco install Terraform-Docs
```

  Evidence: Chocolatey community package catalog: Terraform-Docs from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','telegram.install'

- Scoop (92%):

```sh
scoop install main/terraform-docs
```

  Evidence: Scoop official bucket manifest trees: bucket/terraform-docs.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id Terraform-docs.Terraform-docs -e
```

  Evidence: Windows Package Manager source index: Terraform-docs.Terraform-docs from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:terraform-docs
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/terraform-docs>
- **Version:** 0.24.0
- **Source summary:** Tool to generate documentation from Terraform modules
- **Homepage:** <https://terraform-docs.io/>
- **Repository:** <https://github.com/terraform-docs/terraform-docs>
- **Upstream docs:** <https://terraform-docs.io/>
- **License:** MIT
- **Source archive:** <https://github.com/terraform-docs/terraform-docs/archive/refs/tags/v0.24.0.tar.gz>
- **Last updated:** 2026-05-11T00:44:30Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- terraform-docs (cli)
- terraform-docs (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: 0.24.0
- Package-manager updated: 2026-05-11
- Local data: ok
- Upstream repository: https://github.com/terraform-docs/terraform-docs
- Upstream latest detected: v0.24.0 (current)
## Project history and usage

terraform-docs is a Terraform module documentation generator. It reads module inputs, outputs, providers, requirements, and related metadata, then renders that information into Markdown, AsciiDoc, JSON, YAML, XML, TOML, or other output formats for README files and automation workflows.

### Project history

The terraform-docs/terraform-docs repository was created on GitHub in June 2016, during the period when Terraform modules were becoming a common unit of infrastructure reuse. Its own README describes the project as a utility to generate documentation from Terraform modules in various output formats, and the dedicated terraform-docs.io documentation site grew into the primary user guide.

The project published v0.0.1 in June 2016 and continued as a Go CLI distributed through GitHub releases, Homebrew, Scoop, Chocolatey, Docker images, and `go install`. Later releases added a formal YAML configuration file, recursive module support, output injection, and richer formatter behavior, turning the tool from a README helper into a standard module-maintenance step.

### Adoption history

terraform-docs became widely adopted because Terraform modules need documentation that stays synchronized with code. The official README documents direct binary use, Docker use, a GitHub Action, and a pre-commit hook, which reflects its common adoption path in teams that gate infrastructure pull requests on generated README changes.

The package-manager footprint is broad for a Terraform adjunct CLI: the input package facts list Homebrew, Chocolatey, MacPorts, Nix, Scoop, and winget packaging. That breadth is consistent with a tool used by both local developers and CI systems rather than only by one language ecosystem.

### How it is used

The usual workflow is to run `terraform-docs` against a module directory and write or inject generated documentation into README.md. The README example uses `terraform-docs markdown table --output-file README.md --output-mode inject /path/to/module`, while the configuration guide documents `.terraform-docs.yml` discovery from the module root, `.config` subdirectories, the current directory, and `$HOME/.tfdocs.d/`.

In package-manager culture, terraform-docs is often installed as a single binary and pinned in pre-commit or CI. Its value is not only the rendered docs, but the reproducibility: maintainers can regenerate module docs from source and detect drift during review.

### Why package nerds care

terraform-docs is significant because it sits at the boundary between infrastructure-as-code and documentation-as-build-artifact. It gives Terraform module authors the kind of generated reference material that language package maintainers expect from API-doc tools, but in a standalone CLI that system package managers can distribute.

For Homebrew and other package-manager users, it is a classic small Go tool with high leverage: one executable, no service dependency, and obvious CI/pre-commit use. That makes it a common companion to Terraform, tflint, checkov, and other infrastructure review tools.

### Timeline

- 2016: GitHub repository created.
- 2016: v0.0.1 released.
- 2017: v0.1.0 and v0.3.0 released.
- 2020: Configuration options documented as available since v0.10.0.
- 2021: `.config` lookup paths documented as available since v0.15.0.
- 2026: v0.24.0 listed as the latest GitHub release during research.

### Related projects

- The official README documents a companion terraform-docs GitHub Action and pre-commit hook integration. It also fits into the wider Terraform module ecosystem, where generated README sections are commonly checked alongside Terraform source.

### Sources

- <https://api.github.com/repos/terraform-docs/terraform-docs>
- <https://github.com/terraform-docs/terraform-docs#readme>
- <https://github.com/terraform-docs/terraform-docs/releases>
- <https://terraform-docs.io/>
- <https://terraform-docs.io/user-guide/configuration/>
- source_facts.package-manager


## Security Notes

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



## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: <module-root>/.terraform-docs.yml, <module-root>/.config/.terraform-docs.yml, ./.terraform-docs.yml, ./.config/.terraform-docs.yml, ~/.tfdocs.d/.terraform-docs.yml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** terraform-docs
- **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 - terraform-docs: normalized package name match | nixpkgs package indexes: pkgs/by-name/te/terraform-docs/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - terraform-docs: normalized package name match | MacPorts ports tree: devel/terraform-docs/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - Terraform-Docs: normalized package name match | Chocolatey community package catalog: Terraform-Docs from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','telegram.install'
- Scoop - main/terraform-docs: normalized package name match | Scoop official bucket manifest trees: bucket/terraform-docs.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - Terraform-docs.Terraform-docs: normalized package name match | Windows Package Manager source index: Terraform-docs.Terraform-docs from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Cloud CLI packages](https://www.automicvault.com/pkg/cloud-clis/) - Belongs to a cloud or infrastructure 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.
- [helm-docs](https://www.automicvault.com/pkg/brew/helm-docs/) - Shares av.db curated category or tags: cli, developer-tools, documentation, documentation-generator, markdown.
- [iam-policy-json-to-terraform](https://www.automicvault.com/pkg/brew/iam-policy-json-to-terraform/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [sourcekitten](https://www.automicvault.com/pkg/brew/sourcekitten/) - Shares av.db curated category or tags: cli, developer-tools, documentation, documentation-generator, markdown.
- [swagger2markup-cli](https://www.automicvault.com/pkg/brew/swagger2markup-cli/) - Shares av.db curated category or tags: asciidoc, cli, developer-tools, documentation, markdown.
- [tf-profile](https://www.automicvault.com/pkg/brew/tf-profile/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tf-summarize](https://www.automicvault.com/pkg/brew/tf-summarize/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tfautomv](https://www.automicvault.com/pkg/brew/tfautomv/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [tfclean](https://www.automicvault.com/pkg/brew/tfclean/) - Shares av.db curated category or tags: cli, developer-tools, infrastructure-as-code, terraform.
- [terraform-module-versions](https://www.automicvault.com/pkg/brew/terraform-module-versions/) - Package names and metadata indicate a similar tool family. Shared terms: cli, code, developer, developer-tools, infrastructure.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- 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
