macOS
brew install bats-corelocal Homebrew formula metadata
sudo port install bats-coreMacPorts ports tree · sysutils/bats-core/Portfile · 来源: api.github.com
安装
brew install bats-corelocal Homebrew formula metadata
sudo port install bats-coreMacPorts ports tree · sysutils/bats-core/Portfile · 来源: api.github.com
sudo apk add bats-coreAlpine Linux edge package indexes · bats-core · 来源: dl-cdn.alpinelinux.org
sudo pacman -S batsArch Linux sync databases · bats · 来源: geo.mirror.pkgbuild.com
sudo dnf install batsFedora Rawhide package metadata · bats · 来源: dl.fedoraproject.org
nix profile install nixpkgs#batsnixpkgs package indexes · pkgs/by-name/ba/bats/package.nix · 来源: api.github.com
sudo zypper install batsopenSUSE Tumbleweed package metadata · bats · 来源: download.opensuse.org
概览
Bash Automated Testing System
历史
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.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
bats | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/bats-core/bats-core
安装元数据
| 软件包键 | brew:bats-core |
|---|---|
| 版本 | 1.14.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/bats-core |
| 主页 | https://github.com/bats-core/bats-core |
| 仓库 | https://github.com/bats-core/bats-core |
| 上游文档 | https://bats-core.readthedocs.io/en/stable |
| 许可证 | MIT |
| 源码归档 | https://github.com/bats-core/bats-core/archive/refs/tags/v1.14.0.tar.gz |
| 最后更新 | 2026-07-22T08:40:21Z |
| Pulse | updated |
| Bottle | 可用 (于 all) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bats-core |
| Aliases |
|
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
bats-core 1.13.0-r0
Bash Automated Testing System
https://github.com/bats-core/bats-core
sudo apk add bats-corebats-core-doc 1.13.0-r0
Bash Automated Testing System (documentation)
https://github.com/bats-core/bats-core
sudo apk add bats-core-docbats 1.13.0-1
Bash Automated Testing System
https://github.com/bats-core/bats-core
sudo pacman -S batsbats-core
sudo port install bats-corebats 1.11.1-1
bash automated testing system
https://github.com/bats-core/bats-core
sudo apt install batsbats
nix profile install nixpkgs#batsbats 1.10.0-1
bash automated testing system
https://github.com/bats-core/bats-core
sudo apt install batsbats 1.13.0-r1
Meta package for Bats
https://bats-core.readthedocs.io/
sudo apk add batsbats 1.13.0-3.fc44
Bash Automated Testing System
https://github.com/bats-core/bats-core
sudo dnf install batsbats 1.13.0-1.1
Bash Automated Testing System
https://github.com/bats-core/bats-core/
sudo zypper install bats来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.