{"id":15219230,"url":"https://github.com/Clivern/Goenv","last_synced_at":"2025-10-03T11:32:09.399Z","repository":{"id":45456538,"uuid":"123338033","full_name":"Clivern/Goenv","owner":"Clivern","description":"🐺 Manage Your Applications Go Environment.","archived":false,"fork":false,"pushed_at":"2025-09-18T00:05:35.000Z","size":5075,"stargazers_count":37,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-22T08:59:34.094Z","etag":null,"topics":["clivern","go-env","goenv","rbenv"],"latest_commit_sha":null,"homepage":"","language":"Go","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/Clivern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"custom":"clivern.com/sponsor/"}},"created_at":"2018-02-28T20:22:34.000Z","updated_at":"2025-09-10T20:17:33.000Z","dependencies_parsed_at":"2023-10-03T01:35:14.723Z","dependency_job_id":"0a360f45-2182-4101-b149-d19c09069c77","html_url":"https://github.com/Clivern/Goenv","commit_stats":null,"previous_names":["spacewalkio/goenv","norwik/goenv","clevenio/goenv","clivern/goenv"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/Clivern/Goenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FGoenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FGoenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FGoenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FGoenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clivern","download_url":"https://codeload.github.com/Clivern/Goenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clivern%2FGoenv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278151740,"owners_count":25938711,"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","status":"online","status_checked_at":"2025-10-03T02:00:06.070Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["clivern","go-env","goenv","rbenv"],"created_at":"2024-09-28T13:01:00.277Z","updated_at":"2025-10-03T11:32:09.392Z","avatar_url":"https://github.com/Clivern.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg alt=\"Goenv Logo\" src=\"/static/logo.png?v=1.19.0\" width=\"200\" /\u003e\n    \u003ch3 align=\"center\"\u003eGoenv\u003c/h3\u003e\n    \u003cp align=\"center\"\u003eManage Your Applications Go Environment\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://github.com/clivern/Goenv/actions/workflows/build.yml\"\u003e\n            \u003cimg src=\"https://github.com/clivern/Goenv/actions/workflows/build.yml/badge.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/clivern/Goenv/releases\"\u003e\n            \u003cimg src=\"https://img.shields.io/badge/Version-v1.19.0-red.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://goreportcard.com/report/github.com/clivern/Goenv\"\u003e\n            \u003cimg src=\"https://goreportcard.com/badge/github.com/clivern/Goenv?v=1.19.0\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://godoc.org/github.com/clivern/goenv\"\u003e\n            \u003cimg src=\"https://godoc.org/github.com/clivern/goenv?status.svg\"\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/clivern/Goenv/blob/main/LICENSE\"\u003e\n            \u003cimg src=\"https://img.shields.io/badge/LICENSE-MIT-orange.svg\"\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.youtube.com/watch?v=nC344VXoFs4\" target=\"_blank\"\u003e\n        \u003cimg src=\"/static/screenshot-1.png\" width=\"95%\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nGoenv helps you to work with multiple `golang` versions at the same time whether on mac or linux operating system. It supports both global and per-application version configuration.\n\n\n## Usage\n\nDownload [the latest `goenv` binary](https://github.com/clivern/Goenv/releases). Make it executable from everywhere.\n\n```zsh\n$ export GOENV_LATEST_VERSION=$(curl --silent \"https://api.github.com/repos/clivern/Goenv/releases/latest\" | jq '.tag_name' | sed -E 's/.*\"([^\"]+)\".*/\\1/' | tr -d v)\n\n# For Linux\n$ curl -sL https://github.com/clivern/Goenv/releases/download/v{$GOENV_LATEST_VERSION}/goenv_Linux_x86_64.tar.gz | tar xz\n\n# For Mac (Arm M chips)\n$ curl -sL https://github.com/clivern/Goenv/releases/download/v{$GOENV_LATEST_VERSION}/goenv_Darwin_arm64.tar.gz | tar xz\n\n\n# For Mac (Intel)\n$ curl -sL https://github.com/clivern/Goenv/releases/download/v{$GOENV_LATEST_VERSION}/goenv_Darwin_x86_64.tar.gz | tar xz\n```\n\nConfigure the goenv using the following command\n\n```zsh\n$ goenv config\n```\n\nAdd `goenv` shims to `PATH` using the following command. also append it to `~/.profile` file to make it permanent.\n\n```zsh\n$ export PATH=\"$HOME/.goenv/shims:\"$PATH\n\n# OR\n\n$ eval \"$(goenv init)\"\n```\n\nFind an installable `go` version\n\n```zsh\n$ goenv ls-remote\n```\n\nInstall a new `go` version `1.18` and set as a global\n\n```zsh\n$ goenv install 1.18\n$ goenv global 1.18\n```\n\nTo configure a local version different from the global\n\n```zsh\n$ goenv local 1.18\n```\n\nTo Uninstall a version\n\n```zsh\n$ goenv uninstall 1.18\n```\n\nShow the used version either from current directory or parent directories or the global version.\n\n```zsh\n$ goenv version\n```\n\nTo list all installed versions\n\n```zsh\n$ goenv versions\n```\n\nfor a list of all available commands\n\n```zsh\n$ goenv --help\n\n🐺 Manage Your Applications Go Environment.\n\nIf you have any suggestions, bug reports, or annoyances please report\nthem to our issue tracker at \u003chttps://github.com/clivern/goenv/issues\u003e\n\nUsage:\n  goenv [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  config      Configure the goenv application.\n  exec        Show the current go version.\n  global      Set or show the global go version.\n  help        Help about any command\n  info        Print the goenv version\n  init        Init the import path for goenv shims.\n  install     Install a go version.\n  license     Print the license\n  ls-remote   List installable go versions.\n  local       Set or show the local application-specific go version.\n  rehash      Refresh binaries under goenv shim directory.\n  satisfy     Satisfy the current directry go version.\n  uninstall   Uninstall a specific go version.\n  version     Show the current go version.\n  versions    List installed go versions.\n\nFlags:\n  -h, --help   help for goenv\n\nUse \"goenv [command] --help\" for more information about a command.\n```\n\n\n## Under The Hood\n\nGoenv is inspired by and works like `rbenv`. At a high level, `goenv` intercepts `Go` commands using `shim` executables injected into your `PATH`, determines which Go version has been specified by your application or globally, and passes your commands to the correct `Go` installation `bin` folder.\n\n**Understanding PATH**\n\nWhen you run a command like `go` or `gofmt`, your operating system searches through a list of directories to find an executable file with that name. This list of directories lives in an environment variable called `PATH`, with each directory in the list separated by a colon:\n\n```\n/usr/local/bin:/usr/bin:/bin\n```\n\nDirectories in `PATH` are searched from left to right, so a matching executable in a directory at the beginning of the list takes precedence over another one at the end. In this example, the `/usr/local/bin` directory will be searched first, then `/usr/bin`, then `/bin`.\n\n**Understanding Shims**\n\n`goenv` works by inserting a directory of shims at the front of your `PATH`:\n\n```zsh\n~/.goenv/shims:/usr/local/bin:/usr/bin:/bin\n```\n\nThrough a process called rehashing, `goenv` maintains shims in that directory to match every `Go` command across every installed version of `go` like `gofmt` and so on.\n\n`shims` are lightweight executables that simply pass your command to the right binary under the current go version, your operating system will do the following:\n\n1. Search your `PATH` for an executable file named `gofmt`.\n2. Find the goenv shim named `gofmt` at the beginning of your `PATH`\n3. Run the shim named `gofmt`, which in turn fetch the target go version and use the `gofmt` inside `go/bin` directory.\n\n**Choosing the Go Version**\n\nWhen you execute a shim, `goenv` determines which Go version to use by reading it from the following sources, in this order:\n\n1. The first `.go-version `file found by searching the current working directory and each of its parent directories until reaching the root of your filesystem. You can modify the `.go-version` file in the current working directory with the `goenv local x.x.x` command.\n2. The global `$HOME/.goenv/.go-version` file. You can modify this file using the `goenv global x.x.x` command.\n\n\n## Versioning\n\nFor transparency into our release cycle and in striving to maintain backward compatibility, Goenv is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.\n\nSee the [Releases section of our GitHub project](https://github.com/clivern/goenv/releases) for changelogs for each release version of Goenv. It contains summaries of the most noteworthy changes made in each release. Also see the [Milestones section](https://github.com/clivern/goenv/milestones) for the future roadmap.\n\n\n## Bug tracker\n\nIf you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/goenv/issues\n\n\n## Security Issues\n\nIf you discover a security vulnerability within Goenv, please send an email to [hello@clivern.com](mailto:hello@clivern.com)\n\n\n## Contributing\n\nWe are an open source, community-driven project so please feel free to join us. see the [contributing guidelines](CONTRIBUTING.md) for more details.\n\n\n## License\n\n© 2022, Clivern. Released under [MIT License](https://opensource.org/licenses/mit-license.php).\n\n**Goenv** is authored and maintained by [@clivern](http://github.com/clivern).\n","funding_links":["clivern.com/sponsor/"],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClivern%2FGoenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FClivern%2FGoenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClivern%2FGoenv/lists"}