# Install opentofu with Homebrew, apk, chocolatey, dnf, Nix, pacman, zypper, scoop, winget

Drop-in replacement for Terraform. Infrastructure as Code Tool. Version 1.12.5 via Homebrew; verified 2026-07-21. Also installable with nix: nix profile install nixpkgs#opentofu.

## Install

```sh
sudo av install brew:opentofu
```

## Agent safety answer

opentofu plans and applies infrastructure changes from local state and cloud credentials.

- **Credential access:** Reads backend credentials, provider credentials, variables, and state data.
- **Remote mutation:** Can create, update, or destroy infrastructure resources.
- **Publish/artifact risk:** Can deploy infrastructure that exposes or runs application artifacts.
- **Recommended control:** Gate apply, destroy, import, state, and backend changes.
- **Agent-use guidance:** Allow plan by default; require approval for any state-changing command.

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install opentofu
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add opentofu
```

  Evidence: Alpine Linux edge package indexes: opentofu from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

```sh
sudo dnf install opentofu
```

  Evidence: Fedora Rawhide package metadata: opentofu from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#opentofu
```

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

- pacman (92%):

```sh
sudo pacman -S opentofu
```

  Evidence: Arch Linux sync databases: opentofu from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install opentofu
```

  Evidence: openSUSE Tumbleweed package metadata: opentofu from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Chocolatey (92%):

```sh
choco install opentofu
```

  Evidence: Chocolatey community package catalog: opentofu from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='7.9764','inconsolata'

- Scoop (92%):

```sh
scoop install main/opentofu
```

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

- winget (92%):

```sh
winget install --id OpenTofu.Tofu -e
```

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

## Package facts

- **Package key:** brew:opentofu
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/opentofu>
- **Version:** 1.12.5
- **Source summary:** Drop-in replacement for Terraform. Infrastructure as Code Tool
- **Homepage:** <https://opentofu.org/>
- **Repository:** <https://github.com/opentofu/opentofu>
- **Upstream docs:** <https://opentofu.org/docs>
- **License:** MPL-2.0
- **Source archive:** <https://github.com/opentofu/opentofu/archive/refs/tags/v1.12.5.tar.gz>
- **Last updated:** 2026-07-21T12:35:43Z
- **Generated:** 2026-07-26T07:20:29+00:00

## Executables

- tofu (cli)
- tofu (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-26
- Package-manager version: 1.12.5
- Package-manager updated: 2026-07-21
- Local data: ok
- Upstream repository: https://github.com/opentofu/opentofu
- Upstream latest detected: v1.12.5 (current)
## Project history and usage

OpenTofu is a community-driven infrastructure-as-code tool created as an open-source fork of Terraform after HashiCorp changed Terraform’s license from MPL-2.0 to the Business Source License. It keeps the familiar `plan`, `apply`, state, provider, module, and HCL-style workflows while using the `tofu` executable and Linux Foundation governance.

### Project history

The OpenTF manifesto began as an appeal to keep Terraform under a truly open-source license. When that did not happen, the initiative forked the last MPL-licensed Terraform codebase and moved forward as OpenTofu under the Linux Foundation. The project’s own announcement framed OpenTofu as community-driven, impartial, layered, modular, and backward-compatible.

OpenTofu reached its first stable release, 1.6.0, on January 10, 2024, after roughly four months of work. The project documented migration paths from Terraform 1.5.x and 1.6.x and positioned the release as production-ready for users who wanted open-source infrastructure-as-code continuity.

### Adoption history

OpenTofu adoption was unusually fast because it started with Terraform’s established user model, provider ecosystem, and module habits. The Linux Foundation launch announcement named broad community and company backing, while the OpenTofu homepage later described thousands of providers and modules available to users.

The package-manager story matters because OpenTofu’s promise is partly operational: users need a `tofu` binary in CI images, developer laptops, container builds, and distribution repositories. Homebrew, Nix, Alpine, Fedora, Arch, Scoop, Chocolatey, winget, and other package channels made the fork installable without bespoke bootstrapping.

### How it is used

Operators use OpenTofu to declare infrastructure resources, initialize providers and modules, compute plans, apply changes, manage state, and integrate infrastructure changes into CI/CD. It is intentionally familiar to Terraform users, with migration guides focused on preserving existing workflows and configurations.

The CLI reads configuration files, talks to provider plugins, stores state locally or remotely, and exposes command behavior that infrastructure teams script heavily. That makes packaging details such as executable name, plugin cache behavior, credentials files, and compatibility promises more important than for a throwaway CLI.

### Why package nerds care

OpenTofu is one of the clearest examples of licensing changing a package graph. A single upstream license decision created a new binary, new governance, new release channel, and new distro formulas for a tool already embedded in deployment pipelines.

### Timeline

- 2023-08: the OpenTF manifesto objected to Terraform’s license change and proposed an open-source path.
- 2023-09-20: the Linux Foundation announced OpenTofu as an open-source Terraform fork.
- 2024-01-10: OpenTofu 1.6.0 became the first stable release.
- 2024-01-10: the Linux Foundation announced OpenTofu general availability.

### Related projects

- Related projects include Terraform, the OpenTofu provider registry ecosystem, HCL, Terragrunt, Atlantis, Spacelift, env0, and CI/CD systems that run infrastructure plans as part of deployment workflows.

### Sources

- <https://opentofu.org/>
- <https://opentofu.org/blog/opentofu-announces-fork-of-terraform/>
- <https://opentofu.org/blog/opentofu-is-going-ga/>
- <https://opentofu.org/docs/v1.6/intro/migration/terraform-1.6/>
- <https://opentofu.org/manifesto/>
- <https://www.linuxfoundation.org/press/announcing-opentofu>
- <https://www.linuxfoundation.org/press/opentofu-announces-general-availability>


## Security Notes

infrastructure as code tool.

- **Geiger risk:** orange / high
- infrastructure as code tool


## 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: ~/.tofurc, $XDG_CONFIG_HOME/opentofu/tofurc
- Windows: %APPDATA%\tofu.rc

## Credential files

- Unix: ~/.terraform.d/credentials.tfrc.json
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** opentofu
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Conflicts With:** tenv, tofuenv
- **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 - opentofu: normalized package name match | nixpkgs package indexes: pkgs/by-name/op/opentofu/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - opentofu - 1.12.1-r0: normalized package name match | Alpine Linux edge package indexes: opentofu from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | OpenTofu lets you declaratively manage your cloud infrastructure | https://opentofu.org/
- dnf - opentofu - 1.12.0-1.fc45: normalized package name match | Fedora Rawhide package metadata: opentofu from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | OpenTofu lets you declaratively manage your cloud infrastructure | https://github.com/opentofu/opentofu
- pacman - opentofu - 1.12.0-1: normalized package name match | Arch Linux sync databases: opentofu from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Lets you declaratively manage your cloud infrastructure | https://github.com/opentofu/opentofu
- zypper - opentofu - 1.12.1-1.1: normalized package name match | openSUSE Tumbleweed package metadata: opentofu from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Declaratively manage your cloud infrastructure | https://github.com/opentofu/opentofu
- Chocolatey - opentofu: normalized package name match | Chocolatey community package catalog: opentofu from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='7.9764','inconsolata'
- Scoop - main/opentofu: normalized package name match | Scoop official bucket manifest trees: bucket/opentofu.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - OpenTofu.Tofu: normalized package name match | Windows Package Manager source index: OpenTofu.Tofu from https://cdn.winget.microsoft.com/cache/source.msix
- winget - OpenTofu.Tofu.Alpha: normalized package name match | Windows Package Manager source index: OpenTofu.Tofu.Alpha from https://cdn.winget.microsoft.com/cache/source.msix
- winget - OpenTofu.Tofu.Beta: normalized package name match | Windows Package Manager source index: OpenTofu.Tofu.Beta from https://cdn.winget.microsoft.com/cache/source.msix
- winget - OpenTofu.Tofu.RC: normalized package name match | Windows Package Manager source index: OpenTofu.Tofu.RC 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.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [aws-cdk](https://www.automicvault.com/pkg/brew/aws-cdk/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [org-formation](https://www.automicvault.com/pkg/brew/org-formation/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [otterdog](https://www.automicvault.com/pkg/brew/otterdog/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [pug](https://www.automicvault.com/pkg/brew/pug/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [pulumi](https://www.automicvault.com/pkg/brew/pulumi/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [rain](https://www.automicvault.com/pkg/brew/rain/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [sceptre](https://www.automicvault.com/pkg/brew/sceptre/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code.
- [ansible](https://www.automicvault.com/pkg/brew/ansible/) - Shares av.db curated category or tags: cli, cloud-infrastructure, infrastructure-as-code, provisioning.

## Combined YAML source

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