跳到主要內容

Forge: Stop the 'Agent War' in Your Repo | Forge:別讓 AI Agent 在你的 Repo 裡打群架

From chaotic diffs to structured lifecycles: Orchestrating multiple AI coding agents with isolated worktrees. | 從混亂的 Diff 到結構化生命週期:利用隔離工作區協調多個 AI 編碼 Agent。

🔎 工具速覽 / AT A GLANCE

CategoryAI Agent Workflow Engine / DevTools
PricingFree (MIT License)
BestForTeams deploying multiple AI agents (Claude, Gemini, etc.) on a single codebase who are tired of merge conflicts.
GitHub Stars⭐ 39

🚀 引言 / Introduction

各位在科技業修 Bug 修到肝指數爆表的工程師們,想像一下這個場景:你剛請 Claude Code 幫你重構完一個模組,結果隔壁的小明又叫 Gemini 進來修個 Fast-fix,最後你發現兩個 AI 在同一個檔案裡打架,留下一堆像亂碼一樣的 Merge Conflict。這不是在寫程式,這是在玩『誰才是最強 AI』的生存遊戲。老闆還在旁邊問:『為什麼 AI 這麼強,開發速度卻沒變快?』

Actually, the problem isn't the LLM's intelligence, but the 'collision' of their workspaces. Enter **Forge**. If traditional AI coding is like letting five chefs share one cutting board, Forge is like giving every chef their own professional station and a head chef (you) to approve the final dish before it hits the table. It turns the chaotic 'prompt-and-pray' approach into a structured task lifecycle.

🛠️ 核心功能 / Key Features

Forge 不是另一個簡單的 AI Wrapper,它是一個『AI 協作工作流引擎』。它的核心邏輯很簡單但強大:**一個任務,一個隔離的 Git Worktree**。

1. **Isolated Worktrees (隔離工作區)**:不再有『我的 AI 把我的本地修改蓋掉了』這種慘劇。每個 Task 都在獨立的目錄運行,Claude、Gemini 或你自定義的 Shell Agent 可以同時開工,互不干擾。這就像是在辦公室給每個 AI 分配獨立的工位,而不是讓他們擠在同一個螢幕前搶鍵盤。

2. **Structured Lifecycle (結構化生命週期)**:定義了 `todo → in_progress → review → merging → done` 的明確路徑。AI 做完事不能直接 Push 到 main(除非你瘋了),必須經過 Review Gate。這讓 AI 的行為變得可預測,而不是像個不聽話的實習生,隨便改一行就讓整個 Production 崩潰。

3. **BYO Agent (自定義 Agent 接入)**:無論你是 Claude Code 的信徒,還是 Gemini 的擁護者,Forge 提供一組 Adapter 讓你輕鬆接入。甚至你可以寫個簡單的 Shell 腳本把它變成 Agent。這種靈活性讓你可以根據任務難度選擇『用最貴的模型做架構,用便宜的模型跑單元測試』,省下預算去買下午茶雞排。

💡 技術亮點 / Tech Highlights

從系統設計的角度來看,Forge 最令人驚艷的是它的 **'Local-first, Single Binary'** 設計。在那個所有東西都要上雲、要訂閱 SaaS 的時代,Forge 給了我們一個 SQLite + 單一執行檔的純淨方案。它不僅內建了 REST API,還支持 MCP (Model Context Protocol) 接口,這意味著你可以直接把 Forge 變成你的 IDE 插件後端。

對於我們這種被『老闆要求今天下班前要看到 Demo』折磨的顧問來說,Forge 的 Review Runner 才是救星。它將 CI 檢查(如 Lint, Test)強制嵌入在 Merge 之前。這意味著 AI 如果沒過測試,就永遠不能進入 main 分支。我們終於可以把『AI 寫的 Bug 太多』這個鍋,直接甩回給 AI 讓它自己修到過為止,而不需要我們在深夜兩點盯著螢幕流淚。

In short, Forge is the 'Operating System' for AI coding agents. It solves the concurrency problem of LLMs interacting with a shared file system, ensuring that the speed of AI doesn't lead to the speed of technical debt accumulation.

📦 快速上手 / Quick Start

想要快速體驗?別在 README 迷路,直接看這裡:

1. **Install**: 下載單一執行檔或透過 npm 安裝 `@forgeailab/forge`。

2. **Start**: 執行 `forge-ctl start` 啟動伺服器(本地-first,不用擔心資料外流到雲端)。

3. **Configure**: 設定你的 AI Agent Adapter (例如 Claude Code API key)。

4. **Create Task**: 透過 Web UI 或 CLI 建立一個 Task $ ightarrow$ 觀察 Forge 自動為你開闢一個 Worktree $ ightarrow$ 讓 AI 開始 Coding $ ightarrow$ 通過 CI $ ightarrow$ 人工點擊 Merge。

English Version:1. **Install**: Download the binary or run `npm install @forgeailab/forge`.2. **Start**: Launch the server using `forge-ctl start` (local-first, no cloud leak).3. **Configure**: Set up your Agent Adapters (e.g., Claude Code API keys).4. **Execute**: Create a task via Web UI/CLI $ ightarrow$ Watch Forge spin up an isolated worktree $ ightarrow$ Let the AI code $ ightarrow$ Pass CI $ ightarrow$ Human merge.

準備好試試 Forge: Stop the 'Agent War' in Your Repo | Forge:別讓 AI Agent 在你的 Repo 裡打群架 了嗎?

Ready to try Forge: Stop the 'Agent War' in Your Repo | Forge:別讓 AI Agent 在你的 Repo 裡打群架?

前往 GitHub 頁面 →

KLOOK 客路

身為開發者,工欲善其事必先利其器。這款精選工具能顯著提升您的生產力與開發體驗。 | Boost your development workflow.

查看詳情 | Discover More

留言

這個網誌中的熱門文章

text-to-cad: 讓 AI 驅動的參數化 CAD 建模成為現實 / text-to-cad: Bringing AI-Driven Parametric CAD Modeling to Reality

一個讓 AI 代理能生成、預覽並迭代 3D CAD 模型的開源框架 / An open-source harness for AI agents to generate, preview, and iterate 3D CAD models. 🔎 工具速覽 / AT A GLANCE Category AI-Powered CAD Tooling / AI 驅動 CAD 工具 Pricing Free (Open Source) / 免費(開源) BestFor Robotics engineers and product designers using AI coding agents / 使用 AI 程式碼代理的機器人工程師與產品設計師 GitHub Stars ⭐ 93 🚀 引言 / Introduction text-to-cad 是一個強大的開源框架,旨在填補大型語言模型(LLM)與專業 3D 建模之間的鴻溝。它允許開發者利用 Claude Code 或 Codex 等 AI 代理,透過程式碼生成精確的參數化幾何模型,並提供即時預覽與迭代能力。 text-to-cad is a powerful open-source harness designed to bridge the gap between Large Language Models (LLMs) and professional 3D modeling. It enables developers to leverage AI agents like Claude Code or Codex to generate precise parametric geometry via code, providing real-time preview and iteration capabilities. 🛠️ 核心功能 / Key Features 與 Codex 或 Claude Code 等代理...

kimiflare:將 Moonshot Kimi-K2.6 直接部署於 Cloudflare 的終端 AI 編碼助手 | kimiflare: A Terminal Coding Agent Powered by Moonshot Kimi-K2.6 on Cloudflare

無需中繼,在你的 Cloudflare 帳戶中直接運行強大的 Kimi 終端編碼智能體。 | No middleman, run the powerful Kimi terminal coding agent directly on your own Cloudflare account. 🔎 工具速覽 / AT A GLANCE Category AI Coding Agent / Developer Tool Pricing Free (Open-weight model / Cloudflare Workers AI pricing) BestFor Developers seeking a private, high-context terminal AI assistant with direct infrastructure control. GitHub Stars ⭐ 36 🚀 引言 / Introduction kimiflare 是一款為開發者量身打造的終端編碼智能體,它將 Moonshot 的 1 兆參數開源模型 Kimi-K2.6 與 Cloudflare Workers AI 完美結合。不同於傳統 AI 工具,kimiflare 讓流量直接在你的 Cloudflare 帳戶中流動,徹底擺脫第三方代理或 AI 閘道的束縛,實現最高等級的控制力與隱私。 | kimiflare is a terminal coding agent tailored for developers, seamlessly combining Moonshot's 1T-parameter open-source model Kimi-K2.6 with Cloudflare Workers AI. Unlike traditional AI tools, kimiflare routes traffic directly through your Cloudflare account, eliminating the n...

Orca Skills: 開源賦能,加速雲安全工作流

加速雲安全工作流 - Orca Skills 整合多種工具與插件,打造高效安全環境 | Accelerate Cloud Security Workflows with Orca Skills, a Suite of Tools and Plugins 🔎 工具速覽 / AT A GLANCE Category 开源安全工具 Pricing 开源免费 BestFor 雲安全团队、DevSecOps工程师 GitHub Stars ⭐ 33 🚀 引言 / Introduction 在雲端環境中,確保安全不僅是一種技術挑戰,更是對工作效率的一場考驗。Orca Skills 是一款專為加速 Orca 云平台安全工作流而設計的开源插件工具包。透過整合多種工具和插件,幫助我們在複雜的安全環境下保持高效率。 🛠️ 核心功能 / Key Features Orca Skills 提供了一系列功能強大的安全工作流工具,包括警報處理、影響分析、配置源頭追溯等。這些工具不僅能夠幫助我們快速定位問題,還能確保在解決問題時避免造成不必要的後續問題。 💡 技術亮點 / Tech Highlights Orca Skills 真正的亮點在于其開放性與兼容性。它不僅支持Anthropic Claude Code、Cursor 和 Codex,還能夠與 MCP(Orca Security)集成,為安全團隊提供全面的支持。 📦 快速上手 / Quick Start 要快速開始使用 Orca Skills,首先需要安裝所需環境和工具。接下來,配置 MCP 以實現與 Orca Cloud Platform 的集成。最後,測試各個技能插件以確保其正常運行。 中英文對照: 要快速開始使用 Orca Skills 首先需要安裝所需環境和工具 接著配置 MCP 以實現與 Orca 云平台的集成 最...