# Install bats-core with Homebrew, apk, MacPorts, pacman, apt, dnf, Nix, zypper

Bash Automated Testing System. Version 1.13.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:bats-core
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install bats-core
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install bats-core
```

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

### Linux

- apk (92%):

```sh
sudo apk add bats-core
```

  Evidence: Alpine Linux edge package indexes: bats-core from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- pacman (92%):

```sh
sudo pacman -S bats
```

  Evidence: Arch Linux sync databases: bats from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install bats
```

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

- dnf (92%):

```sh
sudo dnf install bats
```

  Evidence: Fedora Rawhide package metadata: bats from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#bats
```

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

- zypper (92%):

```sh
sudo zypper install bats
```

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

## Package facts

- **Package key:** brew:bats-core
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/bats-core>
- **Version:** 1.13.0
- **Source summary:** Bash Automated Testing System
- **Homepage:** <https://github.com/bats-core/bats-core>
- **Repository:** <https://github.com/bats-core/bats-core>
- **Upstream docs:** <https://bats-core.readthedocs.io/en/stable>
- **License:** MIT
- **Source archive:** <https://github.com/bats-core/bats-core/archive/refs/tags/v1.13.0.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- bats (cli)
- bats (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on all

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.13.0
- Local data: ok
- Upstream repository: https://github.com/bats-core/bats-core
- Upstream latest detected: v1.13.0 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

bats-core is the community-maintained continuation of Bats, the Bash Automated Testing System: a TAP-compliant testing framework where test files are Bash scripts and each test case runs normal shell commands.

### Project history

The original Bats project dates to Sam Stephenson's 2011-2016 copyright era. The current README says bats-core was forked from the original Bats repository on Tuesday, September 19, 2017 at commit 0360811 after development had stalled and write access to the original repository could not be obtained.

bats-core released Bats 1.0.0 on June 8, 2018. That release emphasized compatibility with 0.4.0 while adding Bash compatibility work, Docker support, better Windows and macOS stability, TAP fixes, and major performance improvements.

The original Bats repository was archived read-only by its owner as of April 29, 2021, and the bats-core README identifies bats-core as the community-maintained Bats project.

### Adoption history

Bats-core is widely packaged as the practical shell-testing tool for Unix projects. The input metadata lists apk, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and zypper packages, while the upstream README points users to GitHub issues, tested pull requests, examples of projects using Bats, and Read the Docs documentation.

The repository page showed about 6.1k stars, roughly 2,004 commits, and 24 releases at enrichment time, with v1.13.0 shown as the latest release on November 7, 2025.

### How it is used

A Bats test file is a Bash script with special syntax for test cases. Under the hood, each test is a function with a description, and ordinary shell commands become assertions through exit status and Bash errexit behavior.

Bats is most useful for testing Bash software, but the README explicitly notes it can test any Unix program. That makes it popular for CLI packages, install scripts, dotfiles, shell libraries, and smoke tests around command-line behavior.

### Why package nerds care

bats-core is one of the package-nerd standards for testing shell-facing software because it sits exactly where many package bugs happen: command names, exit statuses, stdout/stderr, file effects, and portable shell behavior.

Its history also matters culturally. It shows a successful community-maintained fork preserving a small but widely depended-on developer tool when the original repository stalled, while keeping compatibility with existing Bats tests.

Because it emits TAP and uses shell syntax, bats-core fits neatly into old and new CI systems, distro packaging tests, and language-agnostic build pipelines without demanding a heavier test framework.

### Timeline

- 2011-2016: Original Bats copyright period credited to Sam Stephenson.
- 2017: bats-core fork created from original Bats on September 19.
- 2018: Bats 1.0.0 released on June 8 with compatibility, Docker, stability, and performance improvements.
- 2021: Original Bats repository archived read-only on April 29.
- 2025: Repository page lists v1.13.0 as latest release on November 7.

### Related projects

- sstephenson/bats is the original Bats repository.
- The bats-core ecosystem includes helper libraries such as bats-support, bats-assert, bats-file, and bats-detik.
- TAP is the output protocol family that makes Bats results easy to consume in broader test tooling.

### Sources

- <https://github.com/bats-core/bats-core>
- <https://github.com/bats-core/bats-core/releases/tag/v1.0.0>
- <https://github.com/bats-core/bats-core/releases/tag/v1.11.1>
- <https://github.com/sstephenson/bats/issues/236>
- source_facts.package-manager


## 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:** bats-core
- **Aliases:** bats
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- apk - bats-core - 1.13.0-r0: normalized package name match | Alpine Linux edge package indexes: bats-core from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash Automated Testing System | https://github.com/bats-core/bats-core
- apk - bats-core-doc - 1.13.0-r0: normalized package name match | Alpine Linux edge package indexes: bats-core-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Bash Automated Testing System (documentation) | https://github.com/bats-core/bats-core
- pacman - bats - 1.13.0-1: normalized package name match | Arch Linux sync databases: bats from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Bash Automated Testing System | https://github.com/bats-core/bats-core
- MacPorts - bats-core: normalized package name match | MacPorts ports tree: sysutils/bats-core/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Debian apt - bats - 1.11.1-1: installed executable or alias match | Debian stable package indexes: bats from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | bash automated testing system | https://github.com/bats-core/bats-core
- Nix - bats: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/ba/bats/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bats - 1.10.0-1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: bats from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | bash automated testing system | https://github.com/bats-core/bats-core
- apk - bats - 1.13.0-r1: installed executable or alias match | Alpine Linux edge package indexes: bats from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Meta package for Bats | https://bats-core.readthedocs.io/
- dnf - bats - 1.13.0-3.fc44: installed executable or alias match | Fedora Rawhide package metadata: bats from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Bash Automated Testing System | https://github.com/bats-core/bats-core
- zypper - bats - 1.13.0-1.1: installed executable or alias match | openSUSE Tumbleweed package metadata: bats from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Bash Automated Testing System | https://github.com/bats-core/bats-core/


## 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.
- [bash_unit](https://www.automicvault.com/pkg/brew/bash-unit/) - Shares av.db curated category or tags: bash, cli, developer-tools, testing.
- [bashunit](https://www.automicvault.com/pkg/brew/bashunit/) - Shares av.db curated category or tags: bash, cli, developer-tools, testing.
- [adb-enhanced](https://www.automicvault.com/pkg/brew/adb-enhanced/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [allure](https://www.automicvault.com/pkg/brew/allure/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [artillery](https://www.automicvault.com/pkg/brew/artillery/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [atf](https://www.automicvault.com/pkg/brew/atf/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [autobench](https://www.automicvault.com/pkg/brew/autobench/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [autocannon](https://www.automicvault.com/pkg/brew/autocannon/) - Shares av.db curated category or tags: cli, developer-tools, testing.
- [bats](https://www.automicvault.com/pkg/npm/bats/) - Executable or command metadata overlaps with this package. Shared terms: automated, bash, bats, cli, system.
- [pa11y](https://www.automicvault.com/pkg/npm/pa11y/) - Local package facts share a topical domain. Shared terms: automated, cli, core, developer, developer-tools.

## Combined YAML source

View the package source record on GitHub. [combined/bats-core.yml](https://github.com/automic-vault/db/blob/main/combined/bats-core.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
- external package-manager database matches
- cross-ecosystem install command graph
