> 项目地址:[1jehuang/jcode](https://github.com/1jehuang/jcode) | ⭐ 6.1k Stars | 🛠 Rust | 作者 [1jehuang](https://github.com/1jehuang)
---
老实说,Coding Agent 这码子事现在卷得不像话。Claude Code、Codex CLI、OpenCode、Pi……每个都在抢你终端的焦点。但有个问题没人好好解决——这些玩意儿跑起来一个比一个能吃内存,开 10 个 session 你的机器直接废了。
jcode 这项目就是冲着这事儿来的。6.1k Stars、Rust 写的下一代编码 Agent Harness,核心卖点就一个:**27.8 MB 跑一个 session,Claude Code 的 1/14 内存开销**。不是玩具,是真的能打。
> 📌 **中英双语版**:中文为主,英文见下方 `/en` 区块。
---
## 一、⚡ 性能对比:这东西到底有多省?
直接上 README 里的硬数据。单 session 场景:
| 工具 | 内存 (PSS) | 对比 jcode |
|------|-----------|-----------|
| **jcode (本地嵌入关)** | **27.8 MB** | 基准 |
| **jcode** | **167.1 MB** | 6× 更多 |
| Pi | 144.4 MB | 5.2× 更多 |
| Codex CLI | 140.0 MB | 5.0× 更多 |
| OpenCode | 371.5 MB | 13.4× 更多 |
| Claude Code | 386.6 MB | **13.9× 更多** |
10 个 session 同时跑的时候差距更夸张——Claude Code 吃掉 **2.3 GB**,jcode 只有 **260 MB**。启动速度差异更离谱:jcode 首帧 14ms,Claude Code 3.4 秒,差了 **245 倍**。
> *表格数据来自 README 实测,Telegram 查看建议横屏。*
---
## 二、🛠 安装 & 快速上手
一条命令搞定:
```bash
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash
# Windows PowerShell
irm https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.ps1 | iex
```
装完直接跑:
```bash
# 启动 TUI
jcode
# 非交互运行一句命令
jcode run "say hello"
# 按名字恢复之前的 session
jcode --resume fox
# 作为后台服务器运行,多客户端连接
jcode serve
jcode connect
```
这些命令都是 README 里抄的,直接复制就能用。
---
## 三、🧠 Agent 记忆系统
jcode 最骚的操作是它的记忆系统。每次对话自动做语义向量嵌入,然后搞个记忆图谱做余弦相似度查询。不需要 Agent 主动调记忆工具,后台自动干活。
```bash
# 配置记忆侧边代理(sideagent)
# jcode 自动处理,无需手动配置
```
每 N 轮对话自动提取记忆、自动整理(重组、检查过期、冲突解决),走 Ambient Mode 在空闲时完成。**对开发者来说就是零配置开箱即用**。
---
## 四、🐝 Swarm 模式:多 Agent 协作
这才是真·亮点。在同一仓库里 spawn 两个 Agent,它们自动被 server 管理,原生协作:
- Agent A 编辑了 Agent B 正在读的文件 → server 自动通知 B
- Agent B 可以检查 diff,确认不冲突就忽略,有冲突自动处理
- 支持 DM 私聊一个 Agent、广播到所有 Agent、按仓库分组广播
Agent 还能自己 spawn 队友。它们有个 swarm tool,主 Agent 变 coordinator,子 Agent 当 worker,并行干活。这对 CI 和大规模代码库重构来说就是降维打击。
```bash
# 启动 swarm
jcode serve
# 然后在另一个终端
jcode connect
# 重复连接多个客户端,自动进入 swarm 模式
```
---
## 五、🔌 多 Provider 支持 + MCP 配置
jcode 支持几乎所有主流的 LLM 提供商登录:
```bash
# OAuth 登录
jcode login --provider claude
jcode login --provider openai
jcode login --provider gemini
jcode login --provider copilot
# 自托管 OpenAI 兼容端点(如 vLLM)
printf '%s' "$MY_API_KEY" | jcode provider add my-api \
--base-url https://llm.example.com/v1 \
--model my-model-id \
--api-key-stdin \
--set-default
```
MCP 配置走独立的 `~/.jcode/mcp.json`,兼容 `.claude/mcp.json` 格式:
```json
{
"servers": {
"filesystem": {
"command": "/path/to/mcp-server",
"args": ["--root", "/workspace"],
"env": {},
"shared": true
}
}
}
```
首次启动会自动从 Claude Code 和 Codex 的配置里导入已有 MCP 服务器,迁移无感。
---
## 六、🌐 浏览器自动化 & Side Panel
内置 browser 工具,目前后端跑 Firefox Agent Bridge:
```bash
# 查看状态
jcode browser status
# 一键设置
jcode browser setup
```
支持 click、type、fill_form、screenshot、eval 等十几个操作。Side Panel 可以实时显示文件内容、diff 对比,甚至内嵌渲染 Mermaid 图表——作者自己写了个 mermaid-rs-renderer,渲染速度比浏览器快 1800 倍。
---
## 七、总结
jcode 不是又一个 Claude Code 换皮。它在几个关键点上做了根本性的不同选择:
- **Rust 实现**:内存和启动速度直接碾压 Node.js/TypeScript 系的竞品
- **语义记忆系统**:不需要 Agent 调工具,后台自动干活
- **Swarm 原生多 Agent 协作**:不是概念,是真能跑
- **自修改能力**:Self-Dev 模式让 Agent 直接改自己源码然后 reload
如果你已经在用多个 Coding Agent、跑过多 session 工作流、或者对大模型 API 的 Token 开销敏感,这玩意儿值得花 5 分钟装一下试试。
---
> **English Version**
# ⚡ jcode: 6.1k Stars Rust-Powered Coding Agent Harness — Uses 1/14 the RAM of Claude Code
**Repo:** [1jehuang/jcode](https://github.com/1jehuang/jcode) | ⭐ 6.1k Stars | 🛠 Rust
Let's be real — the coding agent space is overcrowded. Claude Code, Codex CLI, OpenCode, Pi... they all fight for your terminal. But nobody's solved the resource problem. Run 10 sessions and your machine chokes.
**jcode** is a next-gen coding agent harness written in Rust. Its headline stat: **27.8 MB per session with embeddings off**, 1/14th of Claude Code's memory footprint. And it's not just lightweight — it's genuinely feature-rich.
---
### Quick Install
```bash
# macOS & Linux
curl -fsSL https://raw.githubusercontent.com/1jehuang/jcode/master/scripts/install.sh | bash
```
### Quick Start
```bash
# Launch TUI
jcode
# Non-interactive
jcode run "say hello"
# Resume session
jcode --resume fox
# Server mode (multi-client)
jcode serve
jcode connect
```
### Key Features
- **🧠 Semantic Memory**: Auto-embeds every turn, queries via cosine similarity. No manual memory tools needed — it just works.
- **🐝 Swarm Mode**: Spawn multiple agents in the same repo. The server handles file change notifications, conflict resolution, and cross-agent messaging.
- **🔌 Provider Support**: Claude, OpenAI, Gemini, Copilot, vLLM, Ollama, and 30+ more via OAuth or config files.
- **🌐 Browser Automation**: Built-in Firefox Agent Bridge integration. One command setup.
- **⚡ Performance**: 27.8 MB base, 14ms first frame. 10 sessions use 260 MB vs Claude Code's 2.3 GB.
- **🔄 Self-Dev**: Agent can edit, build, and reload its own source code autonomously.
### Bottom Line
If you run multiple coding agent sessions, are sensitive to API token costs, or just want a harness that doesn't eat your RAM, install jcode now. One command, zero config.
---
> 标签:Coding Agent, Rust, AI Programming, Agent Harness, MCP, 记忆系统, Swarm