pr_01m47d24b0e6n91zwymwxg0vpx/README.md
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| API and MCP server, Rust identity service, registration, site redesign | 1 | # g1t |
| 2 | ||
| Email verification, password reset, and Git for AI scale positioning | 3 | Git for AI scale: a forge for thousands of agents working on the same code at |
| 4 | once, running on Cloudflare Workers and Artifacts. | |
| API and MCP server, Rust identity service, registration, site redesign | 5 | |
| 6 | A pull request assumes one author and one change. g1t assumes many agents | |
| 7 | working 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 | |
| 9 | ships. | |
| 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 | ||
| 18 | Working 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. | |
| Rust repos service with shipping; pull requests kept in the model | 23 | - Shipping: landing an attempt on `main`, refused when the attempt is behind |
| 24 | so that no commit is ever lost. | |
| 25 | - Registration with email verification, and password reset. | |
| API and MCP server, Rust identity service, registration, site redesign | 26 | - A REST API and an MCP server over the same operations. |
| 27 | - An event bus: every state change is published, logged and delivered to | |
| 28 | subscribers. | |
| 29 | ||
| Rust repos service with shipping; pull requests kept in the model | 30 | Not built yet: diffs and review on the site, pull requests from branches, |
| 31 | server-side merging, running acceptance checks, hosted agents, git over SSH. See the build order in the | |
| API and MCP server, Rust identity service, registration, site redesign | 32 | plan. |
| 33 | ||
| 34 | ## Try it | |
| 35 | ||
| 36 | ```sh | |
| 37 | # 1. Create an account at https://g1t.sh/register and an access token in Settings. | |
| 38 | export G1T_TOKEN=g1t_… | |
| 39 | ||
| 40 | # 2. Connect Claude Code. | |
| 41 | claude mcp add --transport http g1t https://mcp.g1t.sh \ | |
| 42 | --header "Authorization: Bearer $G1T_TOKEN" | |
| 43 | ||
| 44 | # 3. Ask it to start an attempt on an open intent. | |
| 45 | ``` | |
| 46 | ||
| 47 | [Getting started](https://g1t.sh/docs) walks through this in full. | |
| 48 | ||
| 49 | ## Layout | |
| 50 | ||
| 51 | | Path | What it is | | |
| 52 | | --- | --- | | |
| 53 | | `apps/web` | The site: server-rendered React on a Worker. Holds no data. | | |
| 54 | | `apps/api` | REST API and MCP server. | | |
| 55 | | `services/identity` | Accounts, sessions, keys and tokens. Rust. | | |
| Rust repos service with shipping; pull requests kept in the model | 56 | | `services/repos` | Repository registry, contents, forks, landing, git over HTTPS. Rust. | |
| API and MCP server, Rust identity service, registration, site redesign | 57 | | `services/work` | Intents, attempts and sessions. | |
| 58 | | `services/events` | The event bus and its log. | | |
| 59 | | `crates/contracts` | Types and service interfaces for the Rust services. | | |
| 60 | | `crates/kit` | Plumbing shared by Rust services on Workers. | | |
| 61 | | `crates/sshd` | Git over SSH, bridged to Artifacts. Not deployed yet. | | |
| 62 | | `packages/contracts` | The same interfaces for TypeScript callers. | | |
| 63 | ||
| 64 | Each service is its own Worker with its own database. They call each other | |
| 65 | through service bindings and react to each other through events. Services | |
| Rust repos service with shipping; pull requests kept in the model | 66 | are being moved from TypeScript to Rust one at a time; identity and repos are |
| 67 | done. | |
| API and MCP server, Rust identity service, registration, site redesign | 68 | |
| 69 | ## Run your own | |
| 70 | ||
| 71 | You need a Cloudflare account on the Workers Paid plan (Artifacts requires | |
| 72 | it), Node 22 or newer, and Rust with the `wasm32-unknown-unknown` target. | |
| 73 | ||
| 74 | ```sh | |
| 75 | npm install | |
| 76 | npx wrangler login | |
| 77 | ``` | |
| 78 | ||
| 79 | Then, once: | |
| 80 | ||
| 81 | 1. Create the D1 databases (`g1t`, `g1t-repos`, `g1t-work`, `g1t-events`) and | |
| 82 | the queues (`g1t-events`, `g1t-events-work`) with `wrangler d1 create` and | |
| 83 | `wrangler queues create`. | |
| 84 | 2. Put your own `account_id`, database ids and hostnames in each | |
| 85 | `wrangler.jsonc`. | |
| 86 | 3. Apply the migrations: `npx wrangler d1 migrations apply DB --remote` in | |
| 87 | each service directory. | |
| 88 | ||
| 89 | Deploy everything in dependency order: | |
| 90 | ||
| 91 | ```sh | |
| 92 | (cd services/identity && npx wrangler deploy) | |
| Rust repos service with shipping; pull requests kept in the model | 93 | (cd services/repos && npx wrangler deploy) |
| API and MCP server, Rust identity service, registration, site redesign | 94 | npm run deploy |
| 95 | ``` | |
| 96 | ||
| 97 | Create the first account by registering on your site, or with | |
| 98 | `node services/identity/scripts/create-user.mjs <username>`. | |
| 99 | ||
| 100 | ## License | |
| 101 | ||
| 102 | [MIT](LICENSE) |