# Install babelfish with Homebrew, apt, Nix

Translate bash scripts to fish. Version 1.2.1 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:babelfish
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install babelfish
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install python3-babelfish
```

  Evidence: Debian stable package indexes: python3-babelfish from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#babelfish
```

  Evidence: nixpkgs package indexes: babelfish from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## Package facts

- **Package key:** brew:babelfish
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/babelfish>
- **Version:** 1.2.1
- **Source summary:** Translate bash scripts to fish
- **Homepage:** <https://github.com/bouk/babelfish>
- **Repository:** <https://github.com/bouk/babelfish>
- **Upstream docs:** <https://github.com/bouk/babelfish#readme>
- **License:** MIT
- **Source archive:** <https://github.com/bouk/babelfish/archive/refs/tags/v1.2.1.tar.gz>
- **Generated:** 2026-07-08T18:08:21+00:00

## Executables

- babelfish (cli)
- babelfish (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Caveats: The shell hook has been installed, you can use it by running: $ source $HOMEBREW_PREFIX/share/fish/vendor_functions.d/babel.fish
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.2.1
- Local data: ok
- Upstream repository: https://github.com/bouk/babelfish
- Upstream latest detected: v1.2.1 (current)
- info: No package-manager update timestamp was available.
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 2021: babelfish 1.0.0 is released on GitHub.
- 2021: babelfish 1.1.0 follows with continued maintenance.
- 2023: babelfish 1.2.0 is released on GitHub.
- 2026: Package metadata in this batch shows babelfish still present in Homebrew and Nix.

### Related projects

- fish is the target shell for generated output.
- bash is the source shell language babelfish translates from.
- fish-foreign-env and bass are named by the README as earlier approaches babelfish was intended to avoid for performance reasons.
- mvdan.cc/sh provides the shell parser used by babelfish.

### Sources

- <https://api.github.com/repos/bouk/babelfish/releases>
- <https://github.com/bouk/babelfish>
- input.json source_facts.package-manager


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- Debian apt - python3-babelfish - 0.6.1-1: normalized package name match | Debian stable package indexes: python3-babelfish from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library to work with countries and languages (Python 3) | https://github.com/Diaoul/babelfish
- Nix - babelfish: normalized package name match | nixpkgs package indexes: babelfish from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - python3-babelfish - 0.6.0-2: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-babelfish from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library to work with countries and languages (Python 3) | https://github.com/Diaoul/babelfish


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [jump](https://www.automicvault.com/pkg/brew/jump/) - Shares av.db curated category or tags: cli, developer-tools, fish, shell.
- [aliae](https://www.automicvault.com/pkg/brew/aliae/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [argc](https://www.automicvault.com/pkg/brew/argc/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [atuin](https://www.automicvault.com/pkg/brew/atuin/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [atuin-server](https://www.automicvault.com/pkg/brew/atuin-server/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [bar](https://www.automicvault.com/pkg/brew/bar/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [bash-language-server](https://www.automicvault.com/pkg/brew/bash-language-server/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [bashdb](https://www.automicvault.com/pkg/brew/bashdb/) - Shares av.db curated category or tags: cli, developer-tools, shell.
- [powerline-go](https://www.automicvault.com/pkg/brew/powerline-go/) - Local package facts share a topical domain. Shared terms: bash, cli, developer, developer-tools, fish.

## Combined YAML source

View the package source record on GitHub. [combined/babelfish.yml](https://github.com/automic-vault/db/blob/main/combined/babelfish.yml)


## Sources

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