# Install mockery with Homebrew, apt, MacPorts, scoop, zypper

Mock code autogenerator for Golang. Version 3.7.1 via Homebrew; verified 2026-06-15.

## Install

```sh
sudo av install brew:mockery
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mockery
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mockery
```

  Evidence: MacPorts ports tree: devel/mockery/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install mockery
```

  Evidence: Debian stable package indexes: mockery from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- zypper (92%):

```sh
sudo zypper install mockery
```

  Evidence: openSUSE Tumbleweed package metadata: mockery from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/mockery
```

  Evidence: Scoop official bucket manifest trees: bucket/mockery.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:mockery
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/mockery>
- **Version:** 3.7.1
- **Source summary:** Mock code autogenerator for Golang
- **Homepage:** <https://vektra.github.io/mockery/>
- **Repository:** <https://github.com/vektra/mockery>
- **Upstream docs:** <https://github.com/vektra/mockery#readme>
- **License:** BSD-3-Clause
- **Source archive:** <https://github.com/vektra/mockery/archive/refs/tags/v3.7.1.tar.gz>
- **Last updated:** 2026-06-15T10:20:21-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mockery (cli)
- mockery (alias)

## Build 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: 3.7.1
- Package-manager updated: 2026-06-15
- Local data: ok
- Upstream repository: https://github.com/vektra/mockery
- Upstream latest detected: v3.7.1 (current)
## Project history and usage

mockery is a Go code generator from the vektra GitHub organization for creating mock implementations of Go interfaces. Its repository was created in 2014 and the README frames the original use case around generating mocks that work with `stretchr/testify/mock`, removing repetitive hand-written mock code in Go tests.

### Project history

The project documentation broadens that role into a small code-generation framework: mockery inspects Go source, emits implementations for interfaces, supports multiple mock styles, and lets users provide custom templates rendered with typed interface metadata. Configuration via `.mockery.yaml` lets projects select packages and interfaces, which makes it suitable for repeatable generation in CI or local test workflows.

### How it is used

Within package managers, mockery fills the Go-testing generator niche alongside tools such as mockgen and moq. Homebrew packages it as `mockery`, and package records also list Debian, Ubuntu, MacPorts, Scoop, and zypper, matching its role as a developer CLI installed outside an individual Go module when teams want consistent generated mocks across repositories.

### Sources

- <https://api.github.com/repos/vektra/mockery>
- <https://formulae.brew.sh/formula/mockery>
- <https://github.com/vektra/mockery>
- <https://vektra.github.io/mockery/v3.7/>


## Security Notes

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: .mockery.yml, .mockery.yaml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mockery
- **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

## Other Package-Manager Records

- Debian apt - mockery - 2.15.0-1+b12: normalized package name match | Debian stable package indexes: mockery from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | mock code autogenerator for Golang | https://github.com/vektra/mockery
- Ubuntu apt - mockery - 2.15.0-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: mockery from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | mock code autogenerator for Golang | https://github.com/vektra/mockery
- zypper - mockery - 2.53.5-1.4: normalized package name match | openSUSE Tumbleweed package metadata: mockery from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A mock code autogenerator for Go | https://github.com/vektra/mockery
- MacPorts - mockery: normalized package name match | MacPorts ports tree: devel/mockery/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/mockery: normalized package name match | Scoop official bucket manifest trees: bucket/mockery.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 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/) - Build dependency declared by Homebrew.
- [counterfeiter](https://www.automicvault.com/pkg/brew/counterfeiter/) - 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, mocking, testing.
- [gotests](https://www.automicvault.com/pkg/brew/gotests/) - Shares av.db curated category or tags: cli, code-generation, developer-tools, go, 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/mockery.yml](https://github.com/automic-vault/db/blob/main/combined/mockery.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
