Help us shape the future of Go! Take the 2026 Go Developer Survey

gotools

package module
v0.6.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: MIT Imports: 1 Imported by: 0

README

gotools.sh

A wrapper around go get -tool with added ergonomics like dependency isolation, deterministic sync, managed execution, and CI-friendly diagnostics.

But why?

Installing tools straight into your project's go.mod pollutes the dependency graph with tool-only dependencies. gotools.sh keeps tool dependencies isolated behind three strategies. See Strategies for more details.

⚠️ Tools are compiled locally from source (go get -tool) — read the risks and recommendations before committing to a strategy.

Requirements

  • Go 1.24 or higher

Install

go install github.com/piusalfred/gotools/cmd/gotools@latest

For more installation options, See Installation options.

Quick Start

# Bootstrap with the default split strategy
gotools init

# Install some tools
gotools install github.com/google/addlicense
gotools install golangci-lint \
  github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4

# Run a tool
gotools exec addlicense -l mit -c "Your Name" .
gotools exec golangci-lint run ./...

# List all managed tools
gotools list

Run gotools help for the full command reference. You can also check out the USAGE documentation for more examples and details.

Features

Three Isolation Strategies Choose between split (default), module (safest), or unified (simplest).
Go Version Parity Tool environments automatically sync to the Go version defined in your project's root go.mod.
Seamless Migration Move between strategies dynamically with the migrate command without losing your pinned versions.
Auto-Migration on Sync If the tools directory structure doesn't match .gotools.json, sync detects the mismatch and migrates automatically.
Reproducibility Commit the tools/ directory to guarantee environment parity across teams and CI.
Self-Update Update gotools.sh itself with a single command.

Documentation

Doc Contents
USAGE Command reference, examples, risks, doctor, JSON output, shell completions, cleanup, exit codes
INSTALLATION All installation methods: pre-built binaries, curl installer, vendored script, version pinning
STRATEGIES The three isolation strategies compared
MIGRATION Moving between strategies
CONFIGURATION The .gotools.json manifest, schema versioning, module prefix
CI CI integration, version guard, offline mode, locking and timeouts, pre-commit
DEVELOPMENT Source layout, building, testing, releases (for contributors)

License

MIT — Copyright (c) 2026 Pius Alfred

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SCRIPT string

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
gotools command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL