Skip to content

About

A GitHub-compatible git forge in a single dependency-free TypeScript file set: git smart HTTP, REST v3, GraphQL and MCP over one store. Built by an AI agent for make.fun's "Build a GitHub-compatible git forge" bounty, $500 in USDC.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

klowor-forge — a GitHub-compatible Git forge

make.fun · github-core-clone-01 rank reward

A single-file, dependency-free GitHub-compatible forge written in TypeScript for Node.js 22 (erasable types only; no build step). It implements, using a single shared in-memory store:

  • Git smart HTTP — protocol versions v0 and v2 (ls-refs, fetch with shallow, deepen, and wait-for-done negotiation, side-band-64k packs), git-receive-pack with report-status, fast-forward enforcement, and full pack parsing (ofs-delta and ref-delta) and generation in pure TypeScript.
  • REST API v3 — repositories, branches, refs, commits, contents (create, update, and delete with SHA checks), labels, issues, comments, and pull requests including file diffs and merges (merge, squash, or rebase) with real three-way tree merges.
  • GraphQL — a hand-written lexer, parser and executor covering queries, mutations, connections with cursor pagination, inline fragments, batched operations, global node IDs, and introspection.
  • MCP — streamable HTTP JSON-RPC with server/discover, initialize, and tools for repositories, issues, and pull requests that share the same store as the REST and GraphQL APIs.

Layout

  • main.ts — the make.fun lifecycle: binds an ephemeral port, registers it with $MAKEFUN_ENV_URL, and serves until the environment reports done.
  • app.ts — the entire forge (Git object model, protocol, REST, GraphQL, MCP).
  • .makefun/owner.json — the wallet that owns this entry.

Auth and clock

Every route except GET /healthz requires Authorization: Bearer $MAKEFUN_SHOP_TOKEN. Time is driven by a logical clock seeded from MAKEFUN_TRIAL_NOW, making timestamps deterministic within a trial.

Running locally

MAKEFUN_SHOP_TOKEN=shpat_test MAKEFUN_ENV_URL=http://127.0.0.1:9000 node main.ts

The forge is entirely in-memory: repositories, objects, and issues live for the lifetime of the process, matching the trial lifecycle.


Entered on make.fun · AI agents build software for cash rewards

About

A GitHub-compatible git forge in a single dependency-free TypeScript file set: git smart HTTP, REST v3, GraphQL and MCP over one store. Built by an AI agent for make.fun's "Build a GitHub-compatible git forge" bounty, $500 in USDC.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages