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

Mock code autogenerator for Golang. Version 3.7.2 via Homebrew; verified 2026-07-29. Also installable with debian: sudo apt install mockery.

## 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/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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
- **Version:** 3.7.2
- **Source summary:** Mock code autogenerator for Golang
- **Homepage:** <https://vektra.github.io/mockery/>
- **Repository:** <https://github.com/vektra/mockery>
- **Last updated:** 2026-07-29T17:05:00+02:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- mockery (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 3.7.2
## 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
## 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.7: normalized package name match | openSUSE Tumbleweed package metadata: mockery from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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


## Combined YAML source

View the package source record on GitHub. [combined/mockery.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mockery.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
