{"id":13515441,"url":"https://github.com/ASleepyCat/tfswitcher","last_synced_at":"2025-03-31T04:37:02.576Z","repository":{"id":180730760,"uuid":"632345401","full_name":"ASleepyCat/tfswitcher","owner":"ASleepyCat","description":"Terraform and OpenTofu version switcher written in Rust","archived":false,"fork":false,"pushed_at":"2025-03-10T05:14:01.000Z","size":602,"stargazers_count":3,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T01:49:33.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ASleepyCat.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-04-25T08:08:06.000Z","updated_at":"2025-02-24T13:22:46.000Z","dependencies_parsed_at":"2023-09-24T16:52:32.771Z","dependency_job_id":"e98106bb-618d-462e-bbbb-ab5fd0947ed7","html_url":"https://github.com/ASleepyCat/tfswitcher","commit_stats":null,"previous_names":["asleepycat/tfswitcher"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASleepyCat%2Ftfswitcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASleepyCat%2Ftfswitcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASleepyCat%2Ftfswitcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ASleepyCat%2Ftfswitcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ASleepyCat","download_url":"https://codeload.github.com/ASleepyCat/tfswitcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246418657,"owners_count":20773934,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T05:01:11.379Z","updated_at":"2025-03-31T04:37:02.558Z","avatar_url":"https://github.com/ASleepyCat.png","language":"Rust","funding_links":[],"categories":["Tools"],"sub_categories":["Environment managers"],"readme":"# tfswitcher\n\nTerraform and OpenTofu version switcher written in Rust.\n\n## Installation\n\n### Homebrew\n\nTo install via Homebrew, run:\n\n```bash\nbrew install asleepycat/tap/tfswitcher\n```\n\nThis will build from source.\n\n### Cargo\n\nTo install with `cargo`, run:\n\n```bash\ncargo install tfswitcher\n```\n\nThere are also prebuilt binaries available with each release for Linux, macOS and Windows.\n\n## Usage\n\nTo see available flags and arguments, run `tfswitcher -h` or `tfswitcher --help`.\n\nYou can also use a configuration file to automatically set certain flags or arguments. Simply place a file\ncalled `.tfswitch.toml` either in your current working directory or in your `$HOME` directory.\n\n```toml\nbin = \"$HOME/.local/bin/terraform\"\nlist_all = false\nopentofu = false\nforce_remove = false\nsilent = false\nverbose = false\nversion = \"1.0.0\"\n```\n\n## Shell Completions\n\n`tfswitcher` can generate tab-completion scripts for your desired shell. To see which shells are supported, see\nthe `--help` text.\n\nFor example, for Bash:\n\n```bash\ntfswitcher -c bash \u003e\u003e ~/.local/share/bash-completion/completions/tfswitcher\n```\n\nAlternatively, you can source the tab-completion script inside your shell's start up script:\n\n```bash\necho \"source \u003c(tfswitcher -c bash)\" \u003e\u003e ~/.bashrc\n```\n\n## Caveats\n\nThis has not been tested on macOS, so YMMV.\n\n## Where's `v0.1.0`?\n\n`v0.1.0` used FFI with Cgo in order to use\nHashiCorp's [`terraform-config-inspect`](https://github.com/hashicorp/terraform-config-inspect) library.\nThis was inadvertently published as the Windows and macOS builds were broken and is yanked.\n\n`v0.2.0` replaced the Go library with a partially-reimplemented Rust library to eliminate FFI and makes building for\nWindows and macOS a lot less painful.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FASleepyCat%2Ftfswitcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FASleepyCat%2Ftfswitcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FASleepyCat%2Ftfswitcher/lists"}