Skip to content
/ good Public

Install and uninstall Go package in isolated path, to keep your `GOPATH/pkg` clean. Like `pipx`, but for Go.

License

Notifications You must be signed in to change notification settings

tigerinus/good

Repository files navigation

👍 good

Go Reference Go Report Card goreleaser codecov

A tool for installing a Go package to an isolated path, to keep the global $GOPATH/pkg clean. Because of isolated path, uninstalling is also possible.

This tool is greatly inspired by pipx.

a logo of gopher with thumb up without any text

Thanks DALL-e for the logo.

Motivations

  • Command go clean -i -r ... does not really clean everything.
  • Sometime people just want to use go install to install a CLI for non-development purpose, but doing it under a Go project, it changes your go.mod and go.sum files.
  • People could do ls $GOPATH/bin to see all the binaries but have to go thru extra steps to figure out the package name before uninstalling it.
  • Simply removing the binary under $GOPATH/bin leaves a bunch of dependencies in $GOPATH/pkg/mod.

Features

  • Install CLI Go apps in an isolated path, without changing anything under $GOPATH or go.mod/go.sum files (if under a Go project).
  • Clean up related mod cache after installation to free up space.
  • Uninstall the app in one command without leaving any files behind.
  • List all CLI go apps installed
  • (UPCOMING) Check for outdated CLI go apps among the installed.
  • (UPCOMING) Strip the binary after as part of installation.
  • (UPCOMING) Show information about a CLI go app.
  • (UPCOMING) Run a CLI app once and uninstall.
  • (UPCOMING) Search for CLI go apps from sources like awesome-go.

Usage

A tool for installing a Go package to an isolated path, to keep the global GOPATH
clean. Because of isolated path, uninstalling is also possible.

Usage:
  good [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  install     Install a package named by its import path
  list        List all installed packages
  uninstall   Uninstall a package named by its import path
  version     Show version

Flags:
  -d, --debug   debug mode
  -h, --help    help for good

Use "good [command] --help" for more information about a command.

Installation

go install github.com/tigerinus/good

Contributing

This tool is still at its very early stage. Issues and Pull Requests are definitely welcome!

About

Install and uninstall Go package in isolated path, to keep your `GOPATH/pkg` clean. Like `pipx`, but for Go.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages