A command-line tool that detects breaking changes in Go APIs by comparing different versions of your code.
gobreaker analyzes your Go packages and reports incompatible API changes between versions, helping you maintain backward compatibility and follow semantic versioning principles. It uses golang.org/x/exp/apidiff under the hood to perform accurate API comparisons.
go install github.com/flaticols/gobreaker/cmd/gobreaker@latestOr build from source:
git clone https://github.com/flaticols/gobreaker.git
cd gobreaker
go build -o gobreaker ./cmd/gobreakergobreaker [OPTIONS] <base-ref> [repo-path]base-ref(required): The base reference to compare against (branch, tag, or commit SHA)repo-path(optional): Path to the git repository (defaults to current directory)
-o, --output <format>: Output format -text(default),json, ormarkdown-v, --version: Print version information and exit-h, --help: Show help message
# Compare current branch against main in current directory
gobreaker main
# Compare against a specific tag in a different repository
gobreaker v1.0.0 /path/to/repo
# Output results as JSON
gobreaker -o json main
# Output results as Markdown (useful for PR comments)
gobreaker --output markdown main
# Check version
gobreaker --versionShows a human-readable report of breaking changes with proper indentation.
Outputs structured JSON data for programmatic consumption.
Generates a Markdown-formatted report suitable for documentation or pull request comments.
gobreaker identifies various types of breaking changes including:
- Removed or renamed exported functions, types, methods, or variables
- Changed function signatures
- Removed or changed struct fields
- Interface method changes
- Type definition changes
go build -o gobreaker ./cmd/gobreakergo test ./...gobreaker is also available as a Claude Code plugin, bringing breaking-change detection directly into your AI-assisted workflow.
/plugin marketplace add flaticols/gobreaker
/plugin install gobreaker
# Compare default branch vs working directory
/gobreaker:check
# Compare a specific tag against working directory
/gobreaker:check v0.0.1
# Compare two git refs
/gobreaker:check v0.0.1 v0.0.2
# Compare filesystem paths
/gobreaker:check -p /old/pkg /new/pkg
The skill runs gobreaker on your Go project and returns a structured summary: compatible/breaking status, list of changes, semver bump recommendation, and migration hints.
Note: The
gobreakerbinary must be in yourPATH. Install it withgo install github.com/flaticols/gobreaker/cmd/gobreaker@latest.
See LICENSE file for details.