pr_01m47d15m3e54sn21z27rpy5n9/README.md

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