Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 71 additions & 1 deletion mintlify/ar/cli/config.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "أوامر Config"
description: "المزوِّدون، والتكلفة، ولوحات المعلومات، والعلامة التجارية، والأطلس، والحزمة: config وcost وdash وbrand وatlas وstack — إضافةً إلى أمرَي report وtools في الإصدار v0.19+."
description: "المزوِّدون، والتكلفة، ولوحات المعلومات، والعلامة التجارية، والأطلس، والحزمة، وتكاملات MCP الاختيارية: config وcost وdash وbrand وatlas وstack وreport وtools وintegrations."
---

تُغطّي مجموعة Config المزوِّدين، والملاحظة، ورسم الشيفرة، واكتشاف الحزمة.
Expand Down Expand Up @@ -89,3 +89,73 @@ forge report
```bash
forge tools
```

## `forge integrations`

خوادم MCP طرف ثالث اختيارية (على سبيل المثال `context7`)، تُدار بلا إتلاف عبر كل
أداة يُصدر Forge إعدادًا لها — Claude Code، وCodex، وCursor، وGemini، وContinue،
وبقيّة الأدوات.

خوادم MCP الطرف الثالث **غير** مثبّتة افتراضيًا. لا شيء يهبط على القرص إلى أن تُشغّل
`forge integrations add <name> --yes`.

```bash
forge integrations # list opt-in servers with package + purpose
forge integrations add <name> # dry-run: prints package, network, files it would touch
forge integrations add <name> --yes # apply — write MCP config for every tool
forge integrations add <name> --yes --adopt # also claim a same-name entry you already configured
forge integrations remove <name> # reverse the add — deletes only forge-owned entries
```

### ماذا يكتب `add`

يكتب `add --yes` الخادمَ في إعداد MCP الأصلي لكل أداة من مواصفة قانونية واحدة:

- `.mcp.json` (Claude Code)
- `.cursor/mcp.json` (Cursor)
- `.gemini/settings.json` (Gemini)
- `.codex/config.toml` — ككتلة `# forge:managed:<name>`، تُحدَّث بمقارنة البايتات
- `.continue/mcpServers/<name>.yaml` — ملف YAML واحد مُعلَّم بعلامة forge لكل خادم مُدار
- وبقيّة الأدوات التي يُصدر Forge إعدادًا لها

تُسجَّل المجموعة المثبّتة في `.forge/forge.config.json` تحت `mcp.integrations`، فيُعيد
كلُّ `forge sync` لاحق إصدارَ الخوادم نفسها. تُقارن مزامنةُ خطّاف التوقف التلقائي
ملفَّ الإعداد كاملًا بالبايت، فيُكتشف أي تعديل يدوي على ذلك الملف ويُصلَح.

### دلالات `--adopt`

إذا كان هناك خادم بالاسم نفسه موجود سلفًا في أحد ملفات إعدادات الأدوات ولم يضعه
Forge هناك، فإن `add` **لا يستبدله**. بل يُبلّغ عن الملف مع تلميح `--adopt`.
أعِد التشغيل بـ `--adopt` للمطالبة بالملكية — يُسجّل Forge المدخل تحت
`mcp.adopted` في `.forge/forge.config.json` وسيُديره من ذلك الحين.

استخدم `--adopt` عندما تكون قد أعددت خادمًا يدويًا سابقًا وتريد الآن أن يُبقيه Forge
متزامنًا عبر كل الأدوات.

### `remove`

يعكس `forge integrations remove <name>` عمليةَ الإضافة. يحذف فقط المدخلات والكتل
والملفات المملوكة لـ forge — أما الخادم الذي يحمل الاسم نفسه وأعدّه المستخدم (ولم
يُطبَّق عليه `--adopt`) فيُترك كما هو. تشغيل `remove` مرّتين لا أثر له.

```bash
forge integrations remove context7
```

### `.forge/forge.config.json`

حالة Forge لكل مستودع — الإعداد الموحّد الذي يحمل أيضًا `primaryTool` و`tools`
و`profile` — تُسجّل التكاملات الاختيارية تحت مفتاحين:

```json
{
"mcp": {
"integrations": ["context7"],
"adopted": []
}
}
```

المفاتيح غير المعروفة تعبر الكتابات دون تغيير. لا يُتجاهل الملف المُعطوب بصمت:
تُصدر عمليات القراءة تحذيرًا واحدًا لكل عملية على stderr، ويرفض الكاتبون استبدال
إعداد لا يمكن تحليله بدلًا من الكتابة فوقه بالقيم الافتراضية.
6 changes: 5 additions & 1 deletion mintlify/ar/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "مقدمة"
title: "Forge: الركيزة المعرفية لوكلاء البرمجة بالذكاء الاصطناعي"
description: "Forge هو الركيزة المعرفية التي يفتقدها كل نموذج عديم الحالة — الذاكرة، والاستشراف، وحواجز الأمان — يُقدَّم كإعداد أصلي لكل وكيل برمجة يعتمد على الذكاء الاصطناعي."
---

Expand Down Expand Up @@ -89,6 +89,10 @@ _قبل_ أن يعدّل النموذج الشيفرة، والتي تُوفّر
Claude Code، وCodex، وCursor، وGemini، وAider، وCopilot، وWindsurf/Devin، وZed،
وContinue. تقرأ كلٌّ منها القواعد نفسها من ملفها الأصلي.

خادم MCP الوحيد الموصول افتراضيًا هو خادم Forge نفسه (`src/cortex_mcp.js`) — فحوصات
الركيزة وقراءات الذاكرة. أما خوادم MCP الطرف الثالث مثل `context7` فهي **اختيارية**
ولا تهبط على القرص إلى أن تُشغّل [`forge integrations add <name> --yes`](/cli/config#forge-integrations).

## الحدود الصادقة

يُعلن Forge سقفه في كل مكان.
Expand Down
74 changes: 73 additions & 1 deletion mintlify/cli/config.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Config commands"
description: "Providers, cost, dashboards, brand, atlas, and stack: config, cost, dash, brand, atlas, stack — plus the v0.19+ report and tools commands."
description: "Providers, cost, dashboards, brand, atlas, stack, and opt-in MCP integrations: config, cost, dash, brand, atlas, stack, report, tools, integrations."
---

The Config group covers providers, observability, the code graph, and stack detection.
Expand Down Expand Up @@ -89,3 +89,75 @@ generated config and `.forge/` artifacts are ignored correctly for your setup.
```bash
forge tools
```

## `forge integrations`

Opt-in third-party MCP servers (for example `context7`), managed non-destructively across
every tool Forge emits config for — Claude Code, Codex, Cursor, Gemini, Continue, and the
rest.

Third-party MCP servers are **not** installed by default. Nothing lands on disk until you
run `forge integrations add <name> --yes`.

```bash
forge integrations # list opt-in servers with package + purpose
forge integrations add <name> # dry-run: prints package, network, files it would touch
forge integrations add <name> --yes # apply — write MCP config for every tool
forge integrations add <name> --yes --adopt # also claim a same-name entry you already configured
forge integrations remove <name> # reverse the add — deletes only forge-owned entries
```

### What `add` writes

`add --yes` writes the server into every tool's native MCP config from one canonical
spec:

- `.mcp.json` (Claude Code)
- `.cursor/mcp.json` (Cursor)
- `.gemini/settings.json` (Gemini)
- `.codex/config.toml` — as a `# forge:managed:<name>` block, refreshed by byte-compare
- `.continue/mcpServers/<name>.yaml` — one forge-marked YAML per managed server
- and the rest of the tools Forge emits config for

The installed set is recorded in `.forge/forge.config.json` under `mcp.integrations`, so
every subsequent `forge sync` re-emits the same servers. The stop-hook auto-sync
byte-compares the whole config file, so a hand-edit to that file is detected and
repaired.

### `--adopt` semantics

If a server with the same name already exists in one of the tool config files and Forge
did not put it there, `add` **does not overwrite it**. Instead it reports the file with an
`--adopt` hint. Re-run with `--adopt` to claim ownership — Forge records the entry under
`mcp.adopted` in `.forge/forge.config.json` and will manage it from then on.

Use `--adopt` when you configured a server by hand earlier and now want Forge to keep it
in sync across every tool.

### `remove`

`forge integrations remove <name>` reverses an add. It deletes only forge-owned entries,
blocks, and files — a same-name server the user configured (and never `--adopt`ed) is
left alone. Running `remove` twice is a no-op.

```bash
forge integrations remove context7
```

### `.forge/forge.config.json`

Per-repo Forge state — the unified config that also holds `primaryTool`, `tools`, and
`profile` — records opt-in integrations under two keys:

```json
{
"mcp": {
"integrations": ["context7"],
"adopted": []
}
}
```

Unknown keys round-trip through writes. A malformed file is not silently discarded:
reads warn once per process on stderr, and writers refuse to overwrite an unparseable
config instead of replacing it with defaults.
72 changes: 71 additions & 1 deletion mintlify/cn/cli/config.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Config 命令"
description: "提供方、成本、仪表盘、品牌、atlas 和技术栈:config、cost、dash、brand、atlas、stack —— 外加 v0.19+ 的 reporttools 命令。"
description: "提供方、成本、仪表盘、品牌、atlas、技术栈和可选 MCP 集成:config、cost、dash、brand、atlas、stackreporttools、integrations。"
---

Config 分组涵盖提供方、可观测性、代码图和技术栈探测。
Expand Down Expand Up @@ -89,3 +89,73 @@ forge report
```bash
forge tools
```

## `forge integrations`

按需接入(opt-in)的第三方 MCP 服务器(例如 `context7`),以非破坏性的方式管理,
覆盖 Forge 为之输出配置的每一个工具 —— Claude Code、Codex、Cursor、Gemini、Continue
以及其他所有工具。

第三方 MCP 服务器**默认不安装**。在你执行 `forge integrations add <name> --yes`
之前,什么都不会落到磁盘上。

```bash
forge integrations # list opt-in servers with package + purpose
forge integrations add <name> # dry-run: prints package, network, files it would touch
forge integrations add <name> --yes # apply — write MCP config for every tool
forge integrations add <name> --yes --adopt # also claim a same-name entry you already configured
forge integrations remove <name> # reverse the add — deletes only forge-owned entries
```

### `add` 会写什么

`add --yes` 从一份规范的 spec 出发,把这个服务器写入每个工具原生的 MCP 配置:

- `.mcp.json`(Claude Code)
- `.cursor/mcp.json`(Cursor)
- `.gemini/settings.json`(Gemini)
- `.codex/config.toml` —— 作为一个 `# forge:managed:<name>` 代码块,通过逐字节比对
来刷新
- `.continue/mcpServers/<name>.yaml` —— 每个被管理的服务器一个带 forge 标记的 YAML
- 以及 Forge 为之输出配置的其他工具

已安装的集合记录在 `.forge/forge.config.json` 的 `mcp.integrations` 下,因此之后每一次
`forge sync` 都会重新输出同一批服务器。stop-hook 的自动同步会对整份配置文件做逐字节
比对,所以对该文件的手工编辑会被检测到并被修复。

### `--adopt` 的语义

如果一个同名的服务器已经存在于某个工具的配置文件里,而且不是 Forge 放进去的,`add`
**不会覆盖它**。它会报告是哪个文件,并给出一个 `--adopt` 提示。加上 `--adopt` 重新
运行来接管所有权 —— Forge 会把这条记录写到 `.forge/forge.config.json` 的
`mcp.adopted` 下,从此由 Forge 来管理它。

当你之前手工配了某个服务器,现在又想让 Forge 在每个工具之间把它同步保持一致时,
就用 `--adopt`。

### `remove`

`forge integrations remove <name>` 反转一次 add。它只删除 forge 所拥有的条目、
代码块和文件 —— 用户自己配的、并且从没 `--adopt` 过的同名服务器会被保留下来。
连续跑两次 `remove` 是个无操作。

```bash
forge integrations remove context7
```

### `.forge/forge.config.json`

每个仓库的 Forge 状态 —— 这份统一配置里也存着 `primaryTool`、`tools` 和
`profile` —— 在两个键下记录按需接入的集成:

```json
{
"mcp": {
"integrations": ["context7"],
"adopted": []
}
}
```

未知的键在写入时会被原样保留。一个损坏的文件不会被静默丢弃:读取时每个进程会在
stderr 上告警一次,而写入者会拒绝用默认值覆盖一份无法解析的配置。
7 changes: 6 additions & 1 deletion mintlify/cn/introduction.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "简介"
title: "Forge:面向 AI 编码代理的认知基底"
description: "Forge 是每个无状态模型都缺失的认知基底 —— 记忆、预见和护栏 —— 以原生配置的形式交付到每一个 AI 编码代理。"
---

Expand Down Expand Up @@ -91,6 +91,11 @@ Forge 为**九个工具**输出配置,加上给 Roo Code 和 VS Code 的一个
Claude Code、Codex、Cursor、Gemini、Aider、Copilot、Windsurf/Devin、Zed 和 Continue。
每个工具从它自己的原生文件里读同一份规则。

默认接通的 MCP 服务器只有 Forge 自己的那一个(`src/cortex_mcp.js`)—— 负责基底
检查和记忆读取。像 `context7` 这样的第三方 MCP 服务器是**按需接入**(opt-in)的,
在你执行 [`forge integrations add <name> --yes`](/cli/config#forge-integrations) 之前,
它们绝不会落到磁盘上。

## 诚实的边界

Forge 到处都会声明它自己的天花板。
Expand Down
Loading
Loading