Arch Linux
Download the .pkg.tar.zst asset from the latest release.
sudo pacman -U ./bai-*.pkg.tar.zst
Describe what you want in plain language. bai returns a
proposed shell command, copies it to your clipboard, and leaves the
final decision to you. No auto-run. No chat sprawl. Just a fast path
from intent to command.
bai does one job: turn a natural-language shell request
into a command shaped for your environment. It includes lightweight
context such as shell, OS, and current directory so the output fits
your machine instead of a generic tutorial example.
~/.config/bai/.
Use --shell when editor launchers or wrappers obscure the
parent process. Use --strict when guessing is the wrong
move. Use --show-config when you need to see exactly what
runtime state bai resolved.
--explain
Sends a short reason to stderr while keeping stdout pipeline-safe.
--json
Returns machine-readable output for wrappers, editors, and tooling.
prompt.md
Append your own command preferences without touching the source tree.
Pull a release package if you just want the binary. Build from source if you want to hack on it, read the Crystal code, or generate the API docs. BYOK for Anthropic or OpenAI. Releases are available on GitHub.
Download the .pkg.tar.zst asset from the latest release.
sudo pacman -U ./bai-*.pkg.tar.zst
Download the .deb asset, then install the package.
sudo dpkg -i ./bai_*.deb
sudo apt-get install -f
Download the .rpm asset. Use DNF on Fedora, or allow the unsigned local package on openSUSE.
sudo dnf install ./bai-*.rpm
sudo zypper install --allow-unsigned-rpm ./bai-*.rpm
Requires Crystal and just.
git clone https://github.com/trans/bai
cd bai
just install
bai count lines of Crystal code in src
bai find files modified in the last day
bai show the largest 10 files under home
~/.config/bai/provider
~/.config/bai/anthropic_api_key
~/.config/bai/openai_api_key
~/.config/bai/shell
~/.config/bai/prompt.md
Bind bai to Alt-Enter and rewrite your current prompt
buffer in place. Type the request, hit the keybinding, edit if
needed, then run it.
fish: bind \e\r bai-replace
bash: bind -x '"\e\r": _bai_replace'
zsh: bindkey '^[^M' _bai_replace
docs/api/ and ship with the site.
bai uses AI as a command-generation assistant, not as an
operator. It proposes one command, shows it to you, and leaves review,
editing, and execution in human hands.
bai was vibe coded, but it is intentionally small, with a
narrow surface area and tests around the user-facing behavior. Any bugs
are my responsibility: design, review, and release judgment still live
on the human side of the equation.