Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
T

tenv

> 数据库
Open source

OpenTofu / Terraform / Terragrunt / Terramate and Atmos version manager

1.4K stars0 likes1 views
WebsiteGitHub

About

OpenTofu / Terraform / Terragrunt / Terramate and Atmos version manager


About The Project

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.

Key Features

  • Versatile version management: Easily switch between different versions of OpenTofu, Terraform, Terragrunt, Terramate and Atmos.
  • Semver 2.0.0 Compatibility: Utilizes go-version for semantic versioning and use the HCL parser to extract required version constraint from OpenTofu/Terraform/Terragrunt files (see required_version and Terragrunt hcl).
  • Signature verification: Supports cosign (if present on your machine) and PGP (via gopenpgp), see signature support.
  • Intuitive installation: Simple installation process with Homebrew and manual options.
  • Callable as Go module, with a Semver compatibility promise on tenvlib wrapper package (get more information in TENV_AS_LIB.md).

Difference with asdf

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 :

  • tenv is more specific and has features dedicated to OpenTofu, Terraform, Terragrunt, Terramate and Atmos, like HCL parsing based detection (see Key Features).
  • tenv is distributed as independent binaries and does not rely on any shell or other CLI executable.
  • tenv does better in terms of performance and platform compatibility. It works uniformly across all modern operating systems, including Linux, MacOS, Windows, BSD, and Solaris, whereas asdf-vm natively supports only Linux and MacOS.
  • tenv checks the sha256 checksum and the signature of the checksum file with cosign. Check Signature support section for getting more information about it.
  • tenv command compatibility: In nearly all places you can use the exact syntax that works in tfenv / tofuenv. If you're coming from tfenv/tofuenv and comfortable with that way of working you can almost always use the same syntax with tenv.
  • tenv performance: It sounds incredibly useful, though it might be tough to get a real apples to apples comparison since the tools work differently in a lot of ways. The author of asdf did a great writeup of performance problems.

Table of Contents

Table of Contents
  1. About The Project
    • Key Features
    • Difference with asdf
  2. Table of contents
  3. Getting Started
    • Prerequisites
    • Installation
  4. Usage
  5. Environment variables
  6. Version files
  7. Technical details
  8. Verifying tenv Signatures
  9. Contributing
  10. Community
  11. Authors
  12. Licence

Getting Started

Prerequisites

If you need to enable cosign checks, install cosign (v.2.0+) tool via one of the following commands:

MacOS (Homebrew, MacPorts)

Installation via Homebrew:

bash
brew install cosign

Installation via MacPorts:

bash
sudo port install cosign
Windows (go install)
bash
go install github.com/sigstore/cosign/v2/cmd/cosign@latest
Alpine Linux
bash
apk add cosign
Arch Linux
bash
sudo pacman -S cosign
Linux: RPM
bash
LATEST_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.rpm
Linux: dkpg
bash
LATEST_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.deb

Installation

Automatic Installation

Arch Linux (AUR, Nix)

This package is available on the Arch Linux User Repository. It can be installed using the yay AUR helper:

bash
yay tenv-bin

Installation via Nix package manager:

bash
nix-env -i tenv
MacOS (Homebrew, MacPorts, Nix)

Installation via Homebrew:

bash
brew install tenv

Installation via MacPorts:

bash
sudo port install tenv

Installation via Nix package manager:

bash
nix-env -i tenv
Windows (Chocolatey, Scoop etc.)

Installation via Chocolatey:

bash
choco install tenv

Installation via Scoop:

bash
scoop install tenv

Installation via Nix package manager:

bash
nix-env -i tenv

Installation via WinGet package manager:

bash
winget install Tofuutils.Tenv
Linux: Snapcraft
bash
snap install tenv
Alpine
bash
apk add tenv --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/

Installation via Cloudsmith Artifact Management platform.

Setup Cloudsmith repository automatically:

bash
sudo apk add --no-cache bash
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.alpine.sh' | sudo bash

Install via apk:

bash
apk add tenv
Ubuntu

Install via dpkg

bash
LATEST_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"

Install via Nix

Installation via Nix package manager:

bash
nix-env -i tenv

Installation via Cloudsmith Artifact Management platform.

Setup Cloudsmith repository automatically:

bash
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.deb.sh' | sudo bash

Install via apt:

bash
sudo apt install tenv
RedHat

Installation via Cloudsmith Artifact Management platform.

Setup Cloudsmith repository automatically:

bash
curl -1sLf 'https://dl.cloudsmith.io/public/tofuutils/tenv/cfg/setup/bash.rpm.sh' | sudo bash

Install via yum:

bash
sudo yum install tenv
NixOS

nix-env

bash
nix-env -iA nixos.tenv

NixOS Configuration

Add the following Nix code to your NixOS Configuration, usually located in /etc/nixos/configuration.nix

bash
environment.systemPackages = [
    pkgs.tenv
  ];

nix-shell

bash
nix-shell -p tenv

Manual Installation

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

Docker Installation

You can use dockerized version of tenv via the following command:

bash
docker run -it --rm tofuutils/tenv:latest help

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

Install shell completion

[!NOTE] If you install tenv via Brew, MacPorts, or Nix, completion will be installed automatically.

zsh
bash
tenv completion zsh > ~/.tenv.completion.zsh
echo "source \$HOME/.tenv.completion.zsh" >> ~/.zshrc
Oh My Zsh
bash
tenv completion zsh > ~/.oh-my-zsh/completions/_tenv

Make sure the completions folder ~/.oh-my-zsh/completions is listed under $fpath:

bash
print -l $fpath
powershell
bash
tenv completion powershell | Out-String | Invoke-Expression
bash
bash
tenv completion bash > ~/.tenv.completion.bash
echo "source \$HOME/.tenv.completion.bash" >> ~/.bashrc
fish
bash
tenv completion fish > ~/.tenv.completion.fish
echo "source \$HOME/.tenv.completion.fish" >> ~/.config/fish/config.fish

Usage

tenv 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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gogohacktoberfesthacktoberfest2024hacktoberfest2025

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库