Awesome Open Source
Awesome Open Source


CI GoDoc GitHub release (latest SemVer) Go Report Card License

The implementation of clarify best practice for tool dependencies.



  • Manage versions of tools dependencies, and build them with specified version
  • Does not introduce new mechanisms to manage tool dependencies
  • Only 2 commands that you use: --add and --build
  • All you need to execute go generate ./tools.go if you want only to use tools


gex --add [packages...]

Add a new tool to dependencies:

$ gex --add

The tool will be managed in tools.go and its version will be managed by Modules or dep.

$ cat tools.go
// Code generated by DO NOT EDIT.

// +build tools

package tools

// tool dependencies
import (
        _ ""

// If you want to use tools, please run the following command:
//  go generate ./tools.go
//go:generate go build -v -o=./bin/reviewdog

$ cat go.mod | grep mock v1.1.1 // indirect

go generate ./tools.go

Build executable binaries into $PWD/bin.

$ go generate ./tools.go

gex [command] [args...]

Execute command that managed in tools.go and go.mod. gex will build the executable binary automatically if needed.

$ gex mockgen
# prints mockgen's help text...



$ brew install izumin5210/tools/gex

Other platforms

You can download prebuilt binaries for each platform in the releases page.

Build from source

$ go get


gex depends on dep or Modules to manage tool dependencies,

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
go (15,158
golang (3,883