macOS
brew install counterfeiterlocal Homebrew formula metadata
brew
Tool for generating self-contained, type-safe test doubles in go. Version 6.12.2 via Homebrew; verified 2026-06-22.
install
brew install counterfeiterlocal Homebrew formula metadata
overview
Tool for generating self-contained, type-safe test doubles in go
history
counterfeiter is a Go code generator for creating self-contained, type-safe test doubles from interfaces.
The public repository was created in 2014. Its README frames the project around a Go-specific testing problem: fake implementations are useful for unit tests but cannot be generated automatically at runtime in Go.
The project has continued through a v6 release line, with current documentation using Go modules and Go tool dependencies.
counterfeiter's documented workflow follows Go ecosystem conventions: add it as a tool dependency, place `go:generate` or `counterfeiter:generate` directives near interfaces, and regenerate fakes with `go generate`.
The README notes that the project has largely been maintained by the community, which fits its role as a small but durable testing utility rather than a framework-owned generator.
Typical use is to generate fakes for interfaces in the same module or for third-party interfaces, then import the generated `foofakes` package in tests to inspect call counts, arguments, and stubbed return values.
For package maintainers, counterfeiter is a good example of a Go CLI whose preferred installation changed with Go tooling: Homebrew can ship a binary, but the upstream docs now prefer module-pinned tool dependencies for reproducible generation.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
counterfeiter | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/maxbrunsfeld/counterfeiter
install metadata
| Package key | brew:counterfeiter |
|---|---|
| Version | 6.12.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/counterfeiter |
| Homepage | https://github.com/maxbrunsfeld/counterfeiter |
| Repository | https://github.com/maxbrunsfeld/counterfeiter |
| Upstream docs | https://github.com/maxbrunsfeld/counterfeiter#readme |
| License | MIT |
| Source archive | https://github.com/maxbrunsfeld/counterfeiter/archive/refs/tags/v6.12.2.tar.gz |
| Last updated | 2026-06-22T14:03:05-07:00 |
| Pulse | updated |
| Dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | counterfeiter |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.