counterfeiter
brew install counterfeiter
v6.12.2
MIT
Tool for generating self-contained, type-safe test doubles in go
10
30-day installs · #8562
28
90-day · #8829
166
365-day · #7812
1.1k
★ GitHub stars · updated 2mo ago
Runtime dependencies
Links
- https://github.com/maxbrunsfeld/counterfeiter
- GitHub: maxbrunsfeld/counterfeiter
- Brew formula source: Formula/c/counterfeiter.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [
"go"
],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Tool for generating self-contained, type-safe test doubles in go",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:37+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "counterfeiter",
"github_default_branch": "main",
"github_last_commit_at": "2026-06-15T14:04:27Z",
"github_readme_excerpt": "# `counterfeiter` [](https://github.com/maxbrunsfeld/counterfeiter/actions/workflows/go.yml) [](https://goreportcard.com/report/github.com/maxbrunsfeld/counterfeiter/v6) [](https://godoc.org/github.com/maxbrunsfeld/counterfeiter/v6)\n\nWhen writing unit-tests for an object, it is often useful to have fake implementations\nof the object\u0027s collaborators. In go, such fake implementations cannot be generated\nautomatically at runtime, and writing them by hand can be quite arduous.\n\n`counterfeiter` allows you to simply generate test doubles for a given interface.\n\n### Supported Versions Of `go`\n\n`counterfeiter` follows the [support policy of `go` itself](https://golang.org/doc/devel/release.html#policy):\n\n\u003e Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. We fix critical problems, including [critical security problems](https://golang.org/security), in supported releases as needed by issuing minor revisions (for example, Go 1.6.1, Go 1.6.2, and so on).\n\nIf you are having problems with `counterfeiter` and are not using a supported version of go, please update to use a supported version of go before opening an issue.\n\n### Using `counterfeiter`\n\n\u26a0\ufe0f Please use [`go modules`](https://blog.golang.org/using-go-modules) when working with counterfeiter.\n\nTypically, `counterfeiter` is used in `go generate` directives. It can be frustrating when you change your interface declaration and suddenly all of your generated code is suddenly out-of-date. The best practice here is to use the [`go generate` command](https://blog.golang.org/generate) to make it easier to keep your test doubles up t",
"github_repo": "maxbrunsfeld/counterfeiter",
"github_stars": 1134,
"github_topics": [],
"homepage": "https://github.com/maxbrunsfeld/counterfeiter",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 10,
"installs_365d": 166,
"installs_90d": 28,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "counterfeiter",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 8562,
"rank_365d": 7812,
"rank_90d": 8829,
"raw_hash": "ae5659f83a752cf9",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/c/counterfeiter.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "6.12.2",
"versioned_formulae": [],
"why_use_this": null
}