`~* chtf *~`

chtf is a ~30 line posix shell script that manages terraform versions.

i made it because existing solutions seemed way too big for what i thought was a simple problem.

  ??? deps+install ???

to install chtf, just put it anywhere in your $PATH. i recommend ~/bin

you'll need these deps: - curl - unzip

you'll also need ~/bin in your $PATH near the beginning somewhere, since chtf relies on symlinking ~/bin/terraform to the proper version.

   !!! demo !!!

here's a full demo of chtf's capabilities:

list versions (* represents active)

$ chtf

switch to a different installed version

$ chtf 0.11.1
$ chtf
$ ~/bin/terraform version
Terraform v0.11.1

download a new version and make it active

$ chtf 1.2.5
terraform version not found
downloading https://releases.hashicorp.com/terraform/1.2.5/terraform_1.2.5_linux_amd64.zip
$ ~/bin/terraform version
Terraform v1.2.5
on linux_amd64

todo: - [ ] add arm support - [ ] add auto-switching based on .terraform-version file - [ ] add refuse to run if doesn't match .terraform-version file

clone url:
git clone https://git.j3s.sh/git/chtf