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. 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
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.