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
41 changes: 39 additions & 2 deletions mintlify/ar/cli/core.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: "أوامر Core"
description: "تهيئة المستودع والحفاظ عليه: init وsync وdoctor وcatalog وdocs وupdate."
description: "تهيئة مستودع Forge والحفاظ عليه عبر init وsync وdoctor وcatalog وdocs وupdate — إضافةً إلى ملف السياسة والإعدادات وعلامات إلغاء التثبيت القابل للعكس."
---

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

## `forge init`

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

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

كما يدمج `forge init` خطّافات Forge وأذوناتها في ملف `~/.claude/settings.json`
**العام**، لذا يُعلن عن الدمج قبل الكتابة. الدمج عديم الأثر، محميّ بعلامة، ولا يُلغي
مطلقًا مدخلات المستخدم.

### علامات init

| العلامة | ماذا تفعل |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--profile <name>` | اختيار ملف السياسة لهذا المستودع. يقبل `minimal` أو `standard` (الافتراضي). قيمة غير صالحة تُجهض قبل أي بناء أو كتابة `.forge/` أو دمج. |
| `--no-settings` | تخطّي دمج ملف `~/.claude/settings.json` العام كليًا — تُكتب فقط الإعدادات الخاصة بالمستودع. |
| `--remove-settings` | عكس دمج إعدادات سابق. تُزال الخطّافات والأذونات وسطر الحالة ذات شكل Forge وعلامة `_forge`؛ تُكتب نسخة احتياطية موسومة بالوقت أولًا، وتُحفظ مدخلاتك. يُستدعى أيضًا من `install.sh --uninstall`. |
| `--settings-only` | دمج الإعدادات العامة فقط — لا يمسّ المستودع. يستخدمه `install.sh` لتوصيل الخطّافات والأذونات. |

إذا رُفض دمج الإعدادات أو أخفق، يفشل `forge init` بخروج 1 ويكتب السبب إلى stderr بدلًا
من الإبلاغ عن النجاح.

### ملفات السياسة

تختار `--profile` مجموعة القواعد التي يُصرّفها `forge sync` إلى إعداد كل أداة الأصلي.
يُدعم ملفان اثنان فقط:

- **`standard`** (الافتراضي) — الحزمة الكاملة: قواعد الذاكرة المشتركة، وتحليل الأثر،
ومجموعة الخطّافات الحارسة الكاملة.
- **`minimal`** — مجموعة قواعد أخفّ للمستودعات الصغيرة أو تفريعات المساهمين.

الأسماء الموروثة `web-app` و`backend-service` و`library` و`regulated` أسماء بديلة
مهجورة لـ `standard`. لا تزال تعمل: يُحذّر `forge init` مرة واحدة، ويحفظ `standard`،
وتتزامن الإعدادات الحالية التي تحمل اسمًا موروثًا كما لو كانت standard. على المستودعات
الجديدة استخدام `standard` مباشرةً. أي قيمة أخرى غير صالحة وتُجهض قبل أن يمسّ Forge
المستودع.

```bash
forge init --profile minimal # leaner ruleset
forge init --no-settings # per-repo only, skip the global merge
forge init --remove-settings # reverse a past global merge
```

## `forge sync`

إعادة تصريف المصدر القانوني إلى ملفات الإعداد الأصلية لكل أداة.
Expand Down
13 changes: 12 additions & 1 deletion mintlify/ar/cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "نظرة عامة على CLI"
description: "كل أمر من أوامر forge مُصنَّف حسب المجموعات Core وMemory وSubstrate وQuality وConfig — سطح الأوامر بيانات، ويتم توفيقه مع التوثيق بفحص انحراف صارم."
description: "كل أمر من أوامر forge مُصنَّف حسب المجموعات Core وMemory وSubstrate وQuality وConfig، إضافةً إلى متغيرات البيئة التي تتحكم في التنفيذ والمخرجات."
---

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

## متغيرات البيئة

| المتغيّر | الأثر |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `FORGE_ENFORCE=1` | تحويل أقوى إشارات الركيزة الإرشادية إلى حجب صارم. |
| `FORGE_GUARD_STRICT=1` | ترقية تحذير `DEGRADED` لمُنقّي الأسرار إلى خروج حاجب. افتراضيًا، يطبع فشل الإخفاء `secret redaction DEGRADED` إلى stderr ويترك المخرَج يمرّ؛ الوضع الصارم يرفض إصدار أي شيء لم يستطع المنقّي تنظيفه كاملًا. استخدمه في CI أو على الأجهزة المشتركة حيث سطر غير مُخفَى أسوأ من أمر فاشل. |
| `FORGE_NO_UPDATE_CHECK=1` | إسكات إشعار "commits behind upstream" في `forge doctor`. |
| `FORGE_NO_HINT=1` | كتم تلميح init المُعروض لمرة واحدة الذي يدفعك إلى تشغيل `forge init`. |
| `FORGE_VERBOSE=1` | إظهار عنوان الأمر (`Forge <cmd> — …`) المخفي افتراضيًا. |
| `FORGE_EMBED=1` | تفعيل طبقة التضمينات لاسترجاع الذاكرة (يبقى MinHash افتراضًا بدون تبعيات). |

<Note>
شغّل `forge --help` للقائمة المحدَّثة دائمًا، أو `forge catalog` لفهرس البدء لكل
أداة وطاقم وحاجز مع سبب موجز.
Expand Down
38 changes: 37 additions & 1 deletion mintlify/cli/core.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Core commands"
description: "Bootstrap and maintain a repo: init, sync, doctor, catalog, docs, and update."
description: "Bootstrap and maintain a Forge repo with init, sync, doctor, catalog, docs, and update — plus profile, settings, and reversible-uninstall flags."
---

The Core group bootstraps a repo and keeps it healthy.
Expand All @@ -17,6 +17,42 @@ Emits `AGENTS.md`, `CLAUDE.md`, `.gemini/settings.json`, `.aider.conf.yml`, and
(plus MCP server config for Roo Code and VS Code), and the `.gitattributes` union-merge
rule the ledger needs.

`forge init` also merges Forge's hooks and permissions into the **global**
`~/.claude/settings.json`, so it announces the merge before writing. The merge is
idempotent, marker-guarded, and never clobbers user entries.

### Init flags

| Flag | What it does |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--profile <name>` | Pick the policy profile for this repo. Accepts `minimal` or `standard` (default). An invalid value aborts before any scaffold, `.forge/` write, or merge. |
| `--no-settings` | Skip the global `~/.claude/settings.json` merge entirely — only the per-repo config is written. |
| `--remove-settings` | Reverse a past settings merge. Forge-shaped hooks, permissions, statusline, and the `_forge` marker are removed; a timestamped backup is written first, and your own entries are preserved. Also invoked by `install.sh --uninstall`. |
| `--settings-only` | Only merge the global settings — don't touch the repo. Used by `install.sh` to wire hooks and permissions. |

If the settings merge is refused or errors, `forge init` fails with exit 1 and writes the
reason to stderr rather than reporting success.

### Policy profiles

`--profile` selects the ruleset that `forge sync` compiles into each tool's native
config. Only two profiles are supported:

- **`standard`** (default) — the full pack: shared memory rules, impact analysis, and the
complete guardrail hook set.
- **`minimal`** — a leaner ruleset for small repos or contributor forks.

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

```bash
forge init --profile minimal # leaner ruleset
forge init --no-settings # per-repo only, skip the global merge
forge init --remove-settings # reverse a past global merge
```

## `forge sync`

Recompile the canonical source into each tool's native config files.
Expand Down
13 changes: 12 additions & 1 deletion mintlify/cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "CLI overview"
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."
description: "Every forge command grouped by Core, Memory, Substrate, Quality, and Config, plus the environment variables that control enforcement and output."
---

The `forge` command surface is defined as data (`src/commands.js`) and reconciled against
Expand Down Expand Up @@ -39,6 +39,17 @@ noticing. Commands are organized into five groups.
and confidence meters. `NO_COLOR` turns color off, `FORCE_COLOR=1` forces it on.
- **`--json`** is available on the substrate and most analysis commands for scripting.

## Environment variables

| Variable | Effect |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FORGE_ENFORCE=1` | Turn the substrate's strongest advisory signals into a hard block. |
| `FORGE_GUARD_STRICT=1` | Escalate the secret redactor's `DEGRADED` warning into a blocking exit. By default a redaction failure prints `secret redaction DEGRADED` to stderr and lets output through; strict mode refuses to emit anything the redactor couldn't fully scrub. Use it in CI or on shared boxes where an unredacted line is worse than a failed command. |
| `FORGE_NO_UPDATE_CHECK=1` | Silence the "commits behind upstream" notice in `forge doctor`. |
| `FORGE_NO_HINT=1` | Mute the one-time init tip that prompts you to run `forge init`. |
| `FORGE_VERBOSE=1` | Show the per-command banner (`Forge <cmd> — …`) that is hidden by default. |
| `FORGE_EMBED=1` | Opt in to the embedding tier for memory recall (MinHash stays the zero-dependency default). |

<Note>
Run `forge --help` for the always-current list, or `forge catalog` for the Start-Here
index of every tool, crew, and guard with a one-line why.
Expand Down
37 changes: 36 additions & 1 deletion mintlify/cn/cli/core.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Core 命令"
description: "引导并维护一个仓库:init、sync、doctor、catalog、docs 和 update。"
description: "init、sync、doctor、catalog、docs、update 引导并维护 Forge 仓库 —— 加上 profile、settings 与可逆卸载相关标志。"
---

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

`forge init` 还会把 Forge 的 hooks 和 permissions 合并进**全局**的
`~/.claude/settings.json`,所以它会在写入前先声明这次合并。这次合并是幂等的、
带标记守护的,永远不会覆盖用户自己的条目。

### Init 标志

| 标志 | 作用 |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--profile <name>` | 为本仓库挑选策略 profile。可取 `minimal` 或 `standard`(默认)。无效值会在任何脚手架、`.forge/` 写入或合并动作之前直接中止。 |
| `--no-settings` | 完全跳过对全局 `~/.claude/settings.json` 的合并 —— 只写仓库级配置。 |
| `--remove-settings` | 撤销以往的一次 settings 合并。Forge 形状的 hooks、permissions、statusline 和 `_forge` 标记会被移除;会先写入一份带时间戳的备份,你自己的条目保持不动。也会被 `install.sh --uninstall` 调用。 |
| `--settings-only` | 只合并全局 settings —— 不动仓库。被 `install.sh` 用来接线 hooks 和 permissions。 |

如果 settings 合并被拒绝或出错,`forge init` 会以 exit 1 失败并把原因写到 stderr,
而不是谎报成功。

### 策略 profile

`--profile` 用来选那套规则集,`forge sync` 会把它编译成每个工具的原生配置。
只支持两种 profile:

- **`standard`**(默认)—— 完整包:共享记忆规则、影响分析,以及完整的护栏 hook 集。
- **`minimal`** —— 更精简的规则集,给小仓库或贡献者 fork 用。

旧名字 `web-app`、`backend-service`、`library` 和 `regulated` 都是 `standard` 的
弃用别名。它们仍然能用:`forge init` 会警告一次、把 `standard` 存下来,已有的、
仍然拿旧名字的配置会按 standard 同步。新仓库应直接用 `standard`。其它任何值都是
无效的,会在 Forge 动仓库之前中止。

```bash
forge init --profile minimal # leaner ruleset
forge init --no-settings # per-repo only, skip the global merge
forge init --remove-settings # reverse a past global merge
```

## `forge sync`

把规范来源重新编译成每个工具的原生配置文件。
Expand Down
13 changes: 12 additions & 1 deletion mintlify/cn/cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "CLI 概览"
description: "每个 forge 命令,按 Core、Memory、Substrate、Quality 和 Config 分组 —— 命令表本身就是数据,会被严格的漂移检查对着文档核对。"
description: "每个 forge 命令,按 Core、Memory、Substrate、Quality 和 Config 分组,外加控制强制执行与输出的环境变量。"
---

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

## 环境变量

| 变量 | 作用 |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FORGE_ENFORCE=1` | 把基底最强的建议性信号变成硬阻塞。 |
| `FORGE_GUARD_STRICT=1` | 把秘密脱敏器的 `DEGRADED` 警告升级为阻塞式退出。默认情况下,一次脱敏失败会把 `secret redaction DEGRADED` 打到 stderr 并放行输出;严格模式则拒绝输出任何脱敏器没能完全清洗干净的内容。适合在 CI 或共享机器上使用 —— 那里一行未脱敏内容比一次失败的命令更糟。 |
| `FORGE_NO_UPDATE_CHECK=1` | 让 `forge doctor` 里的"落后上游若干次提交"提示安静下来。 |
| `FORGE_NO_HINT=1` | 静音那条一次性、提示你去跑 `forge init` 的初始化提示。 |
| `FORGE_VERBOSE=1` | 显示每条命令默认隐藏的横幅(`Forge <cmd> — …`)。 |
| `FORGE_EMBED=1` | 为记忆召回选择接入 embedding 层(MinHash 仍是零依赖的默认方案)。 |

<Note>
运行 `forge --help` 得到永远最新的命令列表,或 `forge catalog` 得到
一份"Start Here"索引,列出每个工具、crew 和护栏,附上一行简介。
Expand Down
Loading
Loading