macOS
brew install babelfishlocal Homebrew formula metadata
安装
brew install babelfishlocal Homebrew formula metadata
sudo apt install python3-babelfishDebian stable package indexes · python3-babelfish · 来源: deb.debian.org
nix profile install nixpkgs#babelfishnixpkgs package indexes · babelfish · 来源: raw.githubusercontent.com
概览
Translate bash scripts to fish
历史
babelfish is a small command-line translator that converts bash shell snippets or scripts into fish shell code. Its README frames it as a faster alternative to running bash-backed compatibility layers every time fish needs to source shell setup code.
The project was created by Bouke Haarsma to avoid relying on fish-foreign-env or bass for repeated bash process execution. Instead, babelfish parses shell code with mvdan.cc/sh and emits equivalent fish code where possible.
The public GitHub releases show a 1.0.0 release in January 2021, a 1.1.0 release shortly after, and a 1.2.0 release in June 2023. The README still describes limitations, including untranslated variables such as BASH_SOURCE and incomplete arithmetic-expression support.
babelfish's adoption is niche and shell-specific. The README documents Homebrew and Go installation, and the package metadata in this batch shows Homebrew and Nix packaging for this Go-based translator.
Its practical audience is fish users who need to consume bash-oriented environment setup scripts, version-manager hooks, or shell snippets without leaving fish or spawning bash repeatedly.
Users pipe bash code into babelfish and can then inspect or source the generated fish code. The README demonstrates translating a function, exporting SSH_AUTH_SOCK, setting local variables, and using a shell hook to source bash-oriented setup scripts in fish.
Because its translation coverage is incomplete, babelfish is best treated as a pragmatic bridge for common shell setup patterns rather than a perfect bash interpreter.
babelfish is package-nerd interesting in the small-tool sense: it exists to smooth over the mismatch between package ecosystems that ship bash activation scripts and users who prefer fish.
It also shows a common CLI pattern in modern packaging: take a mature parser library, here mvdan.cc/sh, and wrap it in a focused translator that solves one irritating shell integration problem.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
babelfish | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/bouk/babelfish
安装元数据
| 软件包键 | brew:babelfish |
|---|---|
| 版本 | 1.2.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/babelfish |
| 主页 | https://github.com/bouk/babelfish |
| 仓库 | https://github.com/bouk/babelfish |
| 上游文档 | https://github.com/bouk/babelfish#readme |
| 许可证 | MIT |
| 源码归档 | https://github.com/bouk/babelfish/archive/refs/tags/v1.2.1.tar.gz |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | The shell hook has been installed, you can use it by running: $ source $HOMEBREW_PREFIX/share/fish/vendor_functions.d/babel.fish |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | babelfish |
| 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 软件包链接分开显示。
python3-babelfish 0.6.1-1
library to work with countries and languages (Python 3)
https://github.com/Diaoul/babelfish
sudo apt install python3-babelfishbabelfish
nix profile install nixpkgs#babelfishpython3-babelfish 0.6.0-2
library to work with countries and languages (Python 3)
https://github.com/Diaoul/babelfish
sudo apt install python3-babelfish来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.