small pixel drawing of a pufferfish chtf

621c1d51
making spacing more a e s t h e t i c
Jes Olson j3s@c3f.net
Tue, 27 Dec 2022 14:45:43 -0800
1ac1d3f5
minor simplifications
Jes Olson j3s@c3f.net
Sun, 17 Jul 2022 11:25:06 -0500
5422426a
Misc cleanup
Jes Olson j3s@c3f.net
Sun, 17 Jul 2022 11:14:17 -0500
         `~* 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
    0.11.1
    0.12.1*

  # switch to a different installed version
    $ chtf 0.11.1
    $ chtf
    0.11.1*
    0.12.1
    $ ~/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
git clone https://git.j3s.sh/chtf