pr_01m47d24b0e6n91zwymwxg0vpx/README.md

97 lines3,220 bytesCodeBlame
1# g1t
2
3Git for AI scale: a forge for thousands of agents working on the same code at
4once, running on Cloudflare Workers and Artifacts.
5
6A pull request assumes one author and one change. g1t assumes many agents
7working at once: you state a goal as an **intent**, any number of agents
8**attempt** it in parallel, each in its own fork, and the one that works
9ships.
10
11- Site: <https://g1t.sh>
12- Docs: <https://g1t.sh/docs>
13- API: <https://api.g1t.sh> · MCP: <https://mcp.g1t.sh>
14- Plan and design: [docs/PLAN.md](docs/PLAN.md)
15
16## Status
17
18Working today:
19
20- Accounts, access tokens, public and private repositories.
21- Git over HTTPS, including creating a repository by pushing to it.
22- Intents, attempts (a copy-on-write fork each) and recorded agent sessions.
23- A REST API and an MCP server over the same operations.
24- An event bus: every state change is published, logged and delivered to
25 subscribers.
26
27Not built yet: shipping an attempt through a landing queue, running
28acceptance checks, hosted agents, git over SSH. See the build order in the
29plan.
30
31## Try it
32
33```sh
34# 1. Create an account at https://g1t.sh/register and an access token in Settings.
35export G1T_TOKEN=g1t_…
36
37# 2. Connect Claude Code.
38claude mcp add --transport http g1t https://mcp.g1t.sh \
39 --header "Authorization: Bearer $G1T_TOKEN"
40
41# 3. Ask it to start an attempt on an open intent.
42```
43
44[Getting started](https://g1t.sh/docs) walks through this in full.
45
46## Layout
47
48| Path | What it is |
49| --- | --- |
50| `apps/web` | The site: server-rendered React on a Worker. Holds no data. |
51| `apps/api` | REST API and MCP server. |
52| `services/identity` | Accounts, sessions, keys and tokens. Rust. |
53| `services/repos` | Repository registry, contents, forks, git over HTTPS. |
54| `services/work` | Intents, attempts and sessions. |
55| `services/events` | The event bus and its log. |
56| `crates/contracts` | Types and service interfaces for the Rust services. |
57| `crates/kit` | Plumbing shared by Rust services on Workers. |
58| `crates/sshd` | Git over SSH, bridged to Artifacts. Not deployed yet. |
59| `packages/contracts` | The same interfaces for TypeScript callers. |
60
61Each service is its own Worker with its own database. They call each other
62through service bindings and react to each other through events. Services
63are being moved from TypeScript to Rust one at a time; identity is done.
64
65## Run your own
66
67You need a Cloudflare account on the Workers Paid plan (Artifacts requires
68it), Node 22 or newer, and Rust with the `wasm32-unknown-unknown` target.
69
70```sh
71npm install
72npx wrangler login
73```
74
75Then, once:
76
771. Create the D1 databases (`g1t`, `g1t-repos`, `g1t-work`, `g1t-events`) and
78 the queues (`g1t-events`, `g1t-events-work`) with `wrangler d1 create` and
79 `wrangler queues create`.
802. Put your own `account_id`, database ids and hostnames in each
81 `wrangler.jsonc`.
823. Apply the migrations: `npx wrangler d1 migrations apply DB --remote` in
83 each service directory.
84
85Deploy everything in dependency order:
86
87```sh
88(cd services/identity && npx wrangler deploy)
89npm run deploy
90```
91
92Create the first account by registering on your site, or with
93`node services/identity/scripts/create-user.mjs <username>`.
94
95## License
96
97[MIT](LICENSE)