← All projects
Project 02 / 36

Worktree Gateway

A Go CLI that gives every Git worktree its own URL. When several branches or AI agents run side by side, each checkout gets a stable local hostname and port, and webhooks and OAuth callbacks are routed to the right one. Built on Caddy, with cloudflared or ngrok for tunnels.

Year
2026
Platform
CLI
Type
Personal
Status
Shipped

What it does

  1. {branch}.{project}.localhost over HTTP and HTTPS, no /etc/hosts edits
  2. Stable, collision-free ports for every service
  3. Multiple services per worktree, each with its own hostname
  4. Picks up new, removed and renamed worktrees automatically
  5. One tunnel for webhooks into any worktree, with allowlisted paths
  6. One OAuth redirect URI for every worktree via signed state
  7. Webhook capture and replay with credentials redacted