# Phorge

> Git infrastructure for coding agents, with clone-free APIs and standard Git over HTTPS.

Phorge is Git infrastructure for coding agents. It gives agents a clone-free API for reading files, creating commits, managing branches, and inspecting history. Standard Git clone, fetch, and push over HTTPS remain available.

Repositories stay available through the same API and Git URLs when work pauses. Nothing is removed merely for being idle.

[Create a namespace](https://platform.phorge.net/signup) or [sign in](https://platform.phorge.net/login).

## Get started

Install the SDK with `npm install phorge`.

```ts
import { GitStorage } from "phorge";

const store = new GitStorage({
  name: "your-org",
  key: env.privateKey,
});

const repo = await store.createRepo({ id: "new-workspace" });

const result = await repo
  .createCommit({
    targetBranch: "main",
    commitMessage: "Initialize workspace",
    author: { name: "Agent", email: "agent@example.com" },
  })
  .addFileFromString("README.md", "# Hello\n")
  .send();

console.log(result.commitSha);
```

The private key stays in your process. The SDK uses it to sign short-lived, narrowly scoped JWTs. Phorge stores only the corresponding public key.

## What it supports

- File-operation and unified-diff commits in one request.
- Expected-head checks and branch-scoped credentials for concurrent agents.
- File reads, byte ranges, grep, blame, diffs, history, and tar.gz archives without cloning.
- Branch, merge, and tag operations without a working tree.
- Finite repository lifetimes, storage quotas, and usage accounting.
- Stock Git clone, fetch, and push over HTTPS.

## For agents

Phorge publishes machine-readable references alongside these pages. Every page on this site also returns Markdown when it is requested with `Accept: text/markdown`, and unknown paths return a real HTTP 404 with links to the places worth checking next.

- [llms.txt](https://phorge.net/llms.txt): a compact guide to the SDK and HTTP API written for coding agents.
- [openapi.json](https://phorge.net/openapi.json): the OpenAPI 3.1 description of the repository API.
- [HTTP API reference](https://phorge.net/docs/http) and [SDK symbol reference](https://phorge.net/docs/symbols): the complete request, response, and error surface.
- [sitemap.xml](https://phorge.net/sitemap.xml): every public page on this site.

---

Phorge is made by [The San Francisco Tooling Company](https://sf.tools/).

For inquiries, email [hi@sf.tools](mailto:hi@sf.tools). Send press inquiries to [press@sf.tools](mailto:press@sf.tools).

---

[Platform](https://platform.phorge.net/) · [Docs](https://phorge.net/docs) · [SDK](https://github.com/sf-tools/phorge) · [Status](https://phorge.net/health)
