id = "tfenv" name = "tfenv" homepage = "https://github.com/tfutils/tfenv" description = "Terraform version manager inspired by rbenv." executables = ["tfenv"] [dotfiles] # README, ".terraform-version file": "If you put a .terraform-version file on # your project root, or in your home directory, tfenv detects it and uses the # version written in it." lib/tfenv-version-file.sh does exactly that — # `find_local_version_file "${TFENV_DIR:-${PWD}}"` first, then # `find_local_version_file "${HOME:-/}"`, each walking up looking for # .terraform-version. The one in a project root belongs to that repository; # the one in the home directory is the user's default. paths = ["~/.terraform-version"] # The other version file, ${TFENV_CONFIG_DIR}/version, is not listed because # it is not home-relative: lib/helpers.sh sets TFENV_CONFIG_DIR to TFENV_ROOT, # and bin/tfenv derives TFENV_ROOT from where the script itself lives — so it # is ~/.tfenv only for the README's `git clone … ~/.tfenv` install and sits # under the Cellar for a Homebrew one. There is no fixed spelling for it to # name, and nothing else tfenv writes under the home directory. exclude = [] secret = [] # One line naming a Terraform version, read once per invocation by a shell # script; nothing holds it open. side_effect = false # No machine_lines: the file holds a single version string, and wanting the # same Terraform everywhere is why the user wrote it. A machine that does not # have that version installed will fetch it — TFENV_AUTO_INSTALL defaults to # true. [commands] format = 1 label = "tfenv versions" description = "Install and switch Terraform versions." quality = "ai-draft" base = "fig:tfenv" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand]] path = ["install"] label = "Install version" description = "Install a Terraform version (latest, min-required or a number)." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Version" type = "string" position = 0 suggestions = [{ value = "latest", label = "Latest" }, { value = "min-required", label = "Minimum required by config" }] sources = ["fig"] [[commands.subcommand.task]] id = "install" label = "Install" fields = ["version"] required = ["version"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version"] [[commands.subcommand]] path = ["use"] label = "Use version" description = "Switch to an installed version." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Version" type = "string" position = 0 sources = ["fig"] [[commands.subcommand.task]] id = "use" label = "Use" fields = ["version"] required = ["version"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version"] [[commands.subcommand]] path = ["uninstall"] label = "Uninstall version" description = "Uninstall a version." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand.field]] id = "version" label = "Version" type = "string" position = 0 effect = "delete" sources = ["fig"] [[commands.subcommand.task]] id = "uninstall" label = "Uninstall" fields = ["version"] required = ["version"] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["version"] [[commands.subcommand]] path = ["list"] label = "List installed" description = "List installed versions." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand.group]] id = "basic" label = "Basic" fields = [] [[commands.subcommand]] path = ["list-remote"] label = "List installable" description = "List installable versions." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/tfenv.ts" license = "MIT" [[commands.subcommand.group]] id = "basic" label = "Basic" fields = []