# 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/bats-core>
- **バージョン:** 1.14.0
- **ソース概要:** Bash Automated Testing System
- **ホームページ:** <https://github.com/bats-core/bats-core>
- **リポジトリ:** <https://github.com/bats-core/bats-core>
- **ライセンス:** MIT
- **ソースアーカイブ:** <https://github.com/bats-core/bats-core/archive/refs/tags/v1.14.0.tar.gz>
- **最終更新:** 2026-07-22T08:40:21Z
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- bats (cli)
- bats (エイリアス)

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 all

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 1.14.0
- マネージャ更新日: 2026-07-22
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/bats-core/bats-core
- 検出された最新: v1.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

## ソースデータベース詳細

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

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

- 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/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-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/


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/ja/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/ja/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [bashunit](https://pkg.so/ja/brew/bashunit/) - Shares pkgdb curated category or tags: bash, cli, developer-tools, testing.
- [bash_unit](https://pkg.so/ja/brew/bash-unit/) - Shares pkgdb curated category or tags: bash, cli, developer-tools, testing.
- [lcov](https://pkg.so/ja/brew/lcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [allure](https://pkg.so/ja/brew/allure/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [kcov](https://pkg.so/ja/brew/kcov/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [mockolo](https://pkg.so/ja/brew/mockolo/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [mockery](https://pkg.so/ja/brew/mockery/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [pytest](https://pkg.so/ja/brew/pytest/) - Shares pkgdb curated category or tags: cli, developer-tools, testing.
- [bats](https://pkg.so/ja/npm/bats/) - Executable or command metadata overlaps with this package. Shared terms: automated, bash, bats, cli, system.
- [pa11y](https://pkg.so/ja/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/mxcl/pkgdb/blob/main/combined/bats-core.yml)


## ソース

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