Install¶
tfsprout ships two binaries. Install whichever matches the check set you want; installing both is fine.
| Binary | Checks |
|---|---|
tfsprout |
Standard checks |
tfsproutx |
Standard checks plus extra checks |
Release binaries¶
Prebuilt binaries for Linux, macOS, and Windows on amd64, arm64, and 386 are attached to each release.
Download the archive for your platform, extract it, and place the binary somewhere on your PATH.
go install¶
To build from source into your $GOBIN directory (typically $GOPATH/bin):
For the command that includes extra checks:
This requires Go 1.25 or later — see Scope and SDK support.
Pinning a version¶
@latest is convenient locally and a liability in CI, where an unpinned linter turns an upstream release into an unrelated build failure. Pin explicitly:
If your provider already pins its tooling through a tools.go file, add the import there instead so the version lives in go.mod:
Then go mod tidy, and install with go install github.com/jfrappier/tfsprout/cmd/tfsprout.
Docker¶
The repository includes a Dockerfile that wraps a prebuilt binary:
FROM golang:1.27-bookworm
WORKDIR /src
COPY tfsprout /usr/bin/tfsprout
ENTRYPOINT ["/usr/bin/tfsprout"]
CMD ["./..."]
It expects a tfsprout binary in the build context rather than compiling one, so build a binary first (or extract one from a release archive) before docker build. Mount your provider at /src:
The base image is a golang: image because tfsprout requires a Go toolchain to run, not merely to build — see Go toolchain requirement below. Substituting a minimal base image will produce a container that starts and then fails to load any package.
Go toolchain requirement¶
tfsprout shells out to go env and go list while loading the packages it analyzes. Wherever you run it — locally, in CI, or in a container — a Go toolchain must be on PATH.
Two consequences worth planning around:
- The toolchain version caps what you can analyze.
go listfails on a module whosegodirective is newer than the installed toolchain, so analyzing a provider that declaresgo 1.27needs a Go 1.27 toolchain. - The analyzing toolchain is what matters, not the one your provider targets. Running tfsprout under Go 1.27 requires tfsprout v0.1.1 or later; earlier versions crash. See Troubleshooting.
GitHub Action¶
For CI, the tfsprout-github-action handles installation for you. See CI integration.
Verifying the install¶
Use -V=full for the fully qualified version string, which is what to include when filing an issue.
Next steps¶
- Running tfsprout
- Migrating from tfproviderlint if you are replacing an existing setup