# bats-core を Homebrew, apk, MacPorts, pacman, apt, dnf, Nix, zypper でインストール

bats-core のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

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

追加のインストールコマンド:

### macOS

- Homebrew (100%):

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

  証拠: local Homebrew formula metadata

- MacPorts (94%):

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

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

  証拠: 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
```

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

- Nix (92%):

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

  証拠: 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
```

  証拠: openSUSE Tumbleweed package metadata: bats from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## パッケージ情報

- **パッケージキー:** brew:bats-core
- **パッケージマネージャ:** Homebrew
- **バージョン:** 1.14.0
- **ソース概要:** Bash Automated Testing System
- **ホームページ:** <https://github.com/bats-core/bats-core>
- **リポジトリ:** <https://github.com/bats-core/bats-core>
- **最終更新:** 2026-07-22T08:40:21Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- bats (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 1.14.0
## プロジェクトの歴史と使われ方

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.

### プロジェクトの歴史

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.

### 採用の歴史

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.

### 使われ方

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.

### パッケージ好きにとっての重要性

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.

### タイムライン

- 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.

### ソース

- <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


## セキュリティノート

narrow executable package without higher-risk signals.

- **Geiger リスク:** グリーン / 低
- narrow executable package without higher-risk signals

## 他のパッケージマネージャ記録

- 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.14.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.14.0-1.fc45: 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Bash Automated Testing System | https://github.com/bats-core/bats-core
- zypper - bats - 1.13.0-1.2: installed executable or alias match | openSUSE Tumbleweed package metadata: bats from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Automated Testing System | https://github.com/bats-core/bats-core/


## Combined YAML source

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


## ソース

- 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
