bay is a fork of the Amazon Q Developer CLI (formerly Fig), scoped to shell autocomplete. It ships a desktop app (Tauri/tao/wry, AppImage on Linux), a figterm PTY shim, and a CLI that together deliver spec-driven autocomplete in the terminal.
- q_cli (
crates/q_cli) — CLI entry point. Dispatchesinit,internal,completion,hook, diagnostics, install, settings. - fig_desktop (
crates/fig_desktop) — Desktop shell (tao + wry) hosting the autocomplete popup window. Bundled as an AppImage on Linux. - figterm (
crates/figterm) — PTY shim built onalacritty_terminalthat sits between the user's shell and the real terminal, parsing the edit buffer to drive suggestions. - Web apps (
packages/) — React/Vite dashboard (packages/dashboard-app) and autocomplete UI; built via pnpm + turborepo. - IDE integrations (
crates/fig_integrations,extensions/) — VSCode, JetBrains, GNOME shell extension IPC (Unix socket + gdbus/zbus).
crates/— Internal Rust crates (see below)packages/— pnpm workspace with dashboard + autocomplete UIproto/— Protocol buffer IPC messagesextensions/— IDE extensionsbuild-scripts/— Python build orchestration (main.py,build.py,rust.py,const.py,util.py,signing.py)build-config/— buildspec YAML for CIbundle/— Linux AppImage bundling assetstests/— Integration tests
fig_settings— SQLite-backed settings/state with migrations (r2d2/rusqlite).fig_os_shim— OS abstraction layer used by tests.
fig_proto— Protobuf message definitions.fig_ipc— Unix-socket client/server helpers.fig_remote_ipc— Cross-host IPC for SSH scenarios.fig_desktop_api— Bridge exposing Rust functionality to the webview side.
fig_install— Self-update + shell integration installer.fig_integrations— Per-shell (bash/zsh/fish) and per-IDE (VSCode/JetBrains/GNOME) integration management.
fig_util— Shared helpers (directories, terminal/shell detection, system info).fig_log— Tracing setup.fig_request— HTTP client wrapper.alacritty_terminal— Vendored terminal-grid parser used by figterm.
- Docker-based reproducible build:
build.sh→Dockerfile.build→build-scripts/main.py. - Cargo incremental caching keyed off the git commit date (
BAY_BUILD_DATETIME) so rebuilds at a stable commit reuse fingerprints. - Tauri bundling is split from the cargo build; AppImage is skipped when the existing bundle is newer than the freshly-built binary.