OpenTofu / Terraform / Terragrunt / Terramate and Atmos version manager
OpenTofu / Terraform / Terragrunt / Terramate and Atmos version manager
Welcome to tenv, a versatile version manager for OpenTofu, Terraform, Terragrunt, Terramate and Atmos, written in Go. Our tool simplifies the complexity of handling different versions of these powerful tools, ensuring developers and DevOps professionals can focus on what matters most - building and deploying efficiently.
tenv is a successor of tofuenv and tfenv.
asdf-vm share the same goals than tenv : simplify the usage of several version of tools.
asdf-vm is generic and extensible with a plugin system, key tenv differences :
If you need to enable cosign checks, install cosign (v.2.0+) tool via one of the following commands:
Installation via Homebrew:
brew install cosignInstallation via MacPorts:
sudo port install cosigngo install github.com/sigstore/cosign/v2/cmd/cosign@latestapk add cosignsudo pacman -S cosignLATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | jq -r .tag_name | tr -d "v")
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign-${LATEST_VERSION}-1.x86_64.rpm"
sudo rpm -ivh cosign-${LATEST_VERSION}-1.x86_64.rpmLATEST_VERSION=$(curl https://api.github.com/repos/sigstore/cosign/releases/latest | jq -r .tag_name | tr -d "v")
curl -O -L "https://github.com/sigstore/cosign/releases/latest/download/cosign_${LATEST_VERSION}_amd64.deb"
sudo dpkg -i cosign_${LATEST_VERSION}_amd64.debThis package is available on the Arch Linux User Repository. It can be installed using the yay AUR helper:
yay tenv-binInstallation via Nix package manager:
nix-env -i tenvInstallation via Homebrew:
brew install tenvInstallation via MacPorts:
sudo port install tenvInstallation via Nix package manager:
nix-env -i tenvInstallation via Chocolatey:
choco install tenvInstallation via Scoop:
scoop install tenvInstallation via Nix package manager:
nix-env -i tenvInstallation via WinGet package manager:
winget install Tofuutils.Tenvsnap install tenvapk add tenv --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/Setup Cloudsmith repository automatically:
sudo apk add --no-cache bash
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.alpine.sh' | sudo bashInstall via apk:
apk add tenvLATEST_VERSION=$(curl --silent https://api.github.com/repos/tofuutils/tenv/releases/latest | jq -r .tag_name)
curl -O -L "https://github.com/tofuutils/tenv/releases/latest/download/tenv_${LATEST_VERSION}_amd64.deb"
sudo dpkg -i "tenv_${LATEST_VERSION}_amd64.deb"Installation via Nix package manager:
nix-env -i tenvSetup Cloudsmith repository automatically:
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.deb.sh' | sudo bashInstall via apt:
sudo apt install tenvSetup Cloudsmith repository automatically:
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.rpm.sh' | sudo bashInstall via yum:
sudo yum install tenvnix-env -iA nixos.tenvAdd the following Nix code to your NixOS Configuration, usually located in /etc/nixos/configuration.nix
environment.systemPackages = [
pkgs.tenv
];nix-shell -p tenvGet the most recent packaged binaries (.deb, .rpm, .apk, pkg.tar.zst , .zip or .tar.gz format) by visiting the release page. After downloading, unzip the folder and seamlessly integrate it into your system's PATH.
You can use dockerized version of tenv via the following command:
docker run -it --rm tofuutils/tenv:latest helpThe docker container is not meant as a way to run tenv for CI pipelines, for local use, you should use one of the packaged binaries.
zsh[!NOTE] If you install tenv via Brew, MacPorts, or Nix, completion will be installed automatically.
tenv completion zsh > ~/.tenv.completion.zsh
echo "source \$HOME/.tenv.completion.zsh" >> ~/.zshrctenv completion zsh > ~/.oh-my-zsh/completions/_tenvMake sure the completions folder ~/.oh-my-zsh/completions is listed under $fpath:
print -l $fpathtenv completion powershell | Out-String | Invoke-Expressiontenv completion bash > ~/.tenv.completion.bash
echo "source \$HOME/.tenv.completion.bash" >> ~/.bashrctenv completion fish > ~/.tenv.completion.fish
echo "source \$HOME/.tenv.completion.fish" >> ~/.config/fish/config.fishtenv supports OpenTofu,
Terraform, Terragrunt, Terramate and
Atmos. To manage each binary you can use tenv <tool> <command>. Below is a list of tools and commands that use actual subcommands:
| tool (alias) | env vars | description |
|---|
No open issues yet, or sync has not completed.