# Install gotests with Homebrew, Nix

Automatically generate Go test boilerplate from your source code. Version 1.9.0 via Homebrew; verified 2026-07-25. Also installable with nix: nix profile install nixpkgs#gotests.

## Install

```sh
sudo av install brew:gotests
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install gotests
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#gotests
```

  Evidence: nixpkgs package indexes: pkgs/by-name/go/gotests/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:gotests
- **Package manager:** Homebrew
- **Version:** 1.9.0
- **Source summary:** Automatically generate Go test boilerplate from your source code
- **Homepage:** <https://github.com/cweill/gotests>
- **Repository:** <https://github.com/cweill/gotests>
- **Last updated:** 2026-07-25T20:55:27-04:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- gotests (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.9.0
## Project history and usage

gotests is a Go test-boilerplate generator. It analyzes functions and methods and emits table-driven test scaffolding, fitting the Go community's preference for generated but editable test code.

### Project history

The repository was created in January 2016 and published early 1.x releases in 2016. The README describes the tool as a generator for table-driven tests and documents command-line filters for exported functions, named tests, recursive package traversal, templates, and writing generated tests back to files.

### Adoption history

The README highlights integrations with editor and IDE workflows, including Sublime Text, Emacs, Vim, Atom, Visual Studio Code, and GoLand. That adoption pattern made gotests useful as both a terminal command and an editor action for quickly producing test skeletons.

### How it is used

Typical usage is to run gotests against files or packages, optionally selecting specific functions, exported APIs, custom templates, or testify-style output. Later releases added full Go generics support and an optional local-LLM mode through Ollama for generating test cases.

### Why package nerds care

gotests is the sort of package that shows how Go tooling tends to compose: it is not a test framework, but a small generator that feeds ordinary go test workflows and leaves normal Go source behind.

### Timeline

- 2016: Repository created and v1.0 published.
- 2020: v1.6.0 release published.
- 2025: v1.8.0 release described full Go generics support.
- 2025: v1.9.0 release described local AI-powered test generation through Ollama.

### Related projects

- Go's table-driven test idiom is the coding style gotests automates.
- Go editor integrations such as VS Code Go and Vim plugins provide interactive entry points for generated tests.

### Sources

- <https://formulae.brew.sh/formula/gotests>
- <https://github.com/cweill/gotests>
- <https://github.com/cweill/gotests#readme>
- <https://github.com/cweill/gotests/releases>


## Security Notes

narrow executable package without higher-risk signals.

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

## Other Package-Manager Records

- Nix - gotests: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/gotests/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Combined YAML source

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


## Sources

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