Skip to content

Commit 6239e12

Browse files
docs: mirror init flags, profiles, and FORGE_GUARD_STRICT into translations
1 parent 588dd58 commit 6239e12

12 files changed

Lines changed: 241 additions & 17 deletions

File tree

mintlify/ar/cli/core.mdx

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: "أوامر Core"
3-
description: "تهيئة المستودع والحفاظ عليه: init وsync وdoctor وcatalog وdocs وupdate."
3+
description: "تهيئة مستودع Forge والحفاظ عليه عبر init وsync وdoctor وcatalog وdocs وupdate — إضافةً إلى ملف السياسة والإعدادات وعلامات إلغاء التثبيت القابل للعكس."
44
---
55

66
تُهيّئ مجموعة Core المستودع وتحافظ على صحته.
77

88
## `forge init`
99

10-
بناء إعداد المستودع — يُصدر لكل أداة من مصدر مشترك.
10+
بناء إعداد هذا المستودع — يُصدر لكل أداة من مصدر مشترك واحد.
1111

1212
```bash
1313
forge init
@@ -17,6 +17,43 @@ forge init
1717
(إضافةً إلى إعداد خادم MCP لأدوات Roo Code وVS Code)، وقاعدة الدمج الاتحادي في
1818
`.gitattributes` التي يحتاجها السجل.
1919

20+
كما يدمج `forge init` خطّافات Forge وأذوناتها في ملف `~/.claude/settings.json`
21+
**العام**، لذا يُعلن عن الدمج قبل الكتابة. الدمج عديم الأثر، محميّ بعلامة، ولا يُلغي
22+
مطلقًا مدخلات المستخدم.
23+
24+
### علامات init
25+
26+
| العلامة | ماذا تفعل |
27+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
28+
| `--profile <name>` | اختيار ملف السياسة لهذا المستودع. يقبل `minimal` أو `standard` (الافتراضي). قيمة غير صالحة تُجهض قبل أي بناء أو كتابة `.forge/` أو دمج. |
29+
| `--no-settings` | تخطّي دمج ملف `~/.claude/settings.json` العام كليًا — تُكتب فقط الإعدادات الخاصة بالمستودع. |
30+
| `--remove-settings` | عكس دمج إعدادات سابق. تُزال الخطّافات والأذونات وسطر الحالة ذات شكل Forge وعلامة `_forge`؛ تُكتب نسخة احتياطية موسومة بالوقت أولًا، وتُحفظ مدخلاتك. يُستدعى أيضًا من `install.sh --uninstall`. |
31+
| `--settings-only` | دمج الإعدادات العامة فقط — لا يمسّ المستودع. يستخدمه `install.sh` لتوصيل الخطّافات والأذونات. |
32+
33+
إذا رُفض دمج الإعدادات أو أخفق، يفشل `forge init` بخروج 1 ويكتب السبب إلى stderr بدلًا
34+
من الإبلاغ عن النجاح.
35+
36+
### ملفات السياسة
37+
38+
تختار `--profile` مجموعة القواعد التي يُصرّفها `forge sync` إلى إعداد كل أداة الأصلي.
39+
يُدعم ملفان اثنان فقط:
40+
41+
- **`standard`** (الافتراضي) — الحزمة الكاملة: قواعد الذاكرة المشتركة، وتحليل الأثر،
42+
ومجموعة الخطّافات الحارسة الكاملة.
43+
- **`minimal`** — مجموعة قواعد أخفّ للمستودعات الصغيرة أو تفريعات المساهمين.
44+
45+
الأسماء الموروثة `web-app` و`backend-service` و`library` و`regulated` أسماء بديلة
46+
مهجورة لـ `standard`. لا تزال تعمل: يُحذّر `forge init` مرة واحدة، ويحفظ `standard`،
47+
وتتزامن الإعدادات الحالية التي تحمل اسمًا موروثًا كما لو كانت standard. على المستودعات
48+
الجديدة استخدام `standard` مباشرةً. أي قيمة أخرى غير صالحة وتُجهض قبل أن يمسّ Forge
49+
المستودع.
50+
51+
```bash
52+
forge init --profile minimal # leaner ruleset
53+
forge init --no-settings # per-repo only, skip the global merge
54+
forge init --remove-settings # reverse a past global merge
55+
```
56+
2057
## `forge sync`
2158

2259
إعادة تصريف المصدر القانوني إلى ملفات الإعداد الأصلية لكل أداة.

mintlify/ar/cli/overview.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "نظرة عامة على CLI"
3-
description: "كل أمر من أوامر forge مُصنَّف حسب المجموعات Core وMemory وSubstrate وQuality وConfig — سطح الأوامر بيانات، ويتم توفيقه مع التوثيق بفحص انحراف صارم."
3+
description: "كل أمر من أوامر forge مُصنَّف حسب المجموعات Core وMemory وSubstrate وQuality وConfig، إضافةً إلى متغيرات البيئة التي تتحكم في التنفيذ والمخرجات."
44
---
55

66
يُعرَّف سطح أوامر `forge` كبيانات (`src/commands.js`)، ويتم توفيقه مع التوثيق عبر
@@ -39,6 +39,17 @@ description: "كل أمر من أوامر forge مُصنَّف حسب المجم
3939
التجارية ومقاييس الثقة. `NO_COLOR` يوقف اللون، `FORCE_COLOR=1` يُفرضه.
4040
- **`--json`** متاح للركيزة ومعظم أوامر التحليل للسكربتات.
4141

42+
## متغيرات البيئة
43+
44+
| المتغيّر | الأثر |
45+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
46+
| `FORGE_ENFORCE=1` | تحويل أقوى إشارات الركيزة الإرشادية إلى حجب صارم. |
47+
| `FORGE_GUARD_STRICT=1` | ترقية تحذير `DEGRADED` لمُنقّي الأسرار إلى خروج حاجب. افتراضيًا، يطبع فشل الإخفاء `secret redaction DEGRADED` إلى stderr ويترك المخرَج يمرّ؛ الوضع الصارم يرفض إصدار أي شيء لم يستطع المنقّي تنظيفه كاملًا. استخدمه في CI أو على الأجهزة المشتركة حيث سطر غير مُخفَى أسوأ من أمر فاشل. |
48+
| `FORGE_NO_UPDATE_CHECK=1` | إسكات إشعار "commits behind upstream" في `forge doctor`. |
49+
| `FORGE_NO_HINT=1` | كتم تلميح init المُعروض لمرة واحدة الذي يدفعك إلى تشغيل `forge init`. |
50+
| `FORGE_VERBOSE=1` | إظهار عنوان الأمر (`Forge <cmd> — …`) المخفي افتراضيًا. |
51+
| `FORGE_EMBED=1` | تفعيل طبقة التضمينات لاسترجاع الذاكرة (يبقى MinHash افتراضًا بدون تبعيات). |
52+
4253
<Note>
4354
شغّل `forge --help` للقائمة المحدَّثة دائمًا، أو `forge catalog` لفهرس البدء لكل
4455
أداة وطاقم وحاجز مع سبب موجز.

mintlify/cli/core.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Core commands"
3-
description: "Bootstrap and maintain a repo: init, sync, doctor, catalog, docs, and update."
3+
description: "Bootstrap and maintain a Forge repo with init, sync, doctor, catalog, docs, and update — plus profile, settings, and reversible-uninstall flags."
44
---
55

66
The Core group bootstraps a repo and keeps it healthy.
@@ -43,9 +43,9 @@ config. Only two profiles are supported:
4343
- **`minimal`** — a leaner ruleset for small repos or contributor forks.
4444

4545
The legacy names `web-app`, `backend-service`, `library`, and `regulated` are deprecated
46-
aliases of `standard`. They still work `forge init` warns once, stores `standard`, and
47-
existing configs holding a legacy name still sync as standard — but new repos should use
48-
`standard` directly. Any other value is invalid and aborts before Forge touches the repo.
46+
aliases of `standard`. They still work: `forge init` warns once, stores `standard`, and
47+
existing configs holding a legacy name sync as standard. New repos should use `standard`
48+
directly. Any other value is invalid and aborts before Forge touches the repo.
4949

5050
```bash
5151
forge init --profile minimal # leaner ruleset

mintlify/cli/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "CLI overview"
3-
description: "Every forge command, grouped by Core, Memory, Substrate, Quality, and Config — the command surface is data, reconciled against the docs by a strict drift check."
3+
description: "Every forge command grouped by Core, Memory, Substrate, Quality, and Config, plus the environment variables that control enforcement and output."
44
---
55

66
The `forge` command surface is defined as data (`src/commands.js`) and reconciled against

mintlify/cn/cli/core.mdx

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Core 命令"
3-
description: "引导并维护一个仓库:init、sync、doctor、catalog、docs 和 update"
3+
description: "init、sync、doctor、catalog、docs、update 引导并维护 Forge 仓库 —— 加上 profile、settings 与可逆卸载相关标志"
44
---
55

66
Core 分组用于引导一个仓库并保持它的健康。
@@ -17,6 +17,41 @@ forge init
1717
(外加给 Roo Code 和 VS Code 的 MCP 服务器配置),以及账本所需的
1818
`.gitattributes` union-merge 规则。
1919

20+
`forge init` 还会把 Forge 的 hooks 和 permissions 合并进**全局**
21+
`~/.claude/settings.json`,所以它会在写入前先声明这次合并。这次合并是幂等的、
22+
带标记守护的,永远不会覆盖用户自己的条目。
23+
24+
### Init 标志
25+
26+
| 标志 | 作用 |
27+
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
28+
| `--profile <name>` | 为本仓库挑选策略 profile。可取 `minimal``standard`(默认)。无效值会在任何脚手架、`.forge/` 写入或合并动作之前直接中止。 |
29+
| `--no-settings` | 完全跳过对全局 `~/.claude/settings.json` 的合并 —— 只写仓库级配置。 |
30+
| `--remove-settings` | 撤销以往的一次 settings 合并。Forge 形状的 hooks、permissions、statusline 和 `_forge` 标记会被移除;会先写入一份带时间戳的备份,你自己的条目保持不动。也会被 `install.sh --uninstall` 调用。 |
31+
| `--settings-only` | 只合并全局 settings —— 不动仓库。被 `install.sh` 用来接线 hooks 和 permissions。 |
32+
33+
如果 settings 合并被拒绝或出错,`forge init` 会以 exit 1 失败并把原因写到 stderr,
34+
而不是谎报成功。
35+
36+
### 策略 profile
37+
38+
`--profile` 用来选那套规则集,`forge sync` 会把它编译成每个工具的原生配置。
39+
只支持两种 profile:
40+
41+
- **`standard`**(默认)—— 完整包:共享记忆规则、影响分析,以及完整的护栏 hook 集。
42+
- **`minimal`** —— 更精简的规则集,给小仓库或贡献者 fork 用。
43+
44+
旧名字 `web-app``backend-service``library``regulated` 都是 `standard`
45+
弃用别名。它们仍然能用:`forge init` 会警告一次、把 `standard` 存下来,已有的、
46+
仍然拿旧名字的配置会按 standard 同步。新仓库应直接用 `standard`。其它任何值都是
47+
无效的,会在 Forge 动仓库之前中止。
48+
49+
```bash
50+
forge init --profile minimal # leaner ruleset
51+
forge init --no-settings # per-repo only, skip the global merge
52+
forge init --remove-settings # reverse a past global merge
53+
```
54+
2055
## `forge sync`
2156

2257
把规范来源重新编译成每个工具的原生配置文件。

mintlify/cn/cli/overview.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "CLI 概览"
3-
description: "每个 forge 命令,按 Core、Memory、Substrate、Quality 和 Config 分组 —— 命令表本身就是数据,会被严格的漂移检查对着文档核对"
3+
description: "每个 forge 命令,按 Core、Memory、Substrate、Quality 和 Config 分组,外加控制强制执行与输出的环境变量"
44
---
55

66
`forge` 命令表以数据形式定义在 `src/commands.js` 里,并由 `forge docs check`
@@ -39,6 +39,17 @@ description: "每个 forge 命令,按 Core、Memory、Substrate、Quality 和
3939
置信度条。`NO_COLOR` 关闭颜色,`FORCE_COLOR=1` 强制打开。
4040
- **`--json`** 在基底和大多数分析类命令上都可用,方便脚本化。
4141

42+
## 环境变量
43+
44+
| 变量 | 作用 |
45+
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
46+
| `FORGE_ENFORCE=1` | 把基底最强的建议性信号变成硬阻塞。 |
47+
| `FORGE_GUARD_STRICT=1` | 把秘密脱敏器的 `DEGRADED` 警告升级为阻塞式退出。默认情况下,一次脱敏失败会把 `secret redaction DEGRADED` 打到 stderr 并放行输出;严格模式则拒绝输出任何脱敏器没能完全清洗干净的内容。适合在 CI 或共享机器上使用 —— 那里一行未脱敏内容比一次失败的命令更糟。 |
48+
| `FORGE_NO_UPDATE_CHECK=1` |`forge doctor` 里的"落后上游若干次提交"提示安静下来。 |
49+
| `FORGE_NO_HINT=1` | 静音那条一次性、提示你去跑 `forge init` 的初始化提示。 |
50+
| `FORGE_VERBOSE=1` | 显示每条命令默认隐藏的横幅(`Forge <cmd> — …`)。 |
51+
| `FORGE_EMBED=1` | 为记忆召回选择接入 embedding 层(MinHash 仍是零依赖的默认方案)。 |
52+
4253
<Note>
4354
运行 `forge --help` 得到永远最新的命令列表,或 `forge catalog` 得到
4455
一份"Start Here"索引,列出每个工具、crew 和护栏,附上一行简介。

0 commit comments

Comments
 (0)