Quick reference
| Flag | Kind | Example | Description |
|---|---|---|---|
-i <version> | string | igo -i 1.23.4 | Install Go version 1.23.4 |
-u <version> | string | igo -u 1.23.4 | Uninstall Go version 1.23.4 |
-s <version> | string | igo -s 1.24.2 | Switch to version 1.24.2 |
-a <version> | string | igo -a 1.24.2 | Activate Go version 1.24.2 |
-f <version> | string | igo -f 1.24.2 | Fix installation of 1.24.2 |
-l | bool | igo -l | List all installed Go versions |
-e | bool | igo -e | Display environment of active installation |
-v / -version | bool | igo -v | Display igo binary version |
-h / -help | bool | igo -h | Display help |
-godir <path> | string | igo -godir /opt/go | Override workspace directory |
-goos <os> | string | igo -goos linux | Override target OS |
-goarch <arch> | string | igo -goarch amd64 | Override target architecture |
-system | bool | igo -i 1.23.4 -system | Install in system mode at /usr/go |
-debug | bool | igo -i 1.23.4 -debug | Enable debug output |
-verbose | bool | igo -i 1.23.4 -verbose | Enable verbose output |
-extras | bool | igo -i 1.23.4 -extras | Install extra packages after Go |
-extra-packages | map | see below | Customize extra packages to install |
Commands
These flags trigger the primary actions igo performs. All version flags accept a string inX.Y.Z format.
Install a specific version of Go. igo downloads the official tarball from
go.dev/dl, extracts it into your workspace, renames the versioned binaries, creates shims, and sets up symlinks. The minimum supported version is 1.16.0.Uninstall a specific version of Go. igo removes the sticky bit and set-uid/set-gid permissions from the version directory before deleting it, then updates symlinks if the removed version was the active one.
Switch to an already-installed version of Go. Updates the
~/go/version file and rewrites the bin, root, and path symlinks to point at the specified version.Activate an already-installed version of Go. This is an alias for
-s and behaves identically.Fix a Go version installation. Re-runs the post-install setup steps (symlinks, shims, binary renaming) for the specified version without re-downloading the tarball.
List all installed Go versions in a formatted table. The active version is marked with Example output:
* ACTIVE.Display the environment of the currently active Go installation. Shows the resolved values of
GOROOT, GOBIN, GOPATH, GOMODCACHE, GOOS, and GOARCH.Display the igo binary version.
-version is an alias for this flag.Display help information.
-help is an alias for this flag.Options
These flags modify the behavior of the command flags above. You can combine them with any command flag.The directory where igo installs and manages Go versions. Defaults to
~/go in your home directory. Use this to share a Go installation across users or to put it on a separate volume.Override the target operating system. Defaults to the OS detected at runtime via
runtime.GOOS. Useful for cross-platform tarball downloads.Override the target CPU architecture. Defaults to the architecture detected at runtime via
runtime.GOARCH. Useful for downloading a tarball for a different architecture.Install Go in system mode. When set, igo uses
/usr/go as the workspace instead of ~/go. You typically need elevated permissions to write to /usr/go.Enable debug output. Prints additional diagnostic information during command execution, including internal state and file operations.
Enable verbose output. Prints progress messages during installation and other operations, such as symlink creation and version check results.
Install extra Go packages after a successful
igo -i. This is enabled by default. Pass -extras=false to skip the extra package installation step.Customize the set of extra packages installed after
igo -i. Accepts a map of package name to module path. Overrides the built-in default package list.The default extra packages installed are:| Name | Module |
|---|---|
genwordpass | github.com/ProjectApario/genwordpass |
summarize | github.com/andreimerlescu/summarize |
counter | github.com/andreimerlescu/counter |
bump | github.com/andreimerlescu/bump |
goini | github.com/andreimerlescu/goini |
goenv | github.com/andreimerlescu/goenv |
govulncheck | golang.org/x/vuln/cmd/govulncheck |
go-generate-password | github.com/m1/go-generate-password/cmd/go-generate-password |
cli-gematria | github.com/andreimerlescu/cli-gematria |
Config file
igo uses thefigtree library for configuration. If the file ~/.igo.config.yml exists, igo loads it automatically at startup and merges its values with any flags you pass on the command line. Command-line flags take precedence over values in the config file.