fleet is a single Go binary that runs coding agents (Claude Code, Codex, Gemini CLI, a plain shell) in tmux sessions on a server. Your other machines on the LAN can start, watch, stop and type into them from the CLI or a web dashboard. I built this, so read what follows as a self-review.
Why I starred it
I got tired of agents dying with my laptop lid. An agent should live on a box that stays on, and I should be able to check on it from a phone. Existing options wrapped the agent in a chat UI. I wanted the real CLI, in a real terminal, that I can attach to when the dashboard isn't enough.
The commit log shows features landing every few days: teams, file copy between machines (fleet cp), ticket intake from Rome, GitHub-backed projects. It moves fast.
How it works
The core decision: the agent always runs its own TUI inside tmux. Fleet never wraps it. Everything else is optional, and internal/adapter/adapter.go shows how. Adapter has six methods: ID, DisplayName, Capabilities, Detect, Launch and HandleHook. Every other feature is a separate small interface you opt into: Transcripter for the chat view, Asker for questions answered in a dashboard form, Limiter for usage-limit resume, SkillDirer for shared skills. An adapter that implements none of them still works, which is why the shell adapter is the simplest example.
State detection is the part I'm happiest with. Fleet doesn't scrape the terminal to guess whether an agent is working. It injects hooks and translates events. In internal/adapter/claude/hooks.go the whole mapping is one switch:
case "UserPromptSubmit":
u.State = fleetv1.AgentState_AGENT_STATE_WORKING
case "PermissionRequest":
u.State = fleetv1.AgentState_AGENT_STATE_NEEDS_INPUT
u.Detail = callSummary(p)
case "PostToolUseFailure":
// An interrupt (Esc) ends the whole turn, not just this call.
u.State, u.Call = fleetv1.AgentState_AGENT_STATE_WORKING, callSummary(p)
if p.IsInterrupt {
u.State, u.Call = fleetv1.AgentState_AGENT_STATE_IDLE, ""
}
The comments above that function are a list of Claude Code's quirks: Esc fires no Stop hook, /compact ends without one, a refused subagent permission ends in no hook at all. Each quirk has its own commit. A recent one is fix(claude): count a subagent's SubagentHandback as its end, because Claude Code 2.1.331 ends a subagent with that tool call and no end_turn (internal/adapter/claude/agents.go:16). Where hooks run out, there are screen-based fallbacks: PromptDetector, DialogDetector and WorkDetector read the visible tmux screen for the cases hooks don't report, like the folder trust dialog.
The second piece is pairing. internal/identity/pairing.go issues an 8-character Crockford base32 code (40 bits). The client proves it knows the code with an HMAC over the server's certificate fingerprint and its own public key:
func PairProof(code string, serverFP, devicePub []byte) []byte {
return pairMAC("fleet-pair-v1", code, serverFP, devicePub)
}
The code never crosses the wire, and the proof is bound to the server cert, so a man in the middle can't replay it. Only one code is live at a time (Issue clears the book), because a captured proof could be brute-forced offline otherwise. Redeem invalidates codes after 5 failed attempts. After pairing, devices pin the server's identity. This is a small piece of code and I'd stand behind it.
The wire protocol is protobuf over TLS (proto/fleet/v1/fleet.proto, 1,296 lines), documented in docs/PROTOCOL.md for a native macOS client that doesn't exist yet.
Using it
curl -fsSL https://raw.githubusercontent.com/floscom/fleet/main/install.sh | sh
fleet start --root ~/code # daemon in the background
fleet ls # agents on this machine
fleet attach <agent> # full TUI, detach with Ctrl-\
fleet web # admin links for the dashboard
fleet service install writes a systemd user unit and turns on lingering, since systemd would otherwise kill the agents at logout. Each agent gets its own git worktree by default, and Docker sandboxing is a flag away. Agents survive daemon restarts: the daemon re-adopts running tmux sessions, and auto-update waits until no agent is working before it swaps its own binary.
Rough edges
I read this repo as if someone else wrote it, and these stand out.
internal/web/static/app.jsis 9,661 lines. One file, no build step, no modules. It works, and I can find things with grep, but nobody else is going to enjoy it.- Coupled to Claude Code internals. The Claude adapter references specific Claude Code versions (2.1.280, 2.1.323, 2.1.331) in comments. When those hook semantics change, the state machine breaks quietly. The tests in
claude_test.gocover the mapping, but they only encode what I've seen. - Linux first. The README says macOS works but is "less tested". There's no Windows story.
- The README is 1,063 lines. Everything is documented, and that makes the important parts hard to find. A short quick-start is missing.
- Self-update trusts
checksums.txtfrom the same release. That catches corruption but not a compromised release. There's no signature. - No native client yet. Phone use means the web dashboard in a browser.
There are 99 _test.go files across daemon, hub, gateway, adapter and e2e, which is decent for a project this young. I didn't run them.
Bottom line
If you run several coding agents on a home server or a LAN box and want real terminals plus a phone-friendly view, fleet does that with one binary and no cloud. If you want a polished product or Windows support, not yet.
