{"id":13484863,"url":"https://github.com/tfutils/tfenv","last_synced_at":"2026-05-18T20:04:27.880Z","repository":{"id":37412796,"uuid":"64857500","full_name":"tfutils/tfenv","owner":"tfutils","description":"Terraform version manager","archived":false,"fork":false,"pushed_at":"2026-05-01T20:56:20.000Z","size":788,"stargazers_count":4919,"open_issues_count":24,"forks_count":470,"subscribers_count":42,"default_branch":"master","last_synced_at":"2026-05-06T00:13:25.346Z","etag":null,"topics":["bash","terraform"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tfutils.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-08-03T15:33:29.000Z","updated_at":"2026-05-04T06:58:48.000Z","dependencies_parsed_at":"2023-02-10T01:00:23.395Z","dependency_job_id":"1d1528a8-b54a-4afd-a85b-6355d1ba8711","html_url":"https://github.com/tfutils/tfenv","commit_stats":{"total_commits":341,"total_committers":91,"mean_commits":"3.7472527472527473","dds":0.7302052785923754,"last_synced_commit":"39d8c27ad9862ffdec57989b66fd2720cb72e76c"},"previous_names":["kamatama41/tfenv"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/tfutils/tfenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfutils%2Ftfenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfutils%2Ftfenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfutils%2Ftfenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfutils%2Ftfenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tfutils","download_url":"https://codeload.github.com/tfutils/tfenv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tfutils%2Ftfenv/sbom","scorecard":{"id":875971,"data":{"date":"2025-08-11","repo":{"name":"github.com/tfutils/tfenv","commit":"c8eb402135bf6fbcd2809f6cdbf7ea1113de6e54"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.7,"checks":[{"name":"Code-Review","score":5,"reason":"Found 7/13 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"20 commit(s) and 22 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/tfutils/tfenv/test.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/test.yml:15"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":1,"reason":"SAST tool is not run on all commits -- score normalized to 1","details":["Warn: 5 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T06:00:18.263Z","repository_id":37412796,"created_at":"2025-08-24T06:00:18.263Z","updated_at":"2025-08-24T06:00:18.263Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33189279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","terraform"],"created_at":"2024-07-31T17:01:36.869Z","updated_at":"2026-05-18T20:04:27.874Z","avatar_url":"https://github.com/tfutils.png","language":"Shell","funding_links":[],"categories":["Productivity Tools","Shell","Tools","Infrastructure as Code","Version Managers","Dependency management","bash","List of \\*env-, ch\\*- and \\*vm- style version managers"],"sub_categories":["Miscellaneous","Terraform Tooling","Terraform","Community providers","Shell into containers"],"readme":"[![CI Test](https://github.com/tfutils/tfenv/actions/workflows/test.yml/badge.svg)](https://github.com/tfutils/tfenv/actions/workflows/test.yml)\n[![GitHub release](https://img.shields.io/github/v/release/tfutils/tfenv)](https://github.com/tfutils/tfenv/releases/latest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\n# tfenv\n\n[Terraform](https://www.terraform.io/) version manager inspired by [rbenv](https://github.com/rbenv/rbenv)\n\n---\n\n## Table of Contents\n\n- [Supported Platforms](#supported-platforms)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [tfenv install](#tfenv-install-version)\n  - [tfenv use](#tfenv-use-version)\n  - [tfenv uninstall](#tfenv-uninstall-version)\n  - [tfenv list](#tfenv-list)\n  - [tfenv list-remote](#tfenv-list-remote)\n  - [tfenv pin](#tfenv-pin)\n- [Environment Variables](#environment-variables)\n- [.terraform-version File](#terraform-version-file)\n- [Upgrading](#upgrading)\n- [Uninstalling](#uninstalling)\n- [Contributing](#contributing)\n- [Security](#security)\n- [License](#license)\n\n---\n\n## Supported Platforms\n\n- macOS\n  - 64bit\n  - Arm (Apple Silicon)\n- Linux\n  - 64bit\n  - Arm\n- Windows (64bit) - tested in git-bash. Ensure `core.symlinks` is enabled (`git config --global core.symlinks true`)\n\n## Installation\n\n### Automatic\n\nInstall via Homebrew\n\n```console\nbrew install tfenv\n```\n\nInstall via Arch User Repository (AUR)\n   \n```console\nyay --sync tfenv\n```\n\nInstall via puppet\n\nUsing puppet module [sergk-tfenv](https://github.com/SergK/puppet-tfenv)\n\n```puppet\ninclude ::tfenv\n```\n\n### Manual\n\n1. Check out tfenv into any path (here is `${HOME}/.tfenv`)\n\n```console\ngit clone --depth=1 https://github.com/tfutils/tfenv.git ~/.tfenv\n```\n\n2. Add `~/.tfenv/bin` to your `$PATH` any way you like\n\nbash:\n```console\necho 'export PATH=\"$HOME/.tfenv/bin:$PATH\"' \u003e\u003e ~/.bash_profile\n```\n\nzsh:\n```console\necho 'export PATH=\"$HOME/.tfenv/bin:$PATH\"' \u003e\u003e ~/.zprofile\n```\n\nfish:\n```console\necho 'set -x PATH $HOME/.tfenv/bin $PATH' \u003e\u003e ~/.config/fish/config.fish\n```\n\nFor WSL users:\n```bash\necho 'export PATH=$PATH:$HOME/.tfenv/bin' \u003e\u003e ~/.bashrc\n```\n\n  OR you can make symlinks for `tfenv/bin/*` scripts into a path that is already added to your `$PATH` (e.g. `/usr/local/bin`) `OSX/Linux Only!`\n\n```console\nln -s ~/.tfenv/bin/* /usr/local/bin\n```\n\n  On Ubuntu/Debian touching `/usr/local/bin` might require sudo access, but you can create `${HOME}/bin` or `${HOME}/.local/bin` and on next login it will get added to the session `$PATH`\n  or by running `. ${HOME}/.profile` it will get added to the current shell session's `$PATH`.\n\n```console\nmkdir -p ~/.local/bin/\n. ~/.profile\nln -s ~/.tfenv/bin/* ~/.local/bin\nwhich tfenv\n```\n\n## Usage\n\n### tfenv install [version]\n\nInstall a specific version of Terraform.\n\nIf no parameter is passed, the version to use is resolved automatically via [TFENV\\_TERRAFORM\\_VERSION environment variable](#tfenv_terraform_version) or [.terraform-version files](#terraform-version-file), in that order of precedence, i.e. TFENV\\_TERRAFORM\\_VERSION, then .terraform-version. The default is 'latest' if none are found.\n\nIf a parameter is passed, available options:\n\n- `x.y.z` [Semver 2.0.0](https://semver.org/) string specifying the exact version to install\n- `latest` is a syntax to install latest version\n- `latest:\u003cregex\u003e` is a syntax to install latest version matching regex (used by grep -e)\n- `latest-allowed` is a syntax to scan your Terraform files to detect which version is maximally allowed.\n- `min-required` is a syntax to scan your Terraform files to detect which version is minimally required.\n\nSee [required_version](https://developer.hashicorp.com/terraform/language/settings) docs. Also [see min-required \u0026 latest-allowed](#min-required) section below.\n\n```console\n$ tfenv install\n$ tfenv install 0.7.0\n$ tfenv install latest\n$ tfenv install latest:^0.8\n$ tfenv install latest-allowed\n$ tfenv install min-required\n```\n\nIf `shasum` is present in the path, tfenv will verify the download against Hashicorp's published sha256 hash.\nIf [keybase](https://keybase.io/) is available in the path it will also verify the signature for those published hashes using Hashicorp's published public key.\n\nYou can opt-in to using GnuPG tools for PGP signature verification if keybase is not available:\n\nWhere `TFENV_INSTALL_DIR` is for example, `~/.tfenv` or `/usr/local/Cellar/tfenv/\u003cversion\u003e`\n\n```console\necho 'trust-tfenv: yes' \u003e ${TFENV_INSTALL_DIR}/use-gpgv\ntfenv install\n```\n\nThe `trust-tfenv` directive means that verification uses a copy of the\nHashicorp OpenPGP key found in the tfenv repository. Skipping that directive\nmeans that the Hashicorp key must be in the existing default trusted keys.\nUse the file `${TFENV_INSTALL_DIR}/use-gnupg` to instead invoke the full `gpg` tool and\nsee web-of-trust status; beware that a lack of trust path will not cause a\nvalidation failure.\n\n#### .terraform-version\n\nIf you use a [.terraform-version](#terraform-version-file) file, `tfenv install` (no argument) will install the version written in it.\n\n\u003ca name=\"min-required\"\u003e\u003c/a\u003e\n#### min-required \u0026 latest-allowed\n\nPlease note that we don't do semantic version range parsing but use first ever found version as the candidate for minimally required one. It is up to the user to keep the definition reasonable. I.e.\n\n```terraform\n// this will detect 0.12.3\nterraform {\n  required_version  = \"\u003c0.12.3, \u003e= 0.10.0\"\n}\n```\n\n```terraform\n// this will detect 0.10.8 (the latest 0.10.x release)\nterraform {\n  required_version  = \"~\u003e 0.10.0, \u003c0.12.3\"\n}\n```\n\n##### Supported `latest-allowed` constraint operators\n\n`latest-allowed` reads the first `required_version` value from your `.tf` files and resolves\nthe latest installable version. Only the first constraint before any comma is evaluated.\n\n| Constraint | Behaviour | Example | Resolves to |\n|------------|-----------|---------|-------------|\n| `\u003e` or `\u003e=` | Installs the latest available version | `\"\u003e= 1.0.0\"` | latest |\n| `\u003c=` | Installs that exact version | `\"\u003c= 1.2.3\"` | `1.2.3` |\n| `~\u003e` | Installs the latest version matching the prefix | `\"~\u003e 1.2.0\"` | latest `1.2.x` |\n| `=` or bare version | Installs that exact version | `\"0.12.31\"` or `\"= 0.12.31\"` | `0.12.31` |\n\n### Environment Variables\n\n#### TFENV\n\n##### `TFENV_ARCH`\n\nString (Default: `amd64`)\n\nSpecify architecture. Architecture other than the default amd64 can be specified with the `TFENV_ARCH` environment variable\n\nNote: Default changes to `arm64` for versions that have arm64 builds available when `$(uname -m)` matches `aarch64* | arm64*`\n\n```console\nTFENV_ARCH=arm64 tfenv install 0.7.9\n```\n\n##### `TFENV_AUTO_INSTALL`\n\nString (Default: true)\n\nShould tfenv automatically install terraform if the version specified by defaults or a .terraform-version file is not currently installed.\n\n```console\nTFENV_AUTO_INSTALL=false terraform plan\n```\n\n```console\nterraform use \u003cversion that is not yet installed\u003e\n```\n\n##### `TFENV_CURL_OUTPUT`\n\nInteger (Default: 2)\n\nSet the mechanism used for displaying download progress when downloading terraform versions from the remote server.\n\n* 2: v1 Behaviour: Pass `-#` to curl\n* 1: Use curl default\n* 0: Pass `-s` to curl\n\n##### `TFENV_DEBUG`\n\nInteger (Default: 0)\n\nSet the debug level for TFENV.\n\n* 0: No debug output\n* 1: Simple debug output\n* 2: Extended debug output, with source file names and interactive debug shells on error\n* 3: Debug level 2 + Bash execution tracing\n\n##### `TFENV_REMOTE`\n\nString (Default: https://releases.hashicorp.com)\n\nTo install from a remote other than the default\n\n```console\nTFENV_REMOTE=https://example.jfrog.io/artifactory/hashicorp\n```\n\n##### `TFENV_REVERSE_REMOTE`\n\nInteger (Default: 0)\n\nWhen using a custom remote, such as Artifactory, instead of the Hashicorp servers,\nthe list of terraform versions returned by the curl of the remote directory may be inverted.\nIn this case the `latest` functionality will not work as expected because it expects the\nversions to be listed in order of release date from newest to oldest. If your remote\nis instead providing a list that is oldes-first, set `TFENV_REVERSE_REMOTE=1` and\nfunctionality will be restored.\n\n```console\nTFENV_REVERSE_REMOTE=1 tfenv list-remote\n```\n\n##### `TFENV_SKIP_REMOTE_CHECK`\n\nInteger (Default: 0)\n\nWhen using a custom remote, such as Artifactory, lazy caching may be used meaning the versions\nreturned by the remote aren't the full list available (more can be pulled on demand). This option \ndisables the pre-install validation and will blindly pull the requested version from the remote. When\nusing `latest` as the specified version, this will still rely on the latest version returned from the\nconfigured remote.\n\n```console\nTFENV_SKIP_REMOTE_CHECK=1 tfenv install 1.14.5\n```\n\n##### `TFENV_SORT_VERSIONS_REMOTE`\n\nInteger (Default: 0)\n\nWhen using a custom remote, such as Artifactory, the list of versions may be sorted\nalphabetically rather than by version number. This causes `1.0.10` to appear between\n`1.0.1` and `1.0.2`, breaking `latest` and version matching.\n\nSet `TFENV_SORT_VERSIONS_REMOTE=1` to apply version-aware sorting to the remote list.\n\n```console\nTFENV_SORT_VERSIONS_REMOTE=1 tfenv list-remote\n```\n\n##### `TFENV_CONFIG_DIR`\n\nPath (Default: `$TFENV_ROOT`)\n\nThe path to a directory where the local terraform versions and configuration files exist.\n\n```console\nTFENV_CONFIG_DIR=\"$XDG_CONFIG_HOME/tfenv\"\n```\n\n##### `TFENV_TERRAFORM_VERSION`\n\nString (Default: \"\")\n\nIf not empty string, this variable overrides Terraform version, specified in [.terraform-version files](#terraform-version-file).\n`latest` and `latest:\u003cregex\u003e` syntax are also supported.\n[`tfenv install`](#tfenv-install-version) and [`tfenv use`](#tfenv-use-version) command also respects this variable.\n\ne.g.\n\n```console\nTFENV_TERRAFORM_VERSION=latest:^0.11. terraform --version\n```\n\n##### `TFENV_NETRC_PATH`\n\nString (Default: \"\")\n\nIf not empty string, this variable specifies the credentials file used to access the remote location (useful if used in conjunction with TFENV_REMOTE).\n\ne.g.\n\n```console\nTFENV_NETRC_PATH=\"$PWD/.netrc.tfenv\"\n```\n\n#### Bashlog Logging Library\n\n##### `BASHLOG_COLOURS`\n\nInteger (Default: 1)\n\nTo disable colouring of console output, set to 0.\n\n\n##### `BASHLOG_DATE_FORMAT`\n\nString (Default: +%F %T)\n\nThe display format for the date as passed to the `date` binary to generate a datestamp used as a prefix to:\n\n* `FILE` type log file lines.\n* Each console output line when `BASHLOG_EXTRA=1`\n\n##### `BASHLOG_EXTRA`\n\nInteger (Default: 0)\n\nBy default, console output from tfenv does not print a date stamp or log severity.\n\nTo enable this functionality, making normal output equivalent to FILE log output, set to 1.\n\n##### `BASHLOG_FILE`\n\nInteger (Default: 0)\n\nSet to 1 to enable plain text logging to file (FILE type logging).\n\nThe default path for log files is defined by /tmp/$(basename $0).log\nEach executable logs to its own file.\n\ne.g.\n\n```console\nBASHLOG_FILE=1 tfenv use latest\n```\n\nwill log to `/tmp/tfenv-use.log`\n\n##### `BASHLOG_FILE_PATH`\n\nString (Default: /tmp/$(basename ${0}).log)\n\nTo specify a single file as the target for all FILE type logging regardless of the executing script.\n\n##### `BASHLOG_I_PROMISE_TO_BE_CAREFUL_CUSTOM_EVAL_PREFIX`\n\nString (Default: \"\")\n\n*BE CAREFUL - MISUSE WILL DESTROY EVERYTHING YOU EVER LOVED*\n\nThis variable allows you to pass a string containing a command that will be executed using `eval` in order to produce a prefix to each console output line, and each FILE type log entry.\n\ne.g.\n\n```console\nBASHLOG_I_PROMISE_TO_BE_CAREFUL_CUSTOM_EVAL_PREFIX='echo \"${$$} \"'\n```\nwill prefix every log line with the calling process' PID.\n\n##### `BASHLOG_JSON`\n\nInteger (Default: 0)\n\nSet to 1 to enable JSON logging to file (JSON type logging).\n\nThe default path for log files is defined by /tmp/$(basename $0).log.json\nEach executable logs to its own file.\n\ne.g.\n\n```console\nBASHLOG_JSON=1 tfenv use latest\n```\n\nwill log in JSON format to `/tmp/tfenv-use.log.json`\n\nJSON log content:\n\n`{\"timestamp\":\"\u003cdate +%s\u003e\",\"level\":\"\u003clog-level\u003e\",\"message\":\"\u003clog-content\u003e\"}`\n\n##### `BASHLOG_JSON_PATH`\n\nString (Default: /tmp/$(basename ${0}).log.json)\n\nTo specify a single file as the target for all JSON type logging regardless of the executing script.\n\n##### `BASHLOG_SYSLOG`\n\nInteger (Default: 0)\n\nTo log to syslog using the `logger` binary, set this to 1.\n\nThe basic functionality is thus:\n\n```console\nlocal tag=\"${BASHLOG_SYSLOG_TAG:-$(basename \"${0}\")}\";\nlocal facility=\"${BASHLOG_SYSLOG_FACILITY:-local0}\";\nlocal pid=\"${$}\";\nlogger --id=\"${pid}\" -t \"${tag}\" -p \"${facility}.${severity}\" \"${syslog_line}\"\n```\n\n##### `BASHLOG_SYSLOG_FACILITY`\n\nString (Default: local0)\n\nThe syslog facility to specify when using SYSLOG type logging.\n\n##### `BASHLOG_SYSLOG_TAG`\n\nString (Default: $(basename $0))\n\nThe syslog tag to specify when using SYSLOG type logging.\n\nDefaults to the PID of the calling process.\n\n\n\n### tfenv use [version]\n\nSwitch a version to use\n\nIf no parameter is passed, the version to use is resolved automatically via [.terraform-version files](#terraform-version-file) or [TFENV\\_TERRAFORM\\_VERSION environment variable](#tfenv_terraform_version) (TFENV\\_TERRAFORM\\_VERSION takes precedence), defaulting to 'latest' if none are found.\n\n`latest` is a syntax to use the latest installed version\n\n`latest:\u003cregex\u003e` is a syntax to use latest installed version matching regex (used by grep -e)\n\n`min-required` will switch to the version minimally required by your terraform sources (see above `tfenv install`)\n\n```console\n$ tfenv use\n$ tfenv use min-required\n$ tfenv use 0.7.0\n$ tfenv use latest\n$ tfenv use latest:^0.8\n```\n\nNote: `tfenv use latest` or `tfenv use latest:\u003cregex\u003e` will find the latest matching version that is already installed. If no matching versions are installed, and TFENV_AUTO_INSTALL is set to `true` (which is the default) the the latest matching version in the remote repository will be installed and used.\n\n### tfenv uninstall \u0026lt;version\u003e\n\nUninstall a specific version of Terraform\n`latest` is a syntax to uninstall latest version\n`latest:\u003cregex\u003e` is a syntax to uninstall latest version matching regex (used by grep -e)\n\n```console\n$ tfenv uninstall 0.7.0\n$ tfenv uninstall latest\n$ tfenv uninstall latest:^0.8\n```\n\n### tfenv list\n\nList installed versions\n\n```console\n$ tfenv list\n* 0.10.7 (set by /opt/tfenv/version)\n  0.9.0-beta2\n  0.8.8\n  0.8.4\n  0.7.0\n  0.7.0-rc4\n  0.6.16\n  0.6.2\n  0.6.1\n```\n\n### tfenv list-remote\n\nList installable versions\n\n```console\n$ tfenv list-remote\n0.9.0-beta2\n0.9.0-beta1\n0.8.8\n0.8.7\n0.8.6\n0.8.5\n0.8.4\n0.8.3\n0.8.2\n0.8.1\n0.8.0\n0.8.0-rc3\n0.8.0-rc2\n0.8.0-rc1\n0.8.0-beta2\n0.8.0-beta1\n0.7.13\n0.7.12\n...\n```\n\n### tfenv pin\n\nWrite the currently-active Terraform version to a `.terraform-version` file\nin the current working directory. This is useful for pinning a project to a\nspecific version without manually creating the file.\n\n```console\n$ tfenv use 1.7.5\nSwitching default version to v1.7.5\nDefault version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 1.7.5\n\n$ tfenv pin\nPinned version by writing \"1.7.5\" to /path/to/project/.terraform-version\n```\n\n## .terraform-version file\n\nIf 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. If the version is `latest` or `latest:\u003cregex\u003e`, the latest matching version currently installed will be selected.\n\nNote, that [TFENV\\_TERRAFORM\\_VERSION environment variable](#tfenv_terraform_version) can be used to override version, specified by `.terraform-version` file.\n\n```console\n$ cat .terraform-version\n0.6.16\n\n$ terraform version\nTerraform v0.6.16\n\nYour version of Terraform is out of date! The latest version\nis 0.7.3. You can update by downloading from www.terraform.io\n\n$ echo 0.7.3 \u003e .terraform-version\n\n$ terraform version\nTerraform v0.7.3\n\n$ echo latest:^0.8 \u003e .terraform-version\n\n$ terraform version\nTerraform v0.8.8\n\n$ TFENV_TERRAFORM_VERSION=0.7.3 terraform --version\nTerraform v0.7.3\n```\n\n## Upgrading\n\n```console\ngit --git-dir=~/.tfenv/.git pull\n```\n\n## Uninstalling\n\n```console\nrm -rf /some/path/to/tfenv\n```\n\n## Contributing\n\nContributions are welcome. Please:\n\n1. Fork the repository\n2. Create a feature branch (`fix/description` or `feat/description`)\n3. Run the test suite: `./test/run.sh`\n4. Open a pull request against `master`\n\nSee [AGENTS.md](AGENTS.md) for detailed project conventions and coding standards.\n\n## Security\n\nTo report a vulnerability, please see [SECURITY.md](SECURITY.md). Do **not**\nopen a public issue for security concerns.\n\n## License\n\n- [tfenv itself](https://github.com/tfutils/tfenv/blob/master/LICENSE) — MIT\n- [rbenv](https://github.com/rbenv/rbenv/blob/master/LICENSE) — MIT\n  (tfenv partially uses rbenv's source code)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfutils%2Ftfenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftfutils%2Ftfenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftfutils%2Ftfenv/lists"}