warrensbox/terraform-switcher

A command line tool to switch between different versions of terraform (install with homebrew and more)

Go

1,488

1,285 commits

updated Oct 12, 2026

See the code

README

Build Status Super-Linter GitHub Release GitHub Downloads (all assets, all releases) GitHub Downloads (all assets, latest release) GitHub go.mod Go version Go Report Card GitHub contributors contributions welcome

Terraform Switcher

drawing

The tfswitch command-line tool lets you switch between different versions of Terraform.
If you do not have a particular version of Terraform installed, tfswitch will download and verify the version you desire.
The installation is minimal and easy.
Once installed, simply select the version you require from the dropdown and start using Terraform.

Documentation

Click here for our extended documentation.

NOTE

Going forward we will change the version identifier of tfswitch to align with the common go package versioning.
Please be advised to change any automated implementation you might have that is relying on the tfswitch version string.
Old version string: 0.1.2412
New version string: v1.0.0 Note the v that is preceding all version numbers.

Installation

tfswitch is available as a binary and on various package managers (eg. Homebrew).

Homebrew

For macOS or various Linux distributions, Homebrew offers the simplest installation process. If you do not have Homebrew installed, click here.

[!IMPORTANT] ⚠️ Homebrew on Linux (formerly referred to as Linuxbrew) requires at least Homebrew v5.0.6 (released Dec 16, 2025)

brew install tfswitch

[!NOTE] For users who want the latest release as soon as it is published, you can install tfswitch from our Homebrew tap:

brew install warrensbox/tap/tfswitch

The official Homebrew formula, brew install tfswitch, remains the recommended installation method for most users. The tap is mainly for users who want to get new releases before they are picked up by the main Homebrew repository.

Linux

Installation for Linux operating systems.

curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/master/install.sh | bash

Arch User Repository (AUR) packages for Arch Linux

# compiled from source
yay tfswitch

# precompiled
yay tfswitch-bin

Windows

Download and extract the Windows version of tfswitch that is compatible with your system.
We are building binaries for 386, amd64, arm6 and arm7 CPU structure.
See the release page for your download.

Install from source

Alternatively, you can build tfswitch from source by cloning the repository and running make tfswitch. The binary will be created in the build directory, or you can run make install to install it to ~/bin/ on supported platforms.
You can also download a pre-compiled binary directly from the releases page.

See our installation documentation for more details.

[!IMPORTANT] The version identifier of tfswitch has changed to align with the common go package versioning.

Version numbers will now be prefixed with a v - eg. v1.0.3.

Please change any automated implementations relying on the tfswitch version string.

Old version string: 0.1.2412
New version string: v1.0.3

Having trouble installing

Quick Start

Execute tfswitch and select the desired Terraform version via the dropdown menu.

Version on command line

Use tfswitch 1.7.0 to install Terraform version 1.7.0. Replace the version number as required.

More usage guide here

How to contribute

An open source project becomes meaningful when people collaborate to improve the code. Feel free to look at the code, critique and make suggestions. Let's make tfswitch better!

See step-by-step instructions on how to contribute here: Contribute

Additional Info

See how to upgrade and uninstall or troubleshoot

Issues

Please open issues here: New Issue

go
golang
terraform

warrensbox/terraform-switcher

A command line tool to switch between different versions of terraform (install with homebrew and more)

Go

1,488

1,285 commits

updated Oct 12, 2026

See the code

README

Build Status Super-Linter GitHub Release GitHub Downloads (all assets, all releases) GitHub Downloads (all assets, latest release) GitHub go.mod Go version Go Report Card GitHub contributors contributions welcome

Terraform Switcher

drawing

The tfswitch command-line tool lets you switch between different versions of Terraform.
If you do not have a particular version of Terraform installed, tfswitch will download and verify the version you desire.
The installation is minimal and easy.
Once installed, simply select the version you require from the dropdown and start using Terraform.

Documentation

Click here for our extended documentation.

NOTE

Going forward we will change the version identifier of tfswitch to align with the common go package versioning.
Please be advised to change any automated implementation you might have that is relying on the tfswitch version string.
Old version string: 0.1.2412
New version string: v1.0.0 Note the v that is preceding all version numbers.

Installation

tfswitch is available as a binary and on various package managers (eg. Homebrew).

Homebrew

For macOS or various Linux distributions, Homebrew offers the simplest installation process. If you do not have Homebrew installed, click here.

[!IMPORTANT] ⚠️ Homebrew on Linux (formerly referred to as Linuxbrew) requires at least Homebrew v5.0.6 (released Dec 16, 2025)

brew install tfswitch

[!NOTE] For users who want the latest release as soon as it is published, you can install tfswitch from our Homebrew tap:

brew install warrensbox/tap/tfswitch

The official Homebrew formula, brew install tfswitch, remains the recommended installation method for most users. The tap is mainly for users who want to get new releases before they are picked up by the main Homebrew repository.

Linux

Installation for Linux operating systems.

curl -L https://raw.githubusercontent.com/warrensbox/terraform-switcher/master/install.sh | bash

Arch User Repository (AUR) packages for Arch Linux

# compiled from source
yay tfswitch

# precompiled
yay tfswitch-bin

Windows

Download and extract the Windows version of tfswitch that is compatible with your system.
We are building binaries for 386, amd64, arm6 and arm7 CPU structure.
See the release page for your download.

Install from source

Alternatively, you can build tfswitch from source by cloning the repository and running make tfswitch. The binary will be created in the build directory, or you can run make install to install it to ~/bin/ on supported platforms.
You can also download a pre-compiled binary directly from the releases page.

See our installation documentation for more details.

[!IMPORTANT] The version identifier of tfswitch has changed to align with the common go package versioning.

Version numbers will now be prefixed with a v - eg. v1.0.3.

Please change any automated implementations relying on the tfswitch version string.

Old version string: 0.1.2412
New version string: v1.0.3

Having trouble installing

Quick Start

Execute tfswitch and select the desired Terraform version via the dropdown menu.

Version on command line

Use tfswitch 1.7.0 to install Terraform version 1.7.0. Replace the version number as required.

More usage guide here

How to contribute

An open source project becomes meaningful when people collaborate to improve the code. Feel free to look at the code, critique and make suggestions. Let's make tfswitch better!

See step-by-step instructions on how to contribute here: Contribute

Additional Info

See how to upgrade and uninstall or troubleshoot

Issues

Please open issues here: New Issue

go
golang
terraform

Project health

Overall

6.8/10

Maintained

10/10

Code review

10/10
OpenSSF Scorecard

Latest release

v1.20.0 · Sep 28, 2026

Releases this year

14

Significant stargazers

Simon Mo

1,147 followers · starred Feb 2021

RB

118 followers · starred Jan 2023

Josef Brandl

79 followers · starred Apr 2023

David Robakowski

76 followers · starred Dec 2019