- 1 active session
+ 1 个活跃会话
- | Tool |
+ 工具 |
PSS |
- Comparison |
+ 对比 |
- | jcode (local embedding off) |
+ jcode(关闭本地 embedding) |
27.8 MB |
- baseline |
+ 基线 |
| jcode |
167.1 MB |
- 6.0× more RAM |
+ 6.0× 更多 RAM |
| pi |
144.4 MB |
- 5.2× more RAM |
+ 5.2× 更多 RAM |
| Codex CLI |
140.0 MB |
- 5.0× more RAM |
+ 5.0× 更多 RAM |
| OpenCode |
371.5 MB |
- 13.4× more RAM |
+ 13.4× 更多 RAM |
| GitHub Copilot CLI |
333.3 MB |
- 12.0× more RAM |
+ 12.0× 更多 RAM |
| Cursor Agent |
214.9 MB |
- 7.7× more RAM |
+ 7.7× 更多 RAM |
| Claude Code |
386.6 MB |
- 13.9× more RAM |
+ 13.9× 更多 RAM |
| Antigravity CLI |
243.7 MB |
- 8.8× more RAM |
+ 8.8× 更多 RAM |
|
|
- 10 active sessions
+ 10 个活跃会话
- | Tool |
+ 工具 |
PSS |
- Comparison |
+ 对比 |
- | jcode (local embedding off) |
+ jcode(关闭本地 embedding) |
117.0 MB |
- baseline |
+ 基线 |
| jcode |
260.8 MB |
- 2.2× more RAM |
+ 2.2× 更多 RAM |
| pi |
833.0 MB |
- 7.1× more RAM |
+ 7.1× 更多 RAM |
| Codex CLI |
334.8 MB |
- 2.9× more RAM |
+ 2.9× 更多 RAM |
| OpenCode |
3237.2 MB |
- 27.7× more RAM |
+ 27.7× 更多 RAM |
| GitHub Copilot CLI |
1756.5 MB |
- 15.0× more RAM |
+ 15.0× 更多 RAM |
| Cursor Agent |
1632.4 MB |
- 14.0× more RAM |
+ 14.0× 更多 RAM |
| Claude Code |
2300.6 MB |
- 19.7× more RAM |
+ 19.7× 更多 RAM |
| Antigravity CLI |
1021.2 MB |
- 8.7× more RAM |
+ 8.7× 更多 RAM |
@@ -181,49 +187,49 @@ jcode is built to be as performant and resource efficient as possible. Every met
-### Time to first frame
+### 首帧时间
-| Tool | Time to first frame | Range | Comparison |
+| 工具 | 首帧时间 | 范围 | 对比 |
|---|---:|---:|---:|
-| **jcode** | **14.0 ms** | 10.1–19.3 ms | baseline |
-| **Antigravity CLI** | **383.5 ms** | 363.1–415.4 ms | **27.4× slower** |
-| **pi** | **590.7 ms** | 369.6–934.8 ms | **42.2× slower** |
-| **Codex CLI** | **882.8 ms** | 742.3–1640.9 ms | **63.1× slower** |
-| **OpenCode** | **1035.9 ms** | 922.5–1104.4 ms | **74.0× slower** |
-| **GitHub Copilot CLI** | **1518.6 ms** | 1357.4–1826.8 ms | **108.5× slower** |
-| **Cursor Agent** | **1949.7 ms** | 1711.0–2104.8 ms | **139.3× slower** |
-| **Claude Code** | **3436.9 ms** | 2032.7–8927.2 ms | **245.5× slower** |
+| **jcode** | **14.0 ms** | 10.1–19.3 ms | 基线 |
+| **Antigravity CLI** | **383.5 ms** | 363.1–415.4 ms | **慢 27.4×** |
+| **pi** | **590.7 ms** | 369.6–934.8 ms | **慢 42.2×** |
+| **Codex CLI** | **882.8 ms** | 742.3–1640.9 ms | **慢 63.1×** |
+| **OpenCode** | **1035.9 ms** | 922.5–1104.4 ms | **慢 74.0×** |
+| **GitHub Copilot CLI** | **1518.6 ms** | 1357.4–1826.8 ms | **慢 108.5×** |
+| **Cursor Agent** | **1949.7 ms** | 1711.0–2104.8 ms | **慢 139.3×** |
+| **Claude Code** | **3436.9 ms** | 2032.7–8927.2 ms | **慢 245.5×** |
-Measured on this Linux machine across 10 interactive PTY launches.
+在本台 Linux 机器上,通过 10 次交互式 PTY 启动测得。
-### Time to first input
-(time until typed probe text appears on the rendered screen; Antigravity uses its internal input-ready log marker because the sign-in screen suppresses probe echo.)
+### 首次可输入时间
+(从输入探测文本到其在渲染屏幕上出现为止的时间;Antigravity 使用其内部 input-ready 日志标记,因为登录界面会抑制探测回显。)
-| Tool | Time to first input | Range | Comparison |
+| 工具 | 首次可输入时间 | 范围 | 对比 |
|---|---:|---:|---:|
-| **jcode** | **48.7 ms** | 30.3–62.7 ms | baseline |
-| **Antigravity CLI** | **383.7 ms** | 363.4–415.7 ms | **7.9× slower** |
-| **pi** | **596.4 ms** | 373.9–955.2 ms | **12.2× slower** |
-| **Codex CLI** | **905.8 ms** | 760.1–1675.7 ms | **18.6× slower** |
-| **OpenCode** | **1047.9 ms** | 931.1–1116.9 ms | **21.5× slower** |
-| **GitHub Copilot CLI** | **1583.4 ms** | 1422.8–1880.0 ms | **32.5× slower** |
-| **Cursor Agent** | **1978.7 ms** | 1727.3–2130.0 ms | **40.6× slower** |
-| **Claude Code** | **3512.8 ms** | 2137.4–9002.0 ms | **72.2× slower** |
+| **jcode** | **48.7 ms** | 30.3–62.7 ms | 基线 |
+| **Antigravity CLI** | **383.7 ms** | 363.4–415.7 ms | **慢 7.9×** |
+| **pi** | **596.4 ms** | 373.9–955.2 ms | **慢 12.2×** |
+| **Codex CLI** | **905.8 ms** | 760.1–1675.7 ms | **慢 18.6×** |
+| **OpenCode** | **1047.9 ms** | 931.1–1116.9 ms | **慢 21.5×** |
+| **GitHub Copilot CLI** | **1583.4 ms** | 1422.8–1880.0 ms | **慢 32.5×** |
+| **Cursor Agent** | **1978.7 ms** | 1727.3–2130.0 ms | **慢 40.6×** |
+| **Claude Code** | **3512.8 ms** | 2137.4–9002.0 ms | **慢 72.2×** |
-Measured on this Linux machine across 10 interactive PTY launches. Antigravity CLI was unauthenticated for this run; its sign-in screen rendered normally and emitted an internal `CLI ready for user input` marker, but did not echo the typed probe.
+在本台 Linux 机器上,通过 10 次交互式 PTY 启动进行测量。本次运行中 Antigravity CLI 未认证;其登录界面正常渲染并输出了内部标记 `CLI ready for user input`,但未回显输入的探测字符。
-### Additional clients / memory scaling
+### 其他客户端 / 内存扩展
-| Tool | Extra PSS per added session | Comparison |
+| Tool | 每新增会话额外 PSS | 对比 |
|---|---:|---:|
| **jcode (local embedding off)** | **~9.9 MB** | baseline |
| **jcode** | **~10.4 MB** | **1.1× more RAM** |
@@ -236,13 +242,14 @@ Measured on this Linux machine across 10 interactive PTY launches. Antigravity C
| **Antigravity CLI** | **~86.4 MB** | **8.7× more RAM** |
-versions tested for this corrected memory rerun:
+
+本次修正后的内存重跑所测试的版本:
- `jcode v0.9.1888-dev (be386f2)`
- `pi 0.62.0`
- `codex-cli 0.120.0`
- `opencode 1.0.203`
-- `GitHub Copilot CLI 1.0.24` for the 1-session rerun, `GitHub Copilot CLI 1.0.27` for the 10-session rerun
+- `GitHub Copilot CLI 1.0.24` 用于 1 会话重跑,`GitHub Copilot CLI 1.0.27` 用于 10 会话重跑
- `Cursor Agent 2026.04.08-a41fba1`
- `Claude Code 2.1.86 (Claude Code)`
- `Antigravity CLI 1.0.0`
@@ -260,15 +267,15 @@ versions tested for this corrected memory rerun:
---
-## Memory (Agent memory)
+## Memory(Agent memory)
-Jcode embeds each turn/response as a semantic vector. Every turn does queries a graph of memories to efficiently find related memory entries via a cosine similarity check. The embedding hits are fed into the conversation, or optionally uses a memory sideagent which verifies the memories are relevant, and potentially does more work for information retreival before injecting into the conversation. This results in a human like memory system which allows the agent to automatically recall relevant information to the conversation without actively calling memory tools or being a token burner.
+Jcode 将每一轮对话/响应嵌入为语义向量(semantic vector)。每一轮都会对记忆图(graph of memories)进行查询,通过余弦相似度(cosine similarity)检查高效找到相关记忆条目。嵌入命中结果会注入对话,或可选地使用 memory sideagent,由其验证记忆是否相关,并可能在注入对话前执行更多信息检索工作。这形成类人的记忆系统,使 agent 能自动回忆与对话相关的信息,而无需主动调用记忆工具或成为 token 消耗大户。
ot
-To have memories which are retrieved, they must also be extracted and stored. Every so often (semantic drift, K turns since last extraction, session end, etc), memories are extracted via a memory sideagent, and put into the memory graph.
+要让记忆可被检索,它们也必须被提取并存储。每隔一段时间(语义漂移、距上次提取已过 K 轮、会话结束等),会通过 memory sideagent 提取记忆,并写入记忆图。
-The harness also provides explicit memory tools to allow the agent to actively search or store the memory without relying on a passive background process. The harness also provides session search for traditional RAG on previous sessions.
+该 harness 还提供显式记忆工具,使 agent 能主动搜索或存储记忆,而不依赖被动后台进程。该 harness 还提供会话搜索,用于对以往会话进行传统 RAG。
-Memories are automatically consolidated every so often via the ambient mode. This reorganizes, checks for staleness and conflicts, etc
+记忆会通过 ambient mode 定期自动整合。这会重新组织、检查陈旧与冲突等。
@@ -284,26 +291,26 @@ Memories are automatically consolidated every so often via the ambient mode. Thi
---
-## UI: Side panels, Diagrams, Info Widgets, rendering, scrolling, alignment
+## UI:侧边栏、图表、信息组件、渲染、滚动、对齐
-The side panel is a place for auxiliary information. Tell your jcode agent to load a file into the side panel and see it update in real time, or tell your agent to write directly to the side panel, or use it as a diff viewer. The side panel (and chat) is able to render mermaid diagrams inline.
+侧边栏用于展示辅助信息。告诉你的 jcode agent 将文件加载到侧边栏即可实时看到更新,或让 agent 直接写入侧边栏,或将其用作 diff 查看器。侧边栏(以及聊天区)能够内联渲染 mermaid 图表。

-To make this possible, I created a new mermaid rendering library to render diagrams 1800x faster. It has no browser or Typescript dependency. See https://github.com/1jehuang/mermaid-rs-renderer
+为实现这一点,我创建了一个新的 mermaid 渲染库,渲染图表速度提升 1800 倍。它不依赖浏览器或 Typescript。参见 https://github.com/1jehuang/mermaid-rs-renderer
-To show you important information without taking space away from the screen that could be used for responses, I developed info widgets. Info widgets will only ever take up the negative space on the screen to show you information, and will get out of the way if there isn't any.
+为在不占用本可用于回复的屏幕空间的情况下展示重要信息,我开发了 info widgets(信息组件)。信息组件只会占用屏幕上的负空间来展示信息,没有内容时会自动让出位置。
-Jcode can render at over a thousand fps. Your monitor will not have the refresh rate to show you, but this means you will not have silly flicker problems.
+Jcode 渲染帧率可超过一千 fps。你的显示器刷新率跟不上,但这意味着不会出现恼人的闪烁问题。
-The custom scrollback implementation of jcode allows it to do much more than a native scrollback. However, it is a terminal-level limitation that I cannot have smooth, partial line scrolling with a custom scrollback. To fix this, I made my own terminal. Handterm https://github.com/1jehuang/handterm implements a native scroll api, and also happens to be very effiecent. This is a work in progress. Scrolling is still well implemented for normal terminals.
+jcode 的自定义 scrollback 实现使其能力远超原生 scrollback。然而,在终端层面存在限制,无法在使用自定义 scrollback 时实现平滑的部分行滚动。为解决此问题,我开发了自己的终端。Handterm https://github.com/1jehuang/handterm 实现了原生滚动 API,同时也非常高效。此项工作仍在进行中。在普通终端上,滚动仍实现得很好。
-Jcode is left-aligned by default. You can switch to centered mode with the `Alt+C` hotkey, with the `/alignment` command, or in the config.
+Jcode 默认左对齐。你可以通过 `Alt+C` 快捷键、`/alignment` 命令或在配置中切换到居中模式。
---
## Swarm
-Spawn two or more agents in the same repo, and they will automatically be managed by the server to allow native collaboration. When agent A edits a file that agent B has read (code shifting under its feet), the server notifies agent B. Agent B can ignore it if it is not relevant, or it can check the diff to make sure that it doesn't conflict. Each agent has messaging abilities, capable of DMing just one agent, broadcasting to all other agents hosted by the server, or just agents working in that repo. This allows you to spawn multiple sessions in the same repo, and have all conflicts automatically resolved.
+在同一仓库中启动两个或更多 agent,服务器会自动管理它们以实现原生协作。当 agent A 编辑了 agent B 已读取的文件(代码在其脚下变动)时,服务器会通知 agent B。若无关,agent B 可忽略;也可查看 diff 以确保不发生冲突。每个 agent 都具备消息能力,可向单个 agent 私信、向服务器托管的所有其他 agent 广播,或仅向在该仓库中工作的 agent 广播。这样你可以在同一仓库中启动多个会话,并自动解决所有冲突。
@@ -315,15 +322,15 @@ Spawn two or more agents in the same repo, and they will automatically be manage
-Agents are also able to spawn their own swarms autonomously. They have a swarm tool which allows them to spawn in their own teamates to accomplish tasks in parallel. Doing so turns the main agent into a coordinator and the spawned agents into workers. Groups of agents, their messaging channels, their completion statuses, etc are all automatically managed. This can be done headlessly or headed.
+Agent 还能自主孵化自己的 swarm。它们提供 swarm 工具,可孵化自己的队友以并行完成任务。这样做会将主 agent 变为协调者,将孵化的 agent 变为工作者。agent 群组、消息通道、完成状态等均由系统自动管理。可无头(headless)或有头(headed)运行。
---
## OAuth and Providers
-jcode works with subscription-backed OAuth flows and many provider integrations, so you can use the models you already pay for and still fall back to direct API providers when needed.
+jcode 支持基于订阅的 OAuth 流程和多种提供商集成,因此你可以使用已付费的模型,并在需要时仍回退到直接 API 提供商。
-### Supported built-in login flows
+### 支持的内置登录流程
- **Claude** (`jcode login --provider claude`)
- **OpenAI / ChatGPT / Codex** (`jcode login --provider openai`)
@@ -337,44 +344,44 @@ jcode works with subscription-backed OAuth flows and many provider integrations,
- **Ollama** (`jcode login --provider ollama`)
- **Custom OpenAI-compatible endpoint** (`jcode login --provider openai-compatible`)
-For custom OpenAI-compatible endpoints, jcode now prompts for the API base and supports local localhost servers without requiring an API key.
+对于自定义 OpenAI 兼容端点,jcode 现在会提示输入 API base,并支持本地 localhost 服务器,无需 API key。
-### Config-file setup for self-hosted endpoints and MCP
+### 自托管端点与 MCP 的配置文件设置
-If you prefer to configure things by editing files instead of using the login UI, jcode supports both a custom OpenAI-compatible endpoint config and MCP config files.
+如果你更喜欢通过编辑文件而非使用登录 UI 来配置,jcode 同时支持自定义 OpenAI 兼容端点配置和 MCP 配置文件。
#### OpenAI-compatible providers
-Many hosted services speak the standard OpenAI `/v1/chat/completions` API. jcode talks to them through one shared OpenAI-compatible provider, so you can use almost any such endpoint without waiting for a dedicated integration.
+许多托管服务使用标准 OpenAI `/v1/chat/completions` API。jcode 通过统一的 OpenAI 兼容提供商与它们通信,因此你几乎可以使用任何此类端点,而无需等待专用集成。
-There are two ways to set one up:
+有两种设置方式:
-- **Built-in named profiles** — jcode ships ready-made profiles for several popular OpenAI-compatible services. Log in by id and jcode fills in the base URL and key environment variable for you:
+- **Built-in named profiles** — jcode 内置了多个热门 OpenAI 兼容服务的即用型配置。按 id 登录后,jcode 会为你填入 base URL 和 key 环境变量:
- ```bash
+```bash
jcode login --provider
- # for example:
+ # 例如:
jcode login --provider openrouter
jcode login --provider deepseek
jcode login --provider opencode # OpenCode Zen
jcode login --provider moonshotai
```
- Built-in OpenAI-compatible profile ids include: `openrouter`, `deepseek`, `zai`, `kimi`, `moonshotai`, `opencode` (OpenCode Zen), `opencode-go`, `302ai`, `baseten`, `cortecs`, `huggingface`, `nebius`, `scaleway`, `stackit`, and `firmware`. Each profile only sets the endpoint and key variable; you still pick the model with `/model` (or `--model`). Run `jcode login` with no provider to see the interactive list.
+ 内置的 OpenAI 兼容(OpenAI-compatible)profile id 包括:`openrouter`、`deepseek`、`zai`、`kimi`、`moonshotai`、`opencode`(OpenCode Zen)、`opencode-go`、`302ai`、`baseten`、`cortecs`、`huggingface`、`nebius`、`scaleway`、`stackit` 以及 `firmware`。每个 profile 仅设置 endpoint 和 key 变量;你仍需通过 `/model`(或 `--model`)选择模型。不带 provider 运行 `jcode login` 可查看交互式列表。
-- **Any other endpoint** — point jcode at an arbitrary OpenAI-compatible API (hosted or local) with `jcode login --provider openai-compatible` or the scriptable `jcode provider add` command described below.
+- **任何其他 endpoint** — 使用 `jcode login --provider openai-compatible` 或下文所述的可脚本化 `jcode provider add` 命令,将 jcode 指向任意 OpenAI 兼容 API(托管或本地)。
-Useful environment overrides for these endpoints:
+这些 endpoint 的实用环境变量覆盖项:
-- `JCODE_STREAM_IDLE_TIMEOUT_SECS` — raise the streaming idle timeout (default 180s) for slow reasoning models that think silently before emitting tokens. Also settable as `[provider] stream_idle_timeout_secs` in `config.toml`.
-- Per-model `context_window` (alias `context_limit`) in a `[[providers..models]]` entry — set the context window when the endpoint has no usable `/v1/models` response, so jcode does not fall back to the generic 200k default.
-- `extra_body` — inject non-standard top-level fields into every chat/completions request body for backends that require them. See [Extra request-body fields](#extra-request-body-fields-extra_body) below.
+- `JCODE_STREAM_IDLE_TIMEOUT_SECS` — 为在输出 token 前静默思考的慢速推理模型提高流式空闲超时(默认 180s)。也可在 `config.toml` 中设置为 `[provider] stream_idle_timeout_secs`。
+- 在 `[[providers..models]]` 条目中按模型设置 `context_window`(别名 `context_limit`)— 当 endpoint 没有可用的 `/v1/models` 响应时设置上下文窗口,以免 jcode 回退到通用的 200k 默认值。
+- `extra_body` — 为需要这些字段的后端,向每个 chat/completions 请求体注入非标准顶层字段。详见下文 [Extra request-body fields](#extra-request-body-fields-extra_body)。
-For details on self-hosting, local runtimes, and the exact config file shape, see below.
+有关自托管、本地运行时以及确切配置文件格式的详情,见下文。
-#### Self-hosted OpenAI-compatible endpoints, including vLLM
+#### 自托管 OpenAI 兼容 endpoint,包括 vLLM
-For agents and scripts, the preferred path is the one-shot provider profile command. It writes a named profile to `~/.jcode/config.toml`, stores secrets in jcode's private app config directory when requested, and prints exact run/validation commands:
+对于 agent 和脚本,首选路径是一次性 provider profile 命令。它会将命名 profile 写入 `~/.jcode/config.toml`,在需要时将密钥存入 jcode 的私有应用配置目录,并打印确切的运行/验证命令:
```bash
# Secret-safe setup for a hosted OpenAI-compatible API.
@@ -392,7 +399,7 @@ jcode --provider-profile my-api auth-test --prompt 'Reply exactly JCODE_PROVIDER
jcode --provider-profile my-api run 'hello'
```
-For local servers that do not require auth:
+对于无需认证的本地服务器:
```bash
jcode provider add local-vllm \
@@ -402,7 +409,7 @@ jcode provider add local-vllm \
--set-default
```
-Built-in local profiles are available for the common desktop/local runtimes:
+常见桌面/本地运行时有内置本地 profile:
```bash
# Ollama: start the local server and install a model first.
@@ -416,17 +423,17 @@ jcode login --provider lmstudio
jcode --provider lmstudio --model '' run 'hello'
```
-Ollama and LM Studio both expose OpenAI-compatible `/v1/models` and `/v1/chat/completions` endpoints. jcode uses streaming chat completions, function/tool calling, and OpenAI-style image content for vision-capable local models. If a local server requires a token, enter it during `jcode login` or create a named profile with `--api-key-stdin`.
+Ollama 和 LM Studio 均暴露 OpenAI 兼容的 `/v1/models` 与 `/v1/chat/completions` endpoint。jcode 使用流式 chat completions、function/tool calling,以及面向支持视觉的本地模型的 OpenAI 风格图像内容。若本地服务器需要 token,可在 `jcode login` 时输入,或使用 `--api-key-stdin` 创建命名 profile。
-Useful flags:
+实用标志:
-- `--api-key-env NAME`: reference an existing environment variable instead of storing a key.
-- `--api-key-stdin`: read and store a key without putting it in shell history.
-- `--context-window TOKENS`: persist the model context window for model selection and routing.
-- `--overwrite`: replace an existing profile of the same name.
-- `--model-catalog`: use the endpoint's `/models` response in addition to configured models.
+- `--api-key-env NAME`:引用已有环境变量,而非存储密钥。
+- `--api-key-stdin`:读取并存储密钥,且不写入 shell 历史。
+- `--context-window TOKENS`:持久化模型上下文窗口,用于模型选择与路由。
+- `--overwrite`:替换同名的已有 profile。
+- `--model-catalog`:除已配置模型外,还使用 endpoint 的 `/models` 响应。
-The generated profile can also be edited manually in `~/.jcode/config.toml`:
+生成的 profile 也可在 `~/.jcode/config.toml` 中手动编辑:
```toml
[provider]
@@ -445,11 +452,11 @@ id = "my-model-id"
context_window = 128000
```
-##### Extra request-body fields (`extra_body`)
+##### 额外请求体字段(`extra_body`)
-Some OpenAI-compatible backends require non-standard top-level request fields. For example, NVIDIA NIM DeepSeek-V4 reasoning models (`deepseek-ai/deepseek-v4-flash`, `deepseek-ai/deepseek-v4-pro`) only enable thinking when the request includes `chat_template_kwargs`; without it they reply without reasoning (or, for some deployments, hang). jcode lets you inject arbitrary top-level fields two ways.
+部分 OpenAI 兼容后端需要非标准顶层请求字段。例如,NVIDIA NIM DeepSeek-V4 推理模型(`deepseek-ai/deepseek-v4-flash`、`deepseek-ai/deepseek-v4-pro`)仅在请求包含 `chat_template_kwargs` 时才启用 thinking;否则它们会无推理地回复(或在某些部署中会挂起)。jcode 提供两种方式注入任意顶层字段。
-1. Per named profile, via `extra_body` in `config.toml` (a TOML table merged verbatim into the JSON body):
+1. 按命名 profile,通过 `config.toml` 中的 `extra_body`(原样合并进 JSON 请求体的 TOML 表):
```toml
[providers.my-nim]
@@ -463,21 +470,21 @@ Some OpenAI-compatible backends require non-standard top-level request fields. F
reasoning_effort = "high"
```
-2. For built-in profiles (e.g. `nvidia-nim`) or any endpoint, via the `JCODE_OPENAI_EXTRA_BODY` environment variable (a JSON object string). It can live in the provider's env file (`~/.config/jcode/nvidia-nim.env`) next to the API key:
+2. 对于内置 profile(例如 `nvidia-nim`)或任意 endpoint,通过 `JCODE_OPENAI_EXTRA_BODY` 环境变量(JSON 对象字符串)。可放在 provider 的 env 文件(`~/.config/jcode/nvidia-nim.env`)中,与 API key 并列:
```bash
JCODE_OPENAI_EXTRA_BODY={"chat_template_kwargs":{"thinking":true,"reasoning_effort":"high"}}
```
-Keys from `extra_body` are merged last and override any jcode-generated body field with the same name (`JCODE_OPENAI_EXTRA_BODY` wins over the config `extra_body` on key collisions). Invalid values are logged and ignored rather than failing the request.
+`extra_body` 的键最后合并,并覆盖同名的 jcode 生成请求体字段(键冲突时 `JCODE_OPENAI_EXTRA_BODY` 优先于配置中的 `extra_body`)。无效值会记录日志并忽略,而不会导致请求失败。
-The custom OpenAI-compatible provider reads overrides from environment variables or from an env file in jcode's app config directory. On Linux this is usually `~/.config/jcode/`, so the default file is usually:
+自定义 OpenAI 兼容 provider 从环境变量或 jcode 应用配置目录中的 env 文件读取覆盖项。在 Linux 上通常为 `~/.config/jcode/`,因此默认文件通常为:
```text
~/.config/jcode/openai-compatible.env
```
-Example for a local or LAN vLLM server:
+本地或局域网 vLLM 服务器示例:
```bash
JCODE_OPENAI_COMPAT_API_BASE=http://192.168.1.50:8000/v1
@@ -486,30 +493,30 @@ JCODE_OPENAI_COMPAT_DEFAULT_MODEL=Qwen/Qwen3-Coder-30B-A3B-Instruct
OPENAI_COMPAT_API_KEY=your-token-here
```
-Notes:
+说明:
-- `jcode login --provider openai-compatible` can create or update this for you.
-- Plain `http://` is accepted for `localhost` and private LAN IPs. Public remote HTTP is still rejected.
-- HTTPS endpoints work as usual.
+- `jcode login --provider openai-compatible` 可为你创建或更新此配置。
+- 对于 `localhost` 和私有局域网 IP,接受纯 `http://`。公共远程 HTTP 仍会被拒绝。
+- HTTPS endpoint 照常可用。
-#### MCP config files
+#### MCP 配置文件
-MCP config is separate from `config.toml`.
+MCP 配置与 `config.toml` 相互独立。
-Primary config files:
+主要配置文件:
-- `~/.jcode/mcp.json` for global MCP servers
-- `.jcode/mcp.json` for project-local MCP servers
+- `~/.jcode/mcp.json` 用于全局 MCP 服务器
+- `.jcode/mcp.json` 用于项目本地 MCP 服务器
-Claude Code compatibility:
+Claude Code 兼容性:
-- `~/.claude.json` (Claude Code's user config): top-level `mcpServers`, plus per-project servers under `projects..mcpServers` for the current directory
-- `.mcp.json` at the repo root (Claude Code's project config)
-- `.claude/mcp.json` (legacy fallback)
+- `~/.claude.json`(Claude Code 用户配置):顶层 `mcpServers`,以及当前目录下 `projects..mcpServers` 中的按项目服务器
+- 仓库根目录的 `.mcp.json`(Claude Code 项目配置)
+- `.claude/mcp.json`(旧版回退)
-Both the canonical `mcpServers` key and jcode's historical `servers` key are accepted. jcode currently supports stdio (command-based) servers only; HTTP/SSE entries (`"type": "http"`/`"sse"`) are recognized and skipped with a log line.
+规范键 `mcpServers` 与 jcode 历史键 `servers` 均可接受。jcode 目前仅支持 stdio(基于命令)服务器;HTTP/SSE 条目(`"type": "http"`/`"sse"`)会被识别并跳过,同时输出一行日志。
-Example MCP config:
+MCP 配置示例:
```json
{
@@ -524,11 +531,11 @@ Example MCP config:
}
```
-On first run, jcode also tries to import MCP servers from `~/.claude.json` (falling back to the legacy `~/.claude/mcp.json`) and `~/.codex/config.toml` if `~/.jcode/mcp.json` does not exist yet.
+首次运行时,若 `~/.jcode/mcp.json` 尚不存在,jcode 还会尝试从 `~/.claude.json`(回退到旧版 `~/.claude/mcp.json`)和 `~/.codex/config.toml` 导入 MCP 服务器。
-For headless or SSH sessions, OAuth-style providers support `jcode login --provider --no-browser` (alias: `--headless`) so jcode prints the auth URL/QR and falls back to manual code or callback paste instead of trying to launch a local browser.
+对于无头或 SSH 会话,OAuth 风格 provider 支持 `jcode login --provider --no-browser`(别名:`--headless`),以便 jcode 打印认证 URL/二维码,并回退到手动输入 code 或粘贴回调,而不是尝试启动本地浏览器。
-For more scriptable remote flows, `claude`, `openai`, `gemini`, and `antigravity` also support a two-step pattern:
+对于更可脚本化的远程流程,`claude`、`openai`、`gemini` 和 `antigravity` 也支持两步模式:
```bash
# Step 1: print a resumable auth URL
@@ -539,7 +546,7 @@ jcode login --provider openai --callback-url 'http://localhost:1455/auth/callbac
jcode login --provider gemini --auth-code '...'
```
-Additional scriptable cases:
+其他可脚本化场景:
```bash
# Copilot device flow: print URL + user code, then complete later
@@ -551,67 +558,66 @@ jcode login --provider google --print-auth-url --google-access-tier readonly
jcode login --provider google --callback-url 'http://127.0.0.1:8456?...'
```
-Pending scriptable login state is stored under `~/.jcode/pending-login/`, automatically expires, and stale entries are cleaned up when new scriptable logins start or resume.
+待处理的 scriptable 登录状态保存在 `~/.jcode/pending-login/` 下,会自动过期;当新的 scriptable 登录启动或恢复时,会清理过期条目。
-For the built-in OpenAI login flow, jcode opens a local callback on
-`http://localhost:1455/auth/callback` by default.
+对于内置的 OpenAI 登录流程,jcode 默认会在 `http://localhost:1455/auth/callback` 上打开本地回调。
-The above image is the first page of provider logins
+上图是各提供商登录的第一页
-### Supported provider
+### 支持的提供商
-- **Native / first-party style providers:** `claude`, `openai`, `copilot`, `gemini`, `azure`, `alibaba-coding-plan`
-- **Aggregator / compatibility providers:** `openrouter`, `openai-compatible`
-- **Additional provider integrations:** `opencode`, `opencode-go`, `zai` / `kimi`, `302ai`, `baseten`, `cortecs`, `deepseek`, `firmware`, `huggingface`, `moonshotai`, `nebius`, `scaleway`, `stackit`, `groq`, `mistral`, `perplexity`, `togetherai`, `deepinfra`, `fireworks`, `minimax`, `xai`, `lmstudio`, `ollama`, `chutes`, `cerebras`, `cursor`, `antigravity`, `google`
+- **原生 / 第一方风格提供商:** `claude`, `openai`, `copilot`, `gemini`, `azure`, `alibaba-coding-plan`
+- **聚合 / 兼容层提供商:** `openrouter`, `openai-compatible`
+- **更多提供商集成:** `opencode`, `opencode-go`, `zai` / `kimi`, `302ai`, `baseten`, `cortecs`, `deepseek`, `firmware`, `huggingface`, `moonshotai`, `nebius`, `scaleway`, `stackit`, `groq`, `mistral`, `perplexity`, `togetherai`, `deepinfra`, `fireworks`, `minimax`, `xai`, `lmstudio`, `ollama`, `chutes`, `cerebras`, `cursor`, `antigravity`, `google`
-Jcode also supports easy multi-account switching. Ran out of tokens on your first ChatGPT Pro subscription? /account and quickly switch to your second.
+Jcode 也支持便捷的多账号切换。第一个 ChatGPT Pro 订阅的 token 用完了?使用 /account 快速切换到第二个。
---
-## Customizability / Self-Dev
+## 可定制性 / 自研(Self-Dev)
-Jcode is inventing a new form of customizability. One that doesn't limit you to what a plugin or extension can do. Tell your jcode agent to enter self dev mode, and it will start modifying its own source code. Jcode is optimized to iterate on itself. There is significant infrastructure around self developement, which allows it to edit, build, and test its own source code, then reload its own binary and continue work in your (potentially many) sessions, fully automatically.
+Jcode 正在开创一种新的可定制性形式——不再把你限制在插件或扩展能做的事范围内。告诉你的 jcode agent 进入 self dev 模式,它就会开始修改自己的源代码。Jcode 针对自我迭代进行了优化。围绕自研(self development)有大量基础设施,使其能够编辑、构建并测试自己的源代码,然后重新加载自己的二进制文件,在你的(可能很多个)会话中全自动地继续工作。
-It is reccomended that you use a frontier model for this. The jcode codebase is not a simple one, and weaker models can make subtle, breaking changes. GPT 5.5 or the latest available frontier model works well.
+建议使用前沿(frontier)模型来完成这类任务。jcode 代码库并不简单,较弱的模型可能会做出细微却破坏性的改动。GPT 5.5 或最新可用的前沿模型效果较好。
---
-## Misc.
+## 杂项
-The devil is in the details. There are many undocumented optimizations and niceties that jcode implements. Some examples:
+细节决定成败。jcode 实现了许多未写入文档的优化与贴心设计。例如:
-Anthropic's Claude cache goes cold after 5 minutes. If you initiate Claude after these 5 minutes, you have a cache miss, potentially costing you lots of tokens. The ui warns you when the cache went cold, and notfies you if there was an unexpected cache miss.
+Anthropic 的 Claude 缓存会在 5 分钟后失效。若在这 5 分钟之后再启动 Claude,就会发生缓存未命中(cache miss),可能让你消耗大量 token。UI 会在缓存失效时提醒你,并在出现意外缓存未命中时通知你。
-jcode comes with instructions on how to set up Firefox Agent Bridge. Ask you agent to set it up, and then you will have browser automation in jcode as well.
+jcode 附带如何配置 Firefox Agent Bridge 的说明。让你的 agent 去配置,之后你就能在 jcode 中使用浏览器自动化。
-Agent grep is a grep tool I made for the jcode agent. It adds file strucuture information (ie the list of functions, their displacement, etc) to the grep return, so that the agent can infer more of what the file doesn without actually reading the file. It also implements a harness-level integration that adaptively truncates returns based on what the agent has already seen. This saves on context a lot.
+Agent grep 是我为 jcode agent 制作的 grep 工具。它会在 grep 返回结果中加入文件结构信息(例如函数列表、偏移位置等),让 agent 在不实际读取文件的情况下也能推断文件在做什么。它还实现了 harness 层集成,能根据 agent 已经看到的内容自适应截断返回,从而大幅节省上下文。
-Inputs are by default interleaved with the working agent. It sends the input as soon as it safely can without breaking the KV cache. Submit with shift enter instead, and it will send a queue send, and wait for the agent to fully finish its turn before sending.
+输入默认会与工作中的 agent 交错发送。它会在不破坏 KV 缓存的前提下尽快发送输入。改用 Shift+Enter 提交,则会进行队列发送,并等待 agent 完全结束当前轮次后再发送。
-Resume sessions from different harnesses. Claude code broke on you? Resume the session from jcode and continue where you left off. Session resume is supported for codex, claude code, opencode, and pi.
+可从不同 harness 恢复会话。Claude Code 崩了?从 jcode 恢复该会话,从上次中断处继续。会话恢复支持 codex、claude code、opencode 和 pi。
-image of /Resume for codex sessions
+Codex 会话 /Resume 界面截图
-Skills are not all loaded on startup. The conversation is embedded as a semantic vector, and will automatically inject a skill if there is an embedding hit similar to memories. The agent has a skill tool for you to manually activate a skill at anytime. You may also activate via slash commands.
+Skills 不会在启动时全部加载。对话会被嵌入为语义向量,若出现与记忆(memories)类似的嵌入命中,会自动注入对应 skill。agent 提供 skill 工具,供你随时手动激活 skill。也可通过斜杠命令激活。
---
-## iOS Application / Native OpenClaw
+## iOS 应用 / 原生 OpenClaw
-A native iOS application version of jcode is coming soon. This will allow you to work with jcode on your personal machine's environment from your phone, via Tailscale. Openclaw like features will be bundled with this iOS application.
+jcode 的原生 iOS 应用版本即将推出。届时你可通过手机经 Tailscale 连接个人机器上的环境来使用 jcode。类似 OpenClaw 的功能将随该 iOS 应用一并提供。
---
-## Other planned features
+## 其他规划功能
-Agents dont like to commit in dirty git state with active changes. Git was clearly not built for multi-agent workflows, and git worktrees is not a good solution. Given this, I believe that is an opporunity for a new git like primitive to be born.
+Agent 不喜欢在存在未提交改动的脏 git 状态下提交。Git 显然不是为多 agent 工作流而设计的,git worktrees 也不是好方案。鉴于此,我认为诞生一种类似 git 的新原语(primitive)是一个机会。
-Build speed improvements: An incremental debug cargo build with cache enabled takes about 1 minute on my machine. The goal is 5-20 seconds. Refactors and crates seams should be able to make this happen.
+构建速度改进:在我机器上,启用缓存的增量 debug cargo 构建大约需要 1 分钟。目标是 5–20 秒。通过重构和 crate 边界调整应能实现这一目标。
@@ -619,7 +625,7 @@ Build speed improvements: An incremental debug cargo build with cache enabled ta
-## Quick Start
+## 快速开始
@@ -641,8 +647,8 @@ jcode connect
jcode dictate
```
-jcode supports interactive TUI use, non-interactive runs, persistent server/client workflows,
-and hotkey-friendly dictation without requiring a bundled speech-to-text stack.
+jcode 支持交互式 TUI 使用、非交互式运行、持久化 server/client 工作流,
+以及无需捆绑语音转文字(speech-to-text)栈的热键友好听写输入。
@@ -656,14 +662,14 @@ and hotkey-friendly dictation without requiring a bundled speech-to-text stack.
---
-## Browser Automation
+## 浏览器自动化
-jcode includes a first-class built-in `browser` tool for browser control inside agent sessions.
+jcode 在 agent 会话中内置了一流的 `browser` 工具,用于浏览器控制。
-Current built-in backend:
-- Firefox via Firefox Agent Bridge
+当前内置后端:
+- 通过 Firefox Agent Bridge 使用 Firefox
-Current built-in tool actions include:
+当前内置工具操作包括:
- `status`
- `setup`
- `open`
@@ -681,23 +687,23 @@ Current built-in tool actions include:
- `upload`
- `press`
-Quick setup:
+快速配置:
```bash
jcode browser status
jcode browser setup
```
-Once setup is complete, the model can use the built-in `browser` tool directly. The UI also summarizes browser tool calls compactly, for example opening a URL, clicking a selector, or typing into a field without echoing sensitive typed text.
+配置完成后,模型可直接使用内置的 `browser` 工具。UI 也会紧凑汇总浏览器工具调用,例如打开 URL、点击选择器或在字段中输入,且不会回显敏感的输入文本。
-Notes:
-- the provider/tool architecture is in place for additional backends
-- Firefox is the wired built-in backend today
-- Chrome bridge / remote debugging style providers can be added on top of the same browser tool later
+说明:
+- provider/tool 架构已就位,可接入更多后端
+- 目前内置并接好线的是 Firefox
+- 后续可在同一浏览器工具之上添加 Chrome bridge / 远程调试风格的提供商
---
-## Further Reading
+## 延伸阅读
- [Ambient Mode / OpenClaw](docs/AMBIENT_MODE.md)
- [Browser Provider Protocol](docs/BROWSER_PROVIDER_PROTOCOL.md)
@@ -712,11 +718,11 @@ Notes:
---
-## Detailed Installation
+## 详细安装
-### Setup
+### 安装
-If you want another agent to set up jcode for you, give it this prompt:
+若想让另一个 agent 帮你安装 jcode,把下面这段提示词交给它:
```text
Set up jcode on this machine for me.
@@ -775,18 +781,16 @@ Set up jcode on this machine for me.
9. Explain any manual step that still needs me, especially browser OAuth, device login, API key entry, or browser extension approval.
```
-This is intended to be a copy-paste bootstrap prompt for jcode itself or any other coding agent.
+本文旨在作为可直接复制粘贴的引导提示(bootstrap prompt),供 jcode 本身或任何其他编程智能体使用。
-### Quick Install
+### 快速安装
```bash
# macOS & Linux
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash
```
-On Termux, install the glibc runtime and `patchelf` first so the installer can
-patch the downloaded Linux binary to Termux's glibc dynamic linker and create a
-launcher that avoids Termux's `LD_PRELOAD` shim:
+在 Termux 上,请先安装 glibc 运行时和 `patchelf`,以便安装程序能将下载的 Linux 二进制文件修补为 Termux 的 glibc 动态链接器,并创建一个可避开 Termux `LD_PRELOAD` 垫片(shim)的启动器:
```bash
pkg install glibc patchelf
@@ -798,14 +802,14 @@ curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/insta
irm https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.ps1 | iex
```
-### macOS via Homebrew
+### 通过 Homebrew 在 macOS 上安装
```bash
brew tap 1jehuang/jcode
brew install jcode
```
-### From Source (all platforms)
+### 从源码构建(全平台)
```bash
git clone https://github.com/1jehuang/jcode.git
@@ -813,49 +817,44 @@ cd jcode
cargo build --release
```
-For local self-dev / refactor work on Linux x86_64, prefer:
+若在 Linux x86_64 上进行本地自研 / 重构工作,建议使用:
```bash
scripts/dev_cargo.sh build --release -p jcode --bin jcode
scripts/dev_cargo.sh --print-setup
```
-That wrapper automatically uses `sccache` when available, prefers a fast
-working local linker setup (`clang + lld`) instead of assuming every machine's
-`mold` configuration is valid, and can print the active linker/cache setup via
-`--print-setup` so slow-path builds are easier to diagnose.
+该封装脚本会在可用时自动使用 `sccache`,优先采用快速的本地链接器配置(`clang + lld`),而非假定每台机器上的 `mold` 配置均有效;还可通过 `--print-setup` 打印当前链接器/缓存配置,便于诊断慢速构建路径。
-Then symlink to your PATH:
+然后将其符号链接到你的 PATH:
```bash
scripts/install_release.sh
```
-### Uninstall
+### 卸载
-Removes installed binaries and the launcher but keeps your config, auth, and
-sessions so a clean reinstall picks up where you left off:
+会移除已安装的二进制文件和启动器,但保留你的配置、认证信息和会话,以便干净重装后可从上次状态继续:
```bash
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/uninstall.sh | bash -s -- --yes
```
-For a full wipe of everything including config, auth, sessions, logs, and
-memory (useful for recovering from a broken install):
+若要彻底清除所有内容(包括配置、认证信息、会话、日志和内存,适用于从损坏的安装中恢复):
```bash
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/uninstall.sh | bash -s -- --purge --yes
```
-Add `--dry-run` to preview what would be removed without deleting anything.
+添加 `--dry-run` 可预览将被移除的内容,而不会实际删除任何数据。
-### Platform Support
+### 平台支持
-| Platform | Status |
+| 平台 | 状态 |
|---|---|
-| **Linux** x86_64 / aarch64 | Fully supported |
-| **macOS** Apple Silicon & Intel | Supported |
-| **Windows** x86_64 | Supported (native + WSL2) |
-| **Termux** aarch64 / x86_64 | Supported with `pkg install glibc patchelf` |
+| **Linux** x86_64 / aarch64 | 完全支持 |
+| **macOS** Apple Silicon & Intel | 支持 |
+| **Windows** x86_64 | 支持(原生 + WSL2)|
+| **Termux** aarch64 / x86_64 | 支持(需 `pkg install glibc patchelf`)|
|