Skip to content
PostHogPublic

About

Fleet engine: one command sets up T3 Code, agents and opt-in workflow packs

Resources

Code of conduct

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

PostHog Hedge

Start on your Mac: Hedge and T3 Code run there, and agent threads work in their own worktrees. Grow to any Linux VM, such as AWS EC2, Hetzner, a Coder workspace, or a box at home, where agents keep working while your Mac sleeps. One always-on Linux VM can be your hub: it adds the other VMs and keeps the secrets of your packs. Every machine reads the same private profile repo on GitHub.

Start on your Mac. Grow to any Linux VM.

PostHog Hedge sets up your coding agents, Claude Code and Codex, with the rules, skills, and workflows you pick, so every thread starts the same way.

  • Starts on your Mac. One prompt in T3 Code sets up Hedge on your Mac, and your first agent threads run there.
  • Grows with your work. Add any Linux VM when you want agents that keep working while your Mac sleeps, or more agents at once.
  • One setup everywhere. Your answers live in your own private profile repo on GitHub, so every machine gets the same setup.
  • With you everywhere. Read and steer every thread from your Mac or your phone.

Watch: What Hedge is (3 min)

Lessons: What Hedge is · Build your first feature · Ship it · all lessons

Getting started

  1. Download T3 Code on your Mac, and open it. Its Welcome page sets up one agent, Claude Code or Codex, and signs you in.

  2. Paste this prompt into a new thread in T3 Code, or open it in T3 Code:

    Set up Hedge with me. Read https://raw.githubusercontent.com/PostHog/hedge/main/SETUP.md and follow it step by step.
    Where Hedge runs: this Mac
    

    From here the agent leads. It follows the Mac path of SETUP.md: it installs Hedge on your Mac, makes your private profile repo on GitHub, and applies your packs. You answer its questions and do your own sign-ins. With the Orchestration pack, type /build in a new thread and say what you want. When something breaks, hedge triage reports it.

  3. Grow to any Linux VM when you want agents that keep working while your Mac sleeps. Any Linux VM that you reach over SSH works: AWS EC2, Hetzner, a Coder workspace, or a box at home. It needs x86_64 or arm64, a login as your own user, not root, and systemd with lingering on for that user. Coder is optional. Install Hedge on one always-on VM with the get.sh line below, then log in to it again over SSH so hedge and t3 are on your PATH. Run t3 up --connect there and sign in. Pick the SSH name your machines reach it by, check it as the guide says, and make it your hub with hedge hub here <hub name>. Then add each other VM from the hub with hedge machine add <ssh host>. Turn on T3 Connect in T3 Code, in Settings → Sharing & access, to see every machine on your Mac and your phone. Getting started shows each step, with the SSH names each machine needs. Not built yet: adding a Mac over SSH, a Mac as the hub, moving an existing hub, and the MCP gateway or hub HTTPS on a Mac whose hub is not a Coder workspace. When you hit one, run hedge triage.

Packs

Base is in every Hedge. You pick the rest.

Runs on your Mac and any Linux VM

  • Base: every machine gets safety rules, the model table, T3 Code defaults, and the jobs that keep it current.
  • Quality gates: every change passes proof and a second-model review before it merges, and a risky change also passes a QA swarm.
  • Orchestration: type /build and say what you want: small work goes straight to a pull request, big work becomes a map that the thread you wrote in shapes with you and then builds on its own, and side work gets its own thread.
  • Communication: agents write in your voice, give short updates, and share plans and previews as links.
  • Guards: hooks stop risky shell commands, such as a push past review or a polling loop.
  • Memory: one private repo holds what your agents learn and what you save, and every machine reads it.
  • Integrations: Claude Code and Codex get the official GitHub, Context7, and Convex plugins, and Claude can hand work to Codex.

Needs an always-on Linux hub

  • Hub: the hub links your machines, cleans their disks, and keeps your pack secrets. Turn on recovery, and threads go on after a usage limit.
  • Slack: your own Slack message or reaction with your trigger emoji, or a mention of your Slack app, starts a T3 thread about it.
  • Paging (incident.io): an agent that watches a risky change pages you, and only you, when it goes wrong.
  • MCP gateway: the hub signs in to your MCP servers once, and agents on every Linux machine reach them through it. A Mac reaches it only when the hub is a Coder workspace.

Switch Quality gates, Orchestration, Communication, and Memory on the Hedge site, and it builds a setup prompt with your picks in it. That prompt sets up a hub and nodes on Coder; for your Mac, use the prompt above. The Packs page builds a prompt that adds packs to a Hedge you already run. Five pack pages have a short video.

Day to day

On any of your machines:

  • hedge packs lists your packs. --add <pack> or --remove <pack> turns one on or off.
  • hedge doctor checks the machine against your profile and changes nothing.
  • hedge update moves the engine and your profile forward, then applies. It prints what changed in Hedge, and from the second new Claude or Codex session on a machine, each new session tells you too. Every machine also runs it each night while Nightly updates is on.
  • hedge machine add <ssh host>, on the hub, makes a Linux machine one of your nodes: a Coder workspace or a plain Linux machine that it reaches over SSH. hedge machine remove <ssh host> takes one out. hedge devbox add and hedge devbox remove are the same commands.

Getting started shows each setup step by hand. The Slack, incident.io, and secret store docs cover those parts in depth.

Coming from Fleet

Hedge was named Fleet before. Run the Linux get.sh line below once on each Linux box that ran Fleet: it stops Fleet, copies your setup, and starts Hedge. On a Mac, the same line only stops and turns off Fleet's launchd jobs and installs nothing: Hedge does not move an earlier Fleet on a Mac yet. fleet still runs the same command. To undo the move, see Go back to Fleet.

Status

Hedge is early. No release is tagged yet, so get.sh installs main. On every pull request, CI runs the install, hedge setup, and hedge doctor as a new Linux user, and the install and hedge setup on a fresh macOS runner. The real sign-ins, T3 Connect, a real Mac, and a live Linux VM need a person, so CI does not prove them yet. The changelog lists every change since v0.1.0, released under the name Fleet.

Set it up by hand

Run get.sh as your login user, not with sudo. Run it again to pick up where it stopped: every step skips what is done.

On your Mac. Open the T3 Code app once first, so it writes its t3 command to ~/.t3/bin. On a Mac that ran Fleet, get.sh only stops Fleet's jobs and installs nothing.

export PATH="$HOME/.t3/bin:$PATH"
curl -fsSL https://raw.githubusercontent.com/PostHog/hedge/main/get.sh | sh

On any Linux VM, x64 or arm64, with curl, git, tar, sha256sum, python3, cron, and systemd's user manager. To keep T3 Code running after you log out, an administrator runs sudo loginctl enable-linger <your user> once.

curl -fsSL https://raw.githubusercontent.com/PostHog/hedge/main/get.sh | sh

get.sh installs the GitHub CLI and Bun when they are missing, and T3 Code on Linux. It fetches the engine into ~/.local/share/hedge/engine, and puts hedge on your PATH in your shell profile, so open a new shell to use it. Then hedge setup asks plain-language questions, has you sign in to GitHub and to Claude, ChatGPT, or both, saves your answers to a new private profile repo named <login>-hedge, and applies your packs. A profile you made before keeps its name, such as hedge-profile. On your next machine, setup finds the same profile.

Develop

bun install
bun run test
bun run typecheck
bun scripts/build-page.ts

The tests need jq on your PATH. The last command writes the site to site/. GLOSSARY.md holds the words Hedge uses.

License

MIT. See LICENSE.

About

Fleet engine: one command sets up T3 Code, agents and opt-in workflow packs

Resources

Code of conduct

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages