Files
blog/fork-dont-build.html
T

333 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Fork, Don't Build: How We Modified Gitea, Pi, and Godot Instead of Starting from Scratch — Tinqs Blog</title>
<meta name="description" content="Everyone is building new AI developer tools. We forked three battle-tested open-source projects — Gitea, Pi, and Godot — and modified them from the inside. Combined changes: less than 0.5% of upstream code.">
<meta name="robots" content="index, follow">
<link rel="canonical" href="https://www.tinqs.com/blog/fork-dont-build">
<meta property="og:type" content="article">
<meta property="og:url" content="https://www.tinqs.com/blog/fork-dont-build">
<meta property="og:title" content="Fork, Don't Build: How We Modified Gitea, Pi, and Godot Instead of Starting from Scratch">
<meta property="og:description" content="Fork Gitea. Fork Pi. Fork Godot. Modify platforms, don't build toys.">
<meta property="og:image" content="https://www.tinqs.com/img/og-cover.jpg">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Fork, Don't Build: How We Modified Gitea, Pi, and Godot Instead of Starting from Scratch">
<meta name="twitter:description" content="Fork Gitea. Fork Pi. Fork Godot. Modify platforms, don't build toys.">
<meta name="twitter:image" content="https://www.tinqs.com/img/og-cover.jpg">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "Fork, Don't Build: How We Modified Gitea, Pi, and Godot Instead of Starting from Scratch",
"datePublished": "2026-05-25",
"author": {
"@type": "Person",
"name": "Ozan Bozkurt"
},
"publisher": {
"@type": "Organization",
"name": "Tinqs Limited",
"url": "https://www.tinqs.com"
},
"description": "Everyone is building new AI developer tools. We forked three battle-tested open-source projects — Gitea, Pi, and Godot — and modified them from the inside. Combined changes: less than 0.5% of upstream code."
}
</script>
<style>
/* ── Self-contained post styles (Studio provides site chrome) ── */
:root {
--c-accent: #c9935a;
--c-accent-l: #d4a87c;
--c-bg: #0d1117;
--c-text: #e6edf3;
--c-muted: #9aa7b4;
--c-border: #2a3340;
--c-blue: #38bdf8;
--c-purple: #a855f7;
--c-gold: #f59e0b;
--c-code-bg: #1c2230;
--c-pre-bg: #0a0e14;
}
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
padding: 0;
background: transparent;
color: var(--c-text);
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
/* ── Post container ── */
.post {
max-width: 720px;
margin: 0 auto;
padding: 40px 24px 48px;
}
/* ── Back link ── */
.post__back {
color: var(--c-blue);
text-decoration: none;
font-size: 0.9rem;
display: inline-block;
margin-bottom: 24px;
}
.post__back:hover { color: var(--c-purple); }
/* ── Gradient title ── */
.post__title {
background: linear-gradient(90deg, #c9935a, #f59e0b 40%, #38bdf8);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
font-weight: 800;
font-size: 2.2rem;
line-height: 1.25;
margin: 0 0 16px;
}
/* ── Date pill ── */
.post__date {
display: inline-block;
font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
font-size: 0.72rem;
letter-spacing: 0.22em;
text-transform: uppercase;
color: var(--c-blue);
border: 1px solid rgba(147, 140, 129, 0.25);
border-radius: 999px;
padding: 4px 14px;
margin-bottom: 16px;
}
/* ── Lead ── */
.post__lead {
color: var(--c-muted);
font-size: 1.08rem;
line-height: 1.7;
}
/* ── Body ── */
.post__body { font-size: 1rem; line-height: 1.7; }
.post__body p { margin: 14px 0; }
.post__body h2 {
font-size: 1.7rem;
margin: 54px 0 6px;
padding-left: 16px;
border-left: 4px solid var(--c-accent);
line-height: 1.3;
}
.post__body h3 {
color: var(--c-purple);
font-size: 1.18rem;
margin: 30px 0 4px;
}
.post__body h4, .post__body h5, .post__body h6 {
margin: 20px 0 4px;
}
/* ── Inline code ── */
.post__body code {
font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
font-size: 0.86em;
background: var(--c-code-bg);
color: #9fe6c0;
padding: 2px 6px;
border-radius: 5px;
border: 1px solid var(--c-border);
}
/* ── Code blocks ── */
.post__body pre {
background: var(--c-pre-bg);
border: 1px solid var(--c-border);
border-radius: 10px;
padding: 16px 18px;
overflow-x: auto;
margin: 14px 0;
font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;
font-size: 0.85rem;
line-height: 1.55;
color: var(--c-text);
}
.post__body pre code {
background: transparent;
padding: 0;
border: none;
font-size: inherit;
color: inherit;
border-radius: 0;
}
/* ── Blockquote ── */
.post__body blockquote {
background: rgba(245, 158, 11, 0.08);
border: 1px solid rgba(245, 158, 11, 0.25);
border-left: 4px solid var(--c-gold);
border-radius: 0 12px 12px 0;
padding: 16px 18px;
margin: 18px 0;
color: #f4e3c4;
font-size: 0.94rem;
}
/* ── Links ── */
.post__body a { color: var(--c-blue); }
.post__body a:hover { color: var(--c-purple); }
/* ── Strong ── */
.post__body strong { color: var(--c-gold); }
/* ── HR ── */
.post__body hr {
border: none;
border-top: 1px solid var(--c-border);
margin: 32px 0;
}
/* ── Figures ── */
.post__body figure { margin: 20px 0; }
.post__body figure img {
max-width: 100%;
border-radius: 12px;
border: 1px solid var(--c-border);
}
.post__body figcaption {
color: var(--c-muted);
font-size: 0.85rem;
margin-top: 6px;
}
/* ── Lists ── */
.post__body ul, .post__body ol { padding-left: 1.5em; margin: 10px 0; }
.post__body li { margin: 4px 0; }
/* ── Author ── */
.post__author {
display: flex;
align-items: center;
gap: 14px;
margin-top: 48px;
padding-top: 24px;
border-top: 1px solid var(--c-border);
}
.post__author-avatar {
width: 48px;
height: 48px;
border-radius: 50%;
background: var(--c-accent);
color: var(--c-bg);
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.85rem;
flex-shrink: 0;
}
.post__author-info {
font-size: 0.85rem;
color: var(--c-muted);
line-height: 1.4;
}
.post__author-name {
color: var(--c-text);
font-weight: 600;
}
</style>
</head>
<body>
<!-- POST -->
<article class="post">
<a href="/blog/" class="post__back">&larr; All Posts</a>
<span class="post__date">25 May 2026</span>
<h1 class="post__title">Fork, Don't Build: How We Modified Gitea, Pi, and Godot Instead of Starting from Scratch</h1>
<p class="post__lead">The AI developer tools space is full of people building new things. New agents, new IDEs, new platforms, new wrappers. Meanwhile, the tools that actually run the world — git servers, game engines, CI runners — sit there unchanged, waiting for someone to open them up and let AI agents in.</p>
<div class="post__body">
<p>We forked three of them. Gitea for git hosting. Pi for coding agents. Godot for the game engine. Combined changes: less than 0.5% of upstream code. Here's why, how, and what we learned.</p>
<h2>The 0.5% Rule</h2>
<p>We're four people. We can't build a git platform, a coding agent, or a game engine from scratch. Nobody can — not in a timeframe measured in months.</p>
<p>But we can take something that already works — something with years of battle-testing and thousands of contributors — and change the last half-percent that makes it ours. The pattern:</p>
<p>1. Find open-source tool that does 95% of what you need</p>
<p>2. Fork it</p>
<p>3. Add the 5% (really, 0.5%)</p>
<p>4. Stay close to upstream so their fixes are your fixes</p>
<p>Across three forks, we've never touched more than 0.5% of upstream code. If your fork hits 1%, you're doing too much — either the upstream tool is wrong for the job, or you're not trusting it enough.</p>
<h2>Fork 1: Gitea → Tinqs Studio</h2>
<p>Gitea is a self-hosted git server. Single Go binary, MIT license, 45k GitHub stars. We used GitHub for two years. It was fine for docs. For the game repo — 12GB in LFS, growing weekly — it was untenable. LFS bandwidth limits, slow clones, $5/50GB pricing. And nobody on the team could <strong>see</strong> what changed. A PR modifying a <code>.glb</code> file showed a binary diff. No preview. The artist pushed, the developer approved blindly, and three days later someone noticed the normals were inverted.</p>
<p>We forked Gitea and built <a href="https://tinqs.com" style="color: var(--c-accent-l);">Tinqs Studio</a>. Our changes:</p>
<p><strong>3D asset preview.</strong> Click a <code>.glb</code>, <code>.gltf</code>, or <code>.fbx</code> file in a PR and rotate the model in your browser. 22 formats supported via O3DV. This alone transformed our review process — the artist pushes, the lead inspects, nobody downloads anything.</p>
<p><strong>HTML file preview.</strong> Sandboxed iframe rendering. Our internal docs and game design pages look like websites, not raw source.</p>
<p><strong>Agent API.</strong> Six REST endpoints that let AI agents submit tasks, push code, check CI status, and open PRs. Agents are first-class users of the git platform, not bolt-on tools.</p>
<p><strong>LFS-first workflows.</strong> Auto-tracking on repo creation. Game file extensions (<code>.fbx</code>, <code>.glb</code>, <code>.png</code>, <code>.wav</code>) tracked by default. Storage dashboard per repo. Clone times went from 45 minutes to 3 minutes.</p>
<p><strong>OAuth2 SSO.</strong> One login for git, the game tools, and the team dashboard.</p>
<p>Total lines changed: about 2,000 out of Gitea's 500,000. We modify templates, add Go modules, tweak CSS. We <strong>never</strong> touch the database schema — upstream owns that, and we ride their migrations.</p>
<p>The alternative was building a git platform from scratch. Multi-year project, multi-million dollar budget. Or using GitHub/GitLab and accepting their limitations. Neither gives you the ability to embed agents directly into the platform.</p>
<h2>Fork 2: Pi → Agent Runtime with Game Tools</h2>
<p><a href="https://pi.dev" style="color: var(--c-accent-l);">Pi</a> is an open-source coding agent by Mario Zechner. MIT license, TypeScript, minimal by design — four core tools (read, write, edit, bash) and an extension system. 51k stars.</p>
<p>We forked it and added four extensions, each a single TypeScript file:</p>
<ul>
<li><strong>tinqs-provider</strong> — routes inference through our DeepSeek V4 proxy ($0.28/MTok vs Opus at $15/MTok)</li>
<li><strong>tinqs-tools</strong> — Gitea REST API, fal.ai image generation, vision model access</li>
<li><strong>tinqs-ci</strong> — reads CI pipeline status, fetches build logs, polls for completion</li>
<li><strong>tinqs-guardrail</strong> — 29 safety patterns blocking dangerous commands</li>
</ul>
<p>The core Pi code is untouched — 900 lines of extensions added to a 15,000-line codebase. Agents get Gitea-native tools without a fork of the entire agent ecosystem.</p>
<p>The alternative: building our own agent from scratch — tool-calling logic, context management, streaming, retry handling, conversation threading. Months of work to reinvent what Pi already does.</p>
<h2>Fork 3: Godot → Agent-Aware Game Engine</h2>
<p><a href="https://godotengine.org" style="color: var(--c-accent-l);">Godot</a> is the open-source game engine powering our survival colony sim. We forked 4.6.2 and added nine C++ modules that give agents direct access to the running game:</p>
<ul>
<li><strong>agent_api</strong> — HTTP server inside the engine so agents can query game state</li>
<li><strong>agent_vision</strong> — screenshot capture for AI vision pipelines</li>
<li><strong>agent_console</strong> — programmatic console access</li>
<li><strong>agent_replay</strong> — record and replay game sessions for testing</li>
</ul>
<p>These compile into the engine binary. A vanilla Godot user never sees them. An agent connects over HTTP, takes a screenshot, reads the scene tree, executes a console command — all without touching the editor UI.</p>
<p>2,000 lines added to a 2-million-line engine. The alternative: building our own engine, or worse, writing a renderer instead of making a game.</p>
<h2>Why forking beats building</h2>
<p><strong>You inherit decades of work, for free.</strong> Gitea has handled millions of git pushes. Godot renders millions of frames. Pi has processed millions of LLM tokens. That battle-testing is yours when you fork. When you build from scratch, year one is spent rediscovering bugs fixed upstream in 2019.</p>
<p><strong>You get free maintenance.</strong> Every upstream release brings security patches, performance improvements, and new features — written by hundreds of contributors you don't pay. Your job is to rebase, resolve conflicts, and test. An afternoon, not a quarter.</p>
<p><strong>You stay focused.</strong> Building a git server means worrying about pack-file format, SSH key management, webhook delivery. Forking means you only think about the 0.5% that matters to you. The other 99.5% is someone else's problem.</p>
<p><strong>Agents work better on real platforms.</strong> An agent pushing to a real Gitea instance — with real CI, real code review, real permissions — produces work humans can actually review and ship. An agent pushing to a toy demo platform produces demos.</p>
<h2>What we're not building</h2>
<p>We're not building a new IDE (Cursor and Claude Code exist). Not a new LLM (DeepSeek and Claude exist). Not a new cloud platform (AWS exists).</p>
<p>We're building the layer that connects them. The git server that speaks agent. The coding agent that speaks Gitea. The game engine that speaks HTTP. Each fork is a bridge between an existing tool and the agentic future — not a replacement for either.</p>
<p>The age of agents doesn't need more agents. It needs better platforms. Platforms that already exist as open-source projects. They just need someone to fork them and add the wiring.</p>
<hr>
<p><em><a href="https://tinqs.com" style="color: var(--c-accent-l);">Tinqs Studio</a> is our Gitea fork, open for game teams. <a href="https://arikigame.com" style="color: var(--c-accent-l);">Ariki</a> is the game we're building with every tool described here.</em></p>
</div>
<div class="post__author">
<div class="post__author-avatar">OB</div>
<div class="post__author-info">
<span class="post__author-name">Ozan Bozkurt</span><br>
CTO & Developer, Tinqs
</div>
</div>
</article>
</body>
</html>