# Install counterfeiter with Homebrew

Tool for generating self-contained, type-safe test doubles in go. Version 6.12.2 via Homebrew; verified 2026-06-22.

## Install

```sh
sudo av install brew:counterfeiter
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install counterfeiter
```

  Evidence: local Homebrew formula metadata

## Package facts

- **Package key:** brew:counterfeiter
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/counterfeiter>
- **Version:** 6.12.2
- **Source summary:** Tool for generating self-contained, type-safe test doubles in go
- **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
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- counterfeiter (cli)
- counterfeiter (alias)

## Dependencies

- go

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 6.12.2
- Package-manager updated: 2026-06-22
- Local data: ok
- Upstream repository: https://github.com/maxbrunsfeld/counterfeiter
- Upstream latest detected: v6.12.2 (current)
## Project history and usage

counterfeiter is a Go code generator for creating self-contained, type-safe test doubles from interfaces.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 2014: Public GitHub repository created.
- 2024: v6.8.x through v6.11.x releases published.
- 2026: v6.12.2 release published.

### Related projects

- go generate
- Go modules
- Go tool dependencies

### Sources

- <https://github.com/maxbrunsfeld/counterfeiter>
- <https://api.github.com/repos/maxbrunsfeld/counterfeiter>
- <https://github.com/maxbrunsfeld/counterfeiter/releases>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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:** head, stable


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Runtime dependency declared by Homebrew.
- [mockery](https://www.automicvault.com/pkg/brew/mockery/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go, testing.
- [gotests](https://www.automicvault.com/pkg/brew/gotests/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go, testing.
- [mockolo](https://www.automicvault.com/pkg/brew/mockolo/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, testing.
- [ifacemaker](https://www.automicvault.com/pkg/brew/ifacemaker/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go, testing.
- [fake-gcs-server](https://www.automicvault.com/pkg/brew/fake-gcs-server/) - Shares av.db curated category or tags: cli, developer-tools, go, testing.
- [go-bindata](https://www.automicvault.com/pkg/brew/go-bindata/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go.
- [goctl](https://www.automicvault.com/pkg/brew/goctl/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go.
- [gomodifytags](https://www.automicvault.com/pkg/brew/gomodifytags/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go.

## Combined YAML source

View the package source record on GitHub. [combined/counterfeiter.yml](https://github.com/automic-vault/db/blob/main/combined/counterfeiter.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- cross-ecosystem install command graph
