Automic VaultAutomic Vault

brew

使用 Homebrew, apk, MacPorts, pacman, apt, dnf, Nix, zypper 安装 bats-core

查看 bats-core 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install bats-core

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install bats-core

MacPorts ports tree · sysutils/bats-core/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add bats-core

Alpine Linux edge package indexes · bats-core · 来源: dl-cdn.alpinelinux.org

Arch Linux pacman已验证 · 92%
sudo pacman -S bats

Arch Linux sync databases · bats · 来源: geo.mirror.pkgbuild.com

Debian apt已验证 · 92%
sudo apt install bats

Debian stable package indexes · bats · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install bats

Fedora Rawhide package metadata · bats · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#bats

nixpkgs package indexes · pkgs/by-name/ba/bats/package.nix · 来源: api.github.com

openSUSE zypper已验证 · 92%
sudo zypper install bats

openSUSE Tumbleweed package metadata · bats · 来源: download.opensuse.org

概览

软件包摘要

Bash Automated Testing System

命令和别名

  • bats

历史

项目历史与用法

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.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 1 个平台目标。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

可执行文件

已安装的可执行文件

命令类型暴露范围备注
batscli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本1.14.0
管理器更新时间2026-07-22
本地数据OK
上游当前
检测到的最新版本v1.14.0

https://github.com/bats-core/bats-core

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键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
Pulseupdated
Bottle可用 (于 all)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namebats-core
Aliases
  • bats
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

apk95%

bats-core 1.13.0-r0

Bash Automated Testing System

https://github.com/bats-core/bats-core

sudo apk add bats-core
  • License: MIT
  • Architecture: x86_64
  • Source Package: bats-core
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Bats Core
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: bats-core from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

bats-core-doc 1.13.0-r0

Bash Automated Testing System (documentation)

https://github.com/bats-core/bats-core

sudo apk add bats-core-doc
  • License: MIT
  • Architecture: x86_64
  • Source Package: bats-core
  • normalized package name match
  • 匹配方式:Bats Core
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: bats-core-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
pacman95%

bats 1.13.0-1

Bash Automated Testing System

https://github.com/bats-core/bats-core

sudo pacman -S bats
  • License: MIT
  • Architecture: any
  • 4 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Bats Core
Arch Linux sync databases · geo.mirror.pkgbuild.com · Arch Linux sync databases: bats from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz
MacPorts95%

bats-core

sudo port install bats-core
  • normalized package name match
  • 匹配方式:Bats Core
MacPorts ports tree · api.github.com · MacPorts ports tree: sysutils/bats-core/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
Debian apt92%

bats 1.11.1-1

bash automated testing system

https://github.com/bats-core/bats-core

sudo apt install bats
  • Section: devel
  • Architecture: all
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式:Bats
Debian stable package indexes · deb.debian.org · Debian stable package indexes: bats from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix92%

bats

nix profile install nixpkgs#bats
  • installed executable or alias match
  • 匹配方式:Bats
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ba/bats/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt92%

bats 1.10.0-1

bash automated testing system

https://github.com/bats-core/bats-core

sudo apt install bats
  • Section: universe/shells
  • Architecture: all
  • 1 可选依赖
  • installed executable or alias match
  • 匹配方式:Bats
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: bats from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk92%

bats 1.13.0-r1

Meta package for Bats

https://bats-core.readthedocs.io/

sudo apk add bats
  • License: MIT
  • Architecture: x86_64
  • Source Package: bats
  • 1 依赖
  • installed executable or alias match
  • 匹配方式:Bats
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: bats from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf92%

bats 1.13.0-3.fc44

Bash Automated Testing System

https://github.com/bats-core/bats-core

sudo dnf install bats
  • License: MIT
  • Category: Unspecified
  • Architecture: noarch
  • Source Package: bats
  • 3 依赖
  • 1 提供
  • installed executable or alias match
  • 匹配方式:Bats
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: bats from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst
zypper92%

bats 1.13.0-1.1

Bash Automated Testing System

https://github.com/bats-core/bats-core/

sudo zypper install bats
  • License: MIT
  • Category: Development/Tools/Other
  • Architecture: noarch
  • Source Package: bats
  • 2 依赖
  • 1 提供
  • installed executable or alias match
  • 匹配方式:Bats
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: bats from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment