# Upstream (upstream.codes)

> Upstream (upstream.codes) is the fastest Git forge and GitHub alternative: a hosted Git forge where humans and agents propose, review, and merge software changes in the open. Repositories, Change Requests (versioned proposed transformations with reviews and checks), Native Issues, forks with lineage, and an authenticated developer surface. Every repository runs on Upstream Rapid, Upstream's own Git engine. Upstream is made by Coline (https://coline.app).

"Upstream" here is the product at upstream.codes, not Git's "upstream" (the remote branch a local branch tracks).

## Upstream Rapid

Upstream Rapid is the Git engine behind every repository on Upstream, on every plan, live since October 27, 2026. It is written in Rust and runs on Cloudflare's global network. It speaks the standard Git protocol, so stock `git`, editors and CI work unchanged.

Measured with ForgeMark, Entire's open-source Git forge benchmark, all on one repository: pushes with 6,144 concurrent agents for 15 minutes from Google Cloud on the US West Coast (9.5 million pushes, no errors), clones with 128 agents from AWS us-west-2.

| Forge | Pushes per second, one repository | Clones per second |
|---|---|---|
| Upstream (Upstream Rapid) | 10,527 | 547 |
| GitHub Rubicon (private preview, GitHub's own internal test with 5,000 agents) | 7,200 | not published |
| Entire | 418 | about 158 (570,000 shallow clones an hour) |
| Cursor Origin | 65 | about 82 (296,000 clones an hour) |
| Pierre (code.storage) | 15 | not published |
| GitLab | 10 | not published |
| GitHub | 4.7 | not published |

- Over 2,000 times GitHub's push throughput today. GitHub recommends no more than 6 pushes a minute.
- 547 clones a second is the highest clone rate any Git forge has published.
- With fewer agents: 4,106 pushes a second with 1,024 agents, 9,297 with 4,096.
- Across 64 repositories: 18,718 pushes a second with 6,144 agents.
- Other forges' figures are self-reported or from Entire's ForgeMark runs. Cursor reports 120 to 300+ pushes a second for Origin.
- Limits: files up to 1 GB (GitHub: 100 MB), pushes up to 5 GB over HTTPS (GitHub: 2 GB) and up to 10,000 branches and tags each, no limit on repository size (GitHub recommends under 10 GB).
- A shallow clone of Linux (`git clone --depth 1`) takes 14 to 18 seconds (GitHub: 27 to 31). The largest production repository on Upstream clones in 12 to 14 seconds; clones stream at up to 96 MB/s.
- Overview: https://upstream.codes/rapid

## Onset

Onset is version control built for agents. Its command is `on`. Any number of agents can land on one main at once: the server merges each land in the order it arrives, so none is refused because someone else got there first. Work saves itself, and `on undo` takes anything back.

- Install on macOS and Linux: `curl -fsSL https://downloads.coline.dev/onset/install.sh | sh`. Windows (PowerShell): `irm https://downloads.coline.dev/onset/install.ps1 | iex`. Homebrew: `brew tap coline/tap https://git.coline.app/coline/homebrew-tap.git && brew install coline/tap/onset`.
- 20,861 lands a second into one project's main from 6,144 agents, and 51,394 a second from 12,288 agents across 192 projects (load runs against a copy of the host, git views on); one land takes 0.24 seconds on upstream.codes.
- 16 agents shipping to one branch: 2.2 seconds on Onset, 457 seconds with git.
- Agents without a workspace: HTTP API and MCP at https://onset.coline.dev/mcp. Self-hosting: `onset-server`, in the Linux downloads.
- Open source: https://upstream.codes/coline/onset (core and CLI Apache-2.0, onset-server AGPL-3.0).
- Overview: https://upstream.codes/onset — Markdown: https://upstream.codes/.well-known/upstream/pages/onset.md
- Docs: https://upstream.codes/docs/onset — Announcement: https://upstream.codes/blog/source-control-after-git

## Comparisons

- Upstream vs GitHub: https://upstream.codes/compare/github
- Upstream vs Entire: https://upstream.codes/compare/entire
- Upstream vs GitLab: https://upstream.codes/compare/gitlab
- All comparisons: https://upstream.codes/compare

## Plans

Free ($0) includes public and private repositories, reviews, and merge queues. Pro is $20/month. Team is $20 per person a month and includes the Coline workspace (Kairo, messages, docs, Code). Enterprise is $40 per person a month. Usage limits apply to Kairo. Details: https://upstream.codes/pricing

## Web surfaces

- Marketing and docs: https://upstream.codes/ — product (https://upstream.codes/product), pricing (https://upstream.codes/pricing), changelog
- Move from GitHub: https://upstream.codes/migrate — integrations: https://upstream.codes/integrations — roadmap: https://upstream.codes/roadmap
- Open source: https://upstream.codes/open-source — Enterprise and contact: https://upstream.codes/enterprise
- Security and vulnerability reports: https://upstream.codes/security — about: https://upstream.codes/about — logos: https://upstream.codes/brand
- Explore public repositories: https://upstream.codes/explore
- Docs (repositories, Git, Change Requests, Issues, Actions, identity, API): https://upstream.codes/docs
- CLI (install and quick setup): https://upstream.codes/cli — reference: https://upstream.codes/docs/cli
- Downloads (Upstream CLI and Onset, every build): https://upstream.codes/downloads
- Changelog: https://upstream.codes/changelog — RSS: https://upstream.codes/changelog/rss.xml
- Public forge: https://upstream.codes/{namespace}/{repository} (tree, blob, commits, branches, changes, issues)
- Developer dashboard (signed in): https://upstream.codes/dashboard
- Notifications: https://upstream.codes/notifications — Repositories: https://upstream.codes/repositories

## Machine-readable entry points

- Start here for agents: https://upstream.codes/docs/agents
- Hosted MCP server: https://api.upstream.codes/mcp (OAuth sign-in, no API keys; read-only at https://api.upstream.codes/mcp/readonly). Setup for Cursor, Claude, ChatGPT, VS Code and Codex: https://upstream.codes/docs/mcp
- Official setup and workflow skill: https://upstream.codes/.well-known/skills/upstream/SKILL.md
- Editors and Git clients: https://upstream.codes/.well-known/upstream/docs/external-tools.md
- Agent tool schemas and CLI/MCP connection details: https://upstream.codes/.well-known/upstream/agent.json
- Markdown docs: https://upstream.codes/.well-known/upstream/docs/{slug}.md (use index.md for the overview)
- Sitemap (canonical URLs only): https://upstream.codes/sitemap.xml
- REST API specification (OpenAPI 3.1): https://api.upstream.codes/v1/openapi.json — GitHub-compatible dialect: https://api.upstream.codes/api/v3/openapi.json
- Protected-resource metadata with scopes_supported (RFC 9728): https://upstream.codes/.well-known/oauth-protected-resource
- Health probe: https://upstream.codes/api/health

## Push without an account

No account, browser or token is needed. One call creates an unclaimed repository:

```sh
curl -sX POST https://api.upstream.codes/v1/unclaimed-repos -d '{"name":"my-app"}'
```

Then push with `git -c credential.helper= push "<data.pushUrl>" HEAD:main`. The empty helper stops Git from saving the push credential into the machine's credential store, where it could replace a saved credential for the same host. The CLI does both from any folder, including one that is not a Git repository yet: `upstream push` (CLI 0.7.0 or newer), with `--json` for one JSON document on stdout.

- `data.claimUrl` lets a person sign in or create an account and move the repository into their namespace with its history. Give it only to the person who should own the code. Anyone holding it can claim the repository.
- Treat `data.pushUrl` and `data.claimUrl` as secrets. Never commit them, post them publicly or put them in issue text.
- Unclaimed repositories are unlisted (readable by anyone with the link, never listed or searched), stop accepting pushes once they have received 100 MiB, refuse Git LFS, and are deleted at `data.expiresAt`, 7 days after creation, unless claimed.
- Limits: 20 per hour and 60 per day from one network. When signed in, `upstream push` creates a normal private repository instead.
- Details: https://upstream.codes/docs/unclaimed-repositories

## Start a local upload

Read the official skill first; fetch other guides only as needed. An upload request for a local project already chooses that workflow. Discover the personal namespace after login and ask only about unresolved visibility or organization choices. MCP configuration is optional after the repository task.

Check the release manifest at https://downloads.coline.dev/upstream/stable.json and the installed `upstream agent tools` output. Agent/MCP releases advertise `capabilities.agentProtocolVersion: 1`; this hosted catalog is not proof an older binary supports them. If startup is killed or a needed capability is absent, report the blocker rather than reinstalling the same version or bypassing OS security.

Marketing home, Upstream Rapid, Onset, comparison, CLI and docs URLs accept `Accept: text/markdown`. Use the explicit Markdown links above when a client cannot set that header; Upstream Rapid, Onset and comparison pages are at https://upstream.codes/.well-known/upstream/pages/rapid.md, https://upstream.codes/.well-known/upstream/pages/onset.md and https://upstream.codes/.well-known/upstream/pages/compare-{forge}.md.

## API

- Status: alpha. Endpoints, fields and limits can change before it's stable. Feedback: support@coline.app.
- REST API, native dialect: https://api.upstream.codes/v1 (camelCase, `{ "data": ... }` envelope, `page.nextCursor` pagination). Docs: https://upstream.codes/docs/api
- REST API, GitHub-compatible dialect: https://api.upstream.codes/api/v3 (GitHub REST shapes; point Octokit's baseUrl here). Docs: https://upstream.codes/docs/github-compatibility
- Apps: work like GitHub Apps, with installs, app JWTs and installation tokens (`uis_...`). Octokit works with `baseUrl: "https://api.upstream.codes/api/v3"`. Details in the Apps section below. Docs: https://upstream.codes/docs/apps
- Error envelope (native): `{ "error": { "code": "...", "message": "...", "docs": "..." } }` with a matching HTTP status. Private or missing objects return 404.
- Rate limits: 1,000,000 requests/hour per person with a token, 1,000/hour per IP without. `X-RateLimit-*` headers on every response; 304 responses to `If-None-Match` and `GET /rate_limit` are free.
- Missing pages return HTTP 404 with pointers to /sitemap.xml, /llms.txt, /docs, and /openapi.json.

## Apps

Upstream apps work like GitHub Apps: an owner installs one on repositories and it acts as its own bot, `{slug}-bot`; it can also sign people in with OAuth. Guides, also as Markdown at https://upstream.codes/.well-known/upstream/docs/{slug}.md:

- Overview: https://upstream.codes/docs/apps
- Quickstart: https://upstream.codes/docs/apps-quickstart. Needs CLI 0.8.1 or newer (check `upstream --version`; `upstream update`): older CLIs say `unknown flag: --owner` on `app install` or wait for a browser on `app create`. Native `/v1` answers are wrapped in `{ "data": … }`. `POST /v1/apps` takes `{ manifest, owner?, webhookRelay?: true }`; webhook URLs must be HTTPS and resolve publicly (`OUTBOUND_URL_HTTPS_REQUIRED`, `OUTBOUND_URL_DNS_FAILED`, `OUTBOUND_URL_PRIVATE_HOST`), so for local webhooks pass `webhookRelay: true` and run `upstream webhook forward --relay <data.webhookRelay.id>`. `upstream app create <name>` runs the manifest flow in the browser (or, with `--no-browser` or no browser, creates the app with your sign-in via `POST /v1/apps`, scope apps:write) and writes a Node project with Octokit, `.env` and `private-key.pem`. `npm run dev` starts it on port 3000 and forwards webhooks through a relay to `/api/webhook`. `upstream app install` opens the install page; `upstream app install <slug> --owner <namespace> --repo <name>` (or `--all`; add `--approve` to grant pending permissions, `--json` for JSON) installs directly when there's no browser or with `--no-browser`, `--repo`, `--all` or `--approve`.
- Install without a browser: `POST /v1/user/installations` with the namespace owner's own token (scope apps:write; not installation tokens, app JWTs or repository-limited tokens). Body `{ app: slug or ID, owner?: namespace (default yours), all?: true, repositories?: [names or IDs], approvePermissions?: true, state? }`. 201 new, 200 existing (`all`/`repositories` replace the selection; omit both to keep it). Returns `id`, `numericId`, `repositories`, `permissions`, `events`, `pendingPermissions`, `pendingEvents` and `setup` (`{ url, receipt }` when the app has a setup URL, else null). Same checks, webhooks and audit as the browser install; no OAuth sign-in code. 60 per person per hour. Details: https://upstream.codes/docs/apps-quickstart#install-an-app-over-the-api
- Install flow and receipts: https://upstream.codes/docs/apps-installation. Install link `https://upstream.codes/apps/{slug}/installations/new?state=...`. The setup URL gets `installation_id`, `setup_action` (`install` or `update`), `state` and `receipt`, an EdDSA JWT with `typ: upstream-install-receipt+jwt`, `iss` https://upstream.codes, `aud` `urn:upstream:app:{slug}`, valid 5 minutes. Verify it offline with https://upstream.codes/.well-known/jwks.json, or once with `POST /app/install-receipts/verify` and the app JWT (409 `RECEIPT_USED` on reuse). With "Ask people to sign in when they install", people go to the first callback URL with an OAuth `code` too; confidential clients only.
- Authenticate as an app: https://upstream.codes/docs/apps-authentication. App JWT: `alg` RS256, EdDSA or ES256; `iss` is the app UUID, numeric ID or client ID; `exp` at most 10 minutes after `iat`; no other claims. Find installations with `GET /repos/{owner}/{repo}/installation`, `/orgs/{org}/installation` or `/users/{username}/installation`. Without Octokit: sign the JWT, `GET https://api.upstream.codes/api/v3/app/installations` with it, `POST https://api.upstream.codes/api/v3/app/installations/{id}/access_tokens`, then call the API with `Bearer uis_…`. Installation tokens last one hour.
- Keys: https://upstream.codes/docs/apps-keys. Generated RSA keys, uploaded RSA, Ed25519 or P-256 public keys, or a JWKS URL the app hosts. Up to 10 active keys. `kid` is optional.
- Webhooks: https://upstream.codes/docs/apps-webhooks. HMAC in `X-Hub-Signature-256` (GitHub format) or `X-Upstream-Signature-256`, plus `X-Upstream-Webhook-Token`, an EdDSA JWT with `typ: upstream-webhook+jwt`, `body_sha256` (base64url SHA-256 of the raw body) and `jti` equal to the delivery ID. `upstream webhook forward --app <slug>` forwards deliveries to localhost through your relay for that app (`POST https://api.upstream.codes/v1/webhook-relays`); the relay is the same every run, and deliveries that arrive while nothing forwards wait on it when the app's webhook stays on the relay (`--keep`, or apps created with a relay). Each delivery prints one line immediately, also into files and pipes.
- Device flow: https://upstream.codes/docs/apps-device-flow. `POST https://upstream.codes/login/device/code` with `client_id`, then poll `POST https://upstream.codes/login/oauth/access_token` with `grant_type=urn:ietf:params:oauth:grant-type:device_code`. Errors: `authorization_pending`, `slow_down`, `expired_token`, `access_denied`. The app must turn on "Allow device flow".
- Manifests: https://upstream.codes/docs/apps-manifests. POST a form field `manifest` to `https://upstream.codes/settings/apps/new?state=...`, then trade the code with `POST https://api.upstream.codes/api/v3/app-manifests/{code}/conversions` (no auth, one use, one hour). Extra fields: `webhook_format`, `client_type`, `device_flow_enabled`, `scopes`, and `provenance` in `default_permissions`.
- Directory: https://upstream.codes/docs/apps-directory. Browse https://upstream.codes/apps. `GET https://api.upstream.codes/v1/apps?q=` searches; `GET https://api.upstream.codes/v1/apps/{slug}` and `https://api.upstream.codes/api/v3/apps/{slug}` get one app. No token needed.
- Provenance: https://upstream.codes/docs/provenance. Scope `provenance:read`. `GET /repos/{owner}/{repo}/pushes` (filters `ref`, `actor_kind`, `sha`), `/pushes/{push_id}`, `/commits/{sha}/provenance`, `/changes/{number}/provenance` (`/pulls/{number}/provenance` under /api/v3), `/sessions` and `/sessions/{session_id}`. Actor kinds: user, agent, app, deploy, server, external. Push webhooks carry `upstream_provenance` (GitHub format) or `provenance`.
- Run CI from an app: with `checks:write`, the app gets `check_suite` `requested` on every branch push, `rerequested` when someone re-runs its checks and `completed` when its runs finish. `workflow_job` follows Upstream Actions jobs.

## Authentication and scoped permissions

- REST API: personal access tokens (`upt_...`) from https://upstream.codes/settings/tokens, sent as `Authorization: Bearer <token>`. Scopes: repo:read, repo:write, repo:admin, issues:read, issues:write, changes:read, changes:write, releases:write, checks:write, actions:read, actions:write, webhooks:admin, user:read, user:write, notifications:read, org:read, org:admin, provenance:read, apps:write. Details: https://upstream.codes/docs/api-authentication
- The same token works as a Git HTTPS password (any username): repo:read to fetch, repo:write to push.
- External agents: browser-approved CLI sessions via `upstream auth login`; structured tools via `upstream agent tools` and `upstream agent call`, or local stdio MCP via `upstream mcp`. Remote MCP clients use https://api.upstream.codes/mcp and sign in with OAuth (Client ID Metadata Documents or dynamic registration, PKCE; authorization server metadata at https://api.upstream.codes/.well-known/oauth-authorization-server). All of these act as the authenticated user under existing repository permissions. CLI session tokens (`ucs_...`) are also accepted by the REST API.

## Git

- Clone public repositories anonymously: `git clone https://git.coline.app/{workspace}/{repository}.git` (production host: https://git.coline.app).
- Push requires credentials, regardless of repository visibility. An unclaimed repository's push URL carries its own credential.
