macOS
brew install batlocal Homebrew formula metadata
sudo port install batMacPorts ports tree · textproc/bat/Portfile · 来源: api.github.com
安装
brew install batlocal Homebrew formula metadata
sudo port install batMacPorts ports tree · textproc/bat/Portfile · 来源: api.github.com
sudo apk add batAlpine Linux edge package indexes · bat · 来源: dl-cdn.alpinelinux.org
sudo dnf install batFedora Rawhide package metadata · bat · 来源: dl.fedoraproject.org
nix profile install nixpkgs#batnixpkgs package indexes · pkgs/by-name/ba/bat/package.nix · 来源: api.github.com
sudo pacman -S batArch Linux sync databases · bat · 来源: geo.mirror.pkgbuild.com
sudo zypper install batopenSUSE Tumbleweed package metadata · bat · 来源: download.opensuse.org
choco install BatChocolatey community package catalog · Bat · 来源: community.chocolatey.org
scoop install main/batScoop official bucket manifest trees · bucket/bat.json · 来源: api.github.com
winget install --id sharkdp.bat -eWindows Package Manager source index · sharkdp.bat · 来源: cdn.winget.microsoft.com
概览
Clone of cat(1) with syntax highlighting and Git integration
历史
bat is a Rust command-line file viewer that deliberately starts from cat(1) and adds syntax highlighting, Git modification markers, automatic paging, line numbers, and integration hooks for other terminal tools.
bat's first GitHub release, v0.1.0, was published on April 22, 2018 as an initial release. The project describes itself as a cat(1) clone with syntax highlighting and Git integration, and its README states goals of advanced highlighting, Git integration, POSIX-cat replacement behavior, and a friendlier command-line interface.
The tool has stayed in the familiar Unix-filter shape rather than becoming an editor. Its README documents both pretty terminal output and fallback behavior for non-interactive output, where bat acts as a drop-in cat-style concatenator.
By the v0.25.0 release, bat was still adding practical terminal features such as squeeze-blank support, ANSI stripping, shell completions, theme behavior, and broader syntax handling, showing a mature utility polishing edge cases rather than changing identity.
bat became one of the canonical modern Rust CLI replacements, helped by packaging across Homebrew, Debian, Ubuntu, Fedora, Arch, Alpine, Nix, MacPorts, Chocolatey, Scoop, winget, and other systems listed in the input metadata and upstream README.
The README notes that Ubuntu has carried bat since 20.04 and Debian since Bullseye, with older Debian-family releases installing the executable as batcat because of a package-name clash. That rename became part of bat's package-manager lore.
The repository's GitHub page showed roughly 59.5k stars and 43 releases at enrichment time, making bat far more than a niche wrapper.
bat is commonly used directly as `bat FILE`, as a pager-backed file viewer, as a syntax-colored stdin renderer, as a git-aware diff context viewer, and as a cat replacement when invoked in non-interactive pipelines.
The README documents integrations with fzf previews, find or fd, ripgrep through batgrep, tail -f log viewing, git show, git diff helpers, and clipboard workflows where plain output matters.
bat is significant because it helped define the 2010s/2020s style of polished Rust command-line utilities: familiar Unix nouns, fast single binaries, colorful defaults, Git awareness, good package-manager coverage, and careful degradation in pipes.
For package nerds, it is also a naming and policy specimen. The Debian/Ubuntu batcat period shows how a simple binary name can collide with existing packages, forcing downstream-visible aliases and workarounds even for a very popular tool.
It matters culturally because many later CLI packages pitch themselves in the same grammar: a small classic Unix command, rebuilt with syntax awareness, colors, Git context, and modern ergonomics.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
/etc/bat/configC:\ProgramData\bat\config可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
bat | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/sharkdp/bat
安装元数据
| 软件包键 | brew:bat |
|---|---|
| 版本 | 0.26.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/bat |
| 主页 | https://github.com/sharkdp/bat |
| 仓库 | https://github.com/sharkdp/bat |
| 上游文档 | https://github.com/sharkdp/bat#readme |
| 许可证 | Apache-2.0 OR MIT |
| 源码归档 | https://github.com/sharkdp/bat/archive/refs/tags/v0.26.1.tar.gz |
| 最后更新 | 2026-06-22T14:02:51-07:00 |
| Pulse | updated |
| 依赖 | libgit2, oniguruma |
| 构建依赖 | pkgconf, rust |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bat |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
bat 0.25.0-2+b2
cat(1) clone with syntax highlighting and git integration
https://github.com/sharkdp/bat
sudo apt install batbat
nix profile install nixpkgs#batbat 0.24.0-1build1
cat(1) clone with syntax highlighting and git integration
https://github.com/sharkdp/bat
sudo apt install batbat 0.26.1-r0
cat(1) clone with wings
https://github.com/sharkdp/bat
sudo apk add batbat-bash-completion 0.26.1-r0
Bash completions for bat
https://github.com/sharkdp/bat
sudo apk add bat-bash-completionbat-doc 0.26.1-r0
cat(1) clone with wings (documentation)
https://github.com/sharkdp/bat
sudo apk add bat-docbat-fish-completion 0.26.1-r0
Fish completions for bat
https://github.com/sharkdp/bat
sudo apk add bat-fish-completionbat-zsh-completion 0.26.1-r0
Zsh completions for bat
https://github.com/sharkdp/bat
sudo apk add bat-zsh-completionbat 0.26.1-1.fc45
Cat(1) clone with wings
sudo dnf install batbat 0.26.1-2
Cat clone with syntax highlighting and git integration
https://github.com/sharkdp/bat
sudo pacman -S batbat 0.26.1-1.3
A cat(1) clone with syntax highlighting and Git integration
https://github.com/sharkdp/bat
sudo zypper install batbat-bash-completion 0.26.1-1.3
Bash completion for bat
https://github.com/sharkdp/bat
sudo zypper install bat-bash-completionbat-fish-completion 0.26.1-1.3
Fish completion for bat
https://github.com/sharkdp/bat
sudo zypper install bat-fish-completionbat-zsh-completion 0.26.1-1.3
Zsh completion for bat
https://github.com/sharkdp/bat
sudo zypper install bat-zsh-completionbat
sudo port install batBat
choco install Bat来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.