Packages
Fleet is a Bun monorepo. The root package.json declares two
workspace globs — packages/* and apps/* — so every directory below is a
workspace resolved by name (git-bun, fleet-ship, …) rather than by relative
path.
Four of these packages are general-purpose libraries with no Fleet-specific
knowledge: git-bun, tmux-bun, bun-vt, and webterm. They are documented
here as libraries, with their own API pages. The rest are the Fleet services
themselves, documented under Concepts and
Reference.
Workspaces
Section titled “Workspaces”| Workspace | Role |
|---|---|
packages/git-bun |
Typed, directory-bound wrapper around the git CLI. Every handle is confined to one working directory. |
packages/tmux-bun |
Typed, headless wrapper around the tmux CLI. Every handle is confined to its own private tmux server. |
packages/bun-vt |
Pure-TypeScript VT terminal emulator: escape-sequence parser plus screen/grid model. No native code, no FFI. |
packages/webterm |
The JSON-over-WebSocket terminal protocol plus the server-side bridge that turns a PTY into streamed grid snapshots. |
packages/fleet-protocol |
The shared contract — Zod schemas and types for workspaces, repos, ships, agent status, events, and config — imported by the ship, bridge, client, and CLI. See Protocol reference. |
packages/fleet-ship |
The per-host daemon. Owns repos, workspaces, tmux sessions, and the workspace HTTP + WebSocket API. See Ships and the Ship API. |
packages/fleet-bridge |
The fleet-wide orchestrator: one endpoint fronting many ships, with automatic routing and a persisted ship roster. See Bridge and the Bridge API. |
packages/fleet-client |
The React web GUI (canvas terminal, workspace tree, diff view) and the Bun server that serves it. See Web GUI. |
apps/cli |
The fleet binary — a Commander CLI over the ship and bridge APIs, plus fleet launch. See CLI reference. |
apps/docs |
This documentation site (Astro + Starlight). See Development. |
How they depend on each other
Section titled “How they depend on each other”The libraries sit at the bottom and know nothing about Fleet:
bun-vthas no dependencies at all.webtermdepends onbun-vt(to emulate the terminal server-side) andzod(to validate wire frames).git-bunandtmux-bundepend on nothing but Bun itself.
The services build on top:
fleet-shipusesgit-bun(repos and workspace clones),tmux-bun(workspace sessions),webterm(the terminal WebSocket), andfleet-protocol.fleet-bridgeusesgit-bun,fleet-ship,webterm(it proxies terminal frames rather than emulating them), andfleet-protocol.fleet-clientuseswebterm/protocol— the browser-safe, type-only half of webterm — plusfleet-protocolandfleet-bridgefor typed API access.apps/clidepends on all four services, which is what letsfleet launchstart a bridge, ships, and the GUI in one process.
Working on a package
Section titled “Working on a package”Every workspace exposes the same two scripts, and the root runs them across all workspaces at once:
bun install # once, from the repo rootbun test # every workspace's suitebun typecheck # every workspace's tsc --noEmitTo run just one package’s suite, run it from that package’s directory:
cd packages/git-bunbun testThe git-bun and tmux-bun end-to-end suites shell out to real git/tmux
binaries against throwaway directories and sockets, and skip gracefully when the
binary is not installed.