Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

docs(cli-setup): document the ov language gate and exit code 2 (EN+ZH) (#2450)

Evod0bf22c34ac5
diff --git a/docs/en/getting-started/05-cli-setup.md b/docs/en/getting-started/05-cli-setup.md
index f3f56c636..b5cf8b8da 100644
--- a/docs/en/getting-started/05-cli-setup.md
+++ b/docs/en/getting-started/05-cli-setup.md
@@ -53,6 +53,8 @@ Choose this only when the user wants to connect to a custom OpenViking server on
- API key is usually not needed for a local unauthenticated server.
- Agents should not probe local ports, curl local health endpoints, or start server commands unless the user chose local custom setup.
+> **Note:** Recent CLI versions (v0.3.23+) require a saved display language before most commands will run. In an interactive terminal the CLI prompts you on first use; in a non-interactive shell (agent or CI) any non-exempt command exits `2` until you run `ov language en` or `ov language zh-CN`. Only `ov language`/`ov lang`, `ov config add|edit|delete|list`, and `ov config switch <name>` are exempt, so run `ov language <code>` before the `ov config validate`, `ov health`, and `ov status` checks above.
+
## Before You Start
You need:
@@ -212,7 +214,7 @@ Agents should branch on the process exit code and the JSON `error.code`, not on
| Exit code | Meaning |
|-----------|---------|
| `0` | Success, or already in the desired state |
-| `2` | Bad input, missing value, invalid name, or unreadable secret source |
+| `2` | Bad input, missing value, invalid name, unreadable secret source, or no display language selected in a non-interactive shell (run `ov language <code>` first) |
| `3` | A config with that name already exists with different values; pass `--force` only if replacement is intended |
| `4` | Server unreachable or config validation failed |
| `5` | Authentication or key-role mismatch, such as passing a root key where a user key is expected |
diff --git a/docs/zh/getting-started/05-cli-setup.md b/docs/zh/getting-started/05-cli-setup.md
index 20d114a72..114aec9fe 100644
--- a/docs/zh/getting-started/05-cli-setup.md
+++ b/docs/zh/getting-started/05-cli-setup.md
@@ -53,6 +53,8 @@ CLI 使用 `~/.openviking/ovcli.conf` 作为 active 客户端连接配置。
- 本地无鉴权服务通常不需要 API Key。
- 除非用户选择本地自定义配置,否则 Agent 不应探测本地端口、curl 本地 health endpoint,或运行启动服务端的命令。
+> **注意:** 最近的 CLI 版本(v0.3.23+)要求在运行大多数命令前先保存一个显示语言。在交互式终端中,CLI 会在首次使用时提示你选择;在非交互式 shell(Agent 或 CI)中,任何非豁免命令都会以 `2` 退出,直到你运行 `ov language en` 或 `ov language zh-CN`。只有 `ov language`/`ov lang`、`ov config add|edit|delete|list` 和 `ov config switch <name>` 是豁免的,因此请在上面的 `ov config validate`、`ov health` 和 `ov status` 之前先运行 `ov language <code>`。
+
## 开始前
你需要准备:
@@ -212,7 +214,7 @@ Agent 应该根据进程退出码和 JSON 中的 `error.code` 分支处理,不
| 退出码 | 含义 |
|--------|------|
| `0` | 成功,或已经处于目标状态 |
-| `2` | 输入错误、缺少参数、名称非法,或无法读取密钥来源 |
+| `2` | 输入错误、缺少参数、名称非法、无法读取密钥来源,或在非交互式 shell 中尚未选择显示语言(请先运行 `ov language <code>`) |
| `3` | 同名配置已经存在但内容不同;只有确认要替换时才传 `--force` |
| `4` | 服务端不可达,或配置校验失败 |
| `5` | 鉴权或 key 角色不匹配,例如把 root key 传到了需要 user key 的位置 |