{"id":21658454,"url":"https://github.com/twitchtv/retool","last_synced_at":"2025-07-17T21:31:04.598Z","repository":{"id":18648255,"uuid":"84830642","full_name":"twitchtv/retool","owner":"twitchtv","description":"Vendoring for executables written in Go","archived":true,"fork":false,"pushed_at":"2022-03-04T20:03:13.000Z","size":420,"stargazers_count":416,"open_issues_count":13,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-22T06:35:43.279Z","etag":null,"topics":["code-generation","go","package-management","vendoring"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twitchtv.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}},"created_at":"2017-03-13T13:38:45.000Z","updated_at":"2024-10-18T19:27:26.000Z","dependencies_parsed_at":"2022-07-26T23:32:06.290Z","dependency_job_id":null,"html_url":"https://github.com/twitchtv/retool","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitchtv%2Fretool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitchtv%2Fretool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitchtv%2Fretool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twitchtv%2Fretool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twitchtv","download_url":"https://codeload.github.com/twitchtv/retool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226304695,"owners_count":17603645,"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":["code-generation","go","package-management","vendoring"],"created_at":"2024-11-25T09:29:16.925Z","updated_at":"2024-11-25T09:29:27.501Z","avatar_url":"https://github.com/twitchtv.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Retool is Deprecated #\n\nAs of March 2, 2022, retool is officially deprecated and will receive no further updates. This repo will remain available in read-only mode. We recommend customers of retool manage their tool dependencies using Go Modules instead, as recommended and supported by the core Go project. [This wiki entry in the golang/go repository](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module) explains exactly how to do that.\n\nFor more information, please consult the blog linked above or the [official docs on Go Modules](https://go.dev/ref/mod).\n\nThank you for using retool!\n\n---\n\n# Retool: Vendor thy tools! #\n\n[![Build Status](https://travis-ci.org/twitchtv/retool.svg?branch=master)](https://travis-ci.org/twitchtv/retool)\n[![Windows Build status](https://ci.appveyor.com/api/projects/status/06x2vd5nh683iscu/branch/master?svg=true\u0026passingText=Windows%20build%20passing\u0026pendingText=Windows%20build%20pending\u0026failingText=Windows%20build%20failing)](https://ci.appveyor.com/project/spenczar/retool/branch/master)\n\n\n## what is this ##\n\nretool helps manage the versions of _tools_ that you use with your\nrepository. These are executables that are a crucial part of your\ndevelopment environment, but aren't imported by any of your code, so\nthey don't get scooped up by glide or godep (or any other vendoring\ntool).\n\nSome examples of tools:\n\n - [github.com/tools/godep](https://github.com/tools/godep) is a tool to\n   vendor Go packages.\n - [github.com/golang/protobuf/protoc-gen-go](https://github.com/golang/protobuf/protoc-gen-go)\n   is a tool to compile Go code from protobuf definitions.\n - [github.com/maxbrunsfeld/counterfeiter](https://github.com/maxbrunsfeld/counterfeiter)\n   is a tool to generate mocks of interfaces.\n\nYou want this if you use code generation: if everybody has a different\nversion of the code generator, then you'll get meaningless churn across\nruns of the generator unless everyone is pinned to the right version.\n\nYou might also want this if you use linters or tools like\n[github.com/kisielk/errcheck](https://github.com/kisielk/errcheck) in an\nautomated fashion and you want to make sure that everyone has the same\nversion so you can pass flags to the linter with confidence.\n\nretool pins on a per-project basis. It works by making a complete GOPATH\nwithin your project. You can choose to commit the source files for those\ntools, if you like.\n\n## usage ##\n\nThe expected workflow is something like this:\n\nInstall retool:\n```sh\ngo get github.com/twitchtv/retool\n```\n\nAdd a tool dependency:\n```sh\nretool add github.com/jteeuwen/go-bindata/go-bindata origin/master\n```\n\nUse it to generate code:\n```sh\nretool do go-bindata -pkg testdata -o ./testdata/testdata.go ./testdata/data.json\n```\n\n---\n\nThere are a few other commands that you'll use much less often:\n\nUpgrade a tool to its latest version:\n```sh\nretool upgrade github.com/spf13/hugo origin/master\n# or to a particular tag\nretool upgrade github.com/spf13/hugo v0.17\n```\n\nStop using that tool you dont like anymore:\n```sh\nretool remove github.com/tools/godep\n```\n\nCompile all the tools that other people have vendored in a project:\n```sh\n# compiles everything without using the network - useful for isolated build environments\nretool build\n```\n\nDouble-check that you're in sync by comparing everything with upstream versions:\n```sh\n# makes sure your tools match tools.json by comparing against their remotes\nretool sync\n```\n\n## why would i need to manage these things  ##\n\n**TL;DR:** if you work with anyone else on your project, and they have\ndifferent versions of their tools, everything turns to shit.\n\nOne of the best parts about Go is that it is very, very simple. This\nmakes it straightforward to write code generation utilities. You don't\nneed to generate code for every project, but in large ones, code\ngeneration can help you be much more productive.\n\nLike, if you're writing tests that use an interface, you can use code\ngeneration to quickly whip up structs which mock the interface so you\ncan force them to return errors. This way, you can test edge cases for\nyour interaction points with\ninterfaces. [github.com/maxbrunsfeld/counterfeiter](https://github.com/maxbrunsfeld/counterfeiter)\ndoes this pretty well!\n\nIf you want to use the generated code, you should check in the\ngenerated `.go` code to git, not just the sources, so that build boxes\nand the like don't need all these code generation tools, and so that\n`go get` just works cleanly.\n\nThis poses a problem, though, as soon as you start working with other\npeople on your project: if you have different versions of your code\ngeneration tools, which generate slightly different output, you'll get\nlots of meaningless churn in your commits. This sucks! There has to be\na better way!\n\n## the retool way ##\n\nretool records the versions of tools you want in a file, `tools.json`.\nThe file looks like this:\n\n```json\n{\n  \"Tools\": [\n    {\n      \"Repository\": \"github.com/golang/protobuf/protoc-gen-go\",\n      \"Commit\": \"2fea9e168bab814ca0c6e292a6be164f624fc6ca\"\n    }\n  ]\n}\n```\n\nTools are identified by repo and commit. Each tool in `tools.json` will\nbe installed to `_tools`, which is a private GOPATH just dedicated to\nkeeping track of these tools.\n\nIn practice, you don't need to know much about `tools.json`. You check\nit in to git so that everybody stays in sync, but you manage it with\n`retool add|upgrade|remove`.\n\nWhen it's time to generate code, **instead of `go generate ./...`**, you\nuse `retool do go generate ./...` to use your sweet, vendored tools.\nThis really just calls `PATH=$PWD/_tools/bin:PATH go generate ./...`; if\nyou want to do anything fancy, you can feel free to use that path too.\n\n## contributing to retool ##\n\nAny pull requests are extremely welcome! If you run into problems or\nhave questions, please raise a github issue!\n\nRetool's tests are mostly integration tests. They require a working Go\ncompiler, a working version of git, and network access.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitchtv%2Fretool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwitchtv%2Fretool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwitchtv%2Fretool/lists"}