Skip to content

Enroute — git hosting as an API

Enroute - Your repo, your rules.

Enroute is open-source, headless git infrastructure built for agentic workloads. It terminates git client connections, stores repositories in object storage, and calls your application back when it needs a decision. Every rule and workflow is code you own, on infrastructure you run.

Code hosting is the last piece of the software stack still stuck in SaaS. No settings pages, no YAML, no OAuth apps, no webhooks to reconcile: your application answers four hooks and calls a gRPC API. That is the whole contract.

npx skills add enroute-sh/enroute             # give your coding agent the skills
docker pull ghcr.io/enroute-sh/enroute:latest # or run the image yourself

Website · Documentation · Thesis · Hook reference

Built for: agent code hubs · software factories · CI clones · embedded versioning · GitHub gateways

What it looks like

Protect main from direct pushes. Enroute stores the pushed objects, then asks your application to judge each ref update before it moves anything:

// Adapted from docs/build/05-process-pushes.md
export async function preReceive(req: PreReceiveRequest) {
  return {
    judgements: req.commands.map((command) => ({
      refname: command.refname,
      ...(command.refname === "refs/heads/main"
        ? refuse("main is protected, open a merge request instead")
        : allow),
    })),
  };
}

What happens on git push:

sequenceDiagram
    participant Git as git client
    participant E as Enroute
    participant App as your application
    participant S as object storage

    Git->>E: push acme/widgets.git
    E->>App: authorize (path, credentials)
    App-->>E: repo-4f2a1c, write access
    E->>S: store pack objects
    E->>App: pre_receive (ref updates)
    App-->>E: allow or refuse, per ref
    E->>S: move allowed refs
    E->>App: post_receive (what landed)
    App-->>E: messages for the terminal
    E-->>Git: ok / rejected
Loading

Enroute is stateless. It needs PostgreSQL for metadata and an object store (S3, Google Cloud Storage, or Azure Blob Storage) for everything else. There are no disks to back up, no replicas to sync, and no shards to route.

Start here

  • Quickstart — a repository served in about ten minutes
  • Build a code hosting platform — from an empty project to code and diffs on a page, chapter by chapter
  • Patterns — protected branches, merge queues, CI on push, mirroring, deploy keys, and more
  • Concepts — the model, the hooks, and the storage, in four short pages

Featured

  • enroute — the git backend, in Rust. Git smart HTTP, four hooks (authorize, visible_refs, pre_receive, post_receive), and a gRPC API. Published as ghcr.io/enroute-sh/enroute.

Status

Enroute is early. We use it ourselves, but read the limitations and security pages before you serve anything you care about. There is no backwards compatibility between 0.x releases.

Next on the roadmap: SSH and git:// transports, fast checkout for agent sandboxes, published benchmarks, and first-class git-meta support.

Community

Contributing

Pull requests are disabled. Send a git format-patch attachment to patches@enroute.sh. See How can I contribute? for what we ask of a patch.

License

Enroute is licensed under Apache-2.0.

Pinned Loading

  1. enroute enroute Public

    Open-source, fully headless and completely customizable git infrastructure built for agentic workloads. Apply any workflow you can write in code in your own stack.

    Rust 55 1

Repositories

Showing 2 of 2 repositories
  • .github Public
    enroute-sh/.github's past year of commit activity
    0 0 0 0 Updated Sep 23, 2026
  • enroute Public

    Open-source, fully headless and completely customizable git infrastructure built for agentic workloads. Apply any workflow you can write in code in your own stack.

    enroute-sh/enroute's past year of commit activity
    Rust 55 Apache-2.0 1 0 0 Updated Sep 10, 2026

Top languages

Rust

Most used topics

Loading…