Skip to content

About

A GitHub-compatible git forge: smart-HTTP git, REST v3, GraphQL and MCP in a single TypeScript file (Node stdlib only).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-core-clone-01 — a GitHub-compatible git forge

SPDX-License-Identifier: MIT

A single-file implementation (app.ts) of the core of a git forge, built only on the Node.js standard library:

  • Git smart HTTP — upload-pack protocol v2 (capability advertisement, ls-refs, fetch with shallow/deepen and incremental object selection) and v0, receive-pack v0 with report-status, fast-forward enforcement and real packfile reading/writing (including delta resolution). No git binary: the object model, pkt-lines and pack format are implemented directly.
  • REST v3 — repos, contents, branches, commits, git refs, labels, issues, comments and pull requests (list / files / squash-merge with a three-way tree merge and conflict reporting), GitHub-shaped errors, Link pagination.
  • GraphQL v4 — viewer, repository, issues/pulls connections with cursors, node(id:) round-trips, introspection for the documented types, and the createIssue / closeIssue / createPullRequest / mergePullRequest / addComment mutations (including batched operations).
  • MCP — streamable-HTTP JSON-RPC with server/discover, initialize and six tools (create_repo, get_repo, create_issue, list_issues, create_pull_request, merge_pull_request) over the same store as REST.

State is held in memory: repositories, objects and refs in Maps keyed by content hash. The entry process (main.ts) binds an ephemeral port, registers it with the environment, and serves until told the trial is done.

About

A GitHub-compatible git forge: smart-HTTP git, REST v3, GraphQL and MCP in a single TypeScript file (Node stdlib only).

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages