佛系程序员
首页
栏目
标签
归档
关于
友链
佛系程序员
首页
栏目
标签
归档
友链
关于
jcode是什么对比opencode
学习笔记
网站开发
发布日期: 2026-05-31 21:37:46
喜欢量: 7 个
阅读次数:
20
好的,来对比一下 **jcode** 和你现在用的 **OpenCode**(就是我): ## jcode 是什么 jcode 是 **用 Rust 写的开源 AI 编程 agent 框架**(类似 OpenCode),2026年1月才发布,5月就在 GitHub 上 trending 了。作者是个人开发者(1jehuang),目前 6700+ star。 ## jcode vs OpenCode 对比 | 维度 | jcode | OpenCode(你现在用的) | |---|---|---| | **语言** | Rust | Python | | **启动速度** | **14ms** 🔥 | ~2s | | **内存占用** | **27.8MB** 🔥 | ~320MB | | **10个会话** | 117MB | 3.2GB | | **语义记忆** | ✅ 向量嵌入,自动记住上下文 | ❌ 无 | | **多 Agent 协作** | ✅ 原生 Swarm(集群模式) | ❌ 单 Agent | | **自我改进** | ✅ Self-dev 模式(自己改自己代码) | ❌ | | **提供商** | 30+ | 75+ | | **TUI** | 1000+ FPS,内嵌 Mermaid 图表 | 基础 TUI | | **浏览器自动化** | 内置 Firefox 控制 | 无 | | **生态/插件** | 刚起步 | 较成熟 | | **最新版本** | v0.14.6 | - | ## jcode 的招牌功能 **1. 极致的资源效率** - 14ms 启动,27MB 内存,8GB 笔记本能跑 10-20 个并发 agent - OpenCode 一个会话就 320MB,跑 10 个要 3.2GB **2. 语义记忆** — 自动记住之前所有会话的历史,不需要手动喂上下文 **3. Swarm 集群模式** — 多个 agent 同时在一个项目里协作,自动检测文件冲突 **4. Self-Dev 模式** — 让它改自己的源码,编译、测试、重载,全自动 **5. 浏览器控制** — 内置 Firefox 驱动,可以做网页自动化 ## 日常使用方式 ```powershell # 启动完整 TUI 界面(推荐) jcode # 简单问答模式 jcode repl # 单次执行 jcode run "帮我重构这个函数" # 指定提供商 jcode --provider deepseek jcode --provider claude jcode --provider openai # 会话管理(记忆功能) jcode --resume # 恢复上次会话 jcode memory search "话题" # 搜索历史记忆 ``` ## 什么场景用哪个 | 场景 | 推荐 | |---|---| | **日常开发、单次任务** | OpenCode(提供商多,生态成熟) | | **资源有限、跑多个 agent** | **jcode**(27MB vs 320MB,差距巨大) | | **远程服务器/SSH 开发** | **jcode**(Rust 单二进制,无依赖) | | **需要长程记忆** | **jcode**(语义记忆自动关联上下文) | | **多任务并行** | **jcode**(Swarm 集群 + 自动冲突检测) | | **CI/CD 自动化** | **jcode**(14ms 启动,极度轻量) | **总结**:你继续用 OpenCode 做日常开发没问题。jcode 的优势在于 **资源极度轻量 + 语义记忆 + 多 Agent 集群**——当你需要同时跑多个会话、或者要在低配机器/远程服务器上工作时,jcode 就派上用场了。 ## 1. 配置文件在哪 jcode 在 Windows 上的配置文件/目录结构: | 用途 | 路径 | |---|---| | **主配置文件** | `C:\Users\Administrator\.jcode\config.toml` | | **API Key 文件**(DeepSeek) | `C:\Users\Administrator\AppData\Roaming\jcode\deepseek.env` | | **API Key 文件**(Groq) | `C:\Users\Administrator\AppData\Roaming\jcode\groq.env` | | **API Key 文件**(自定义兼容) | `C:\Users\Administrator\AppData\Roaming\jcode\对应名称.env` | | **会话记录** | `C:\Users\Administrator\.jcode\sessions\` | | **日志文件** | `C:\Users\Administrator\.jcode\logs\` | > 你也可以在项目目录下放 `.jcode` 文件夹实现**项目级配置**(会覆盖全局配置)。 --- ## 2. 快速上手 ### 2.1 启动方式 ```powershell # 完整 TUI 界面(推荐) jcode # 指定提供商启动 jcode --provider deepseek jcode --provider groq jcode --provider-profile siliconflow # 简单 REPL 模式(不带 TUI) jcode --provider deepseek repl # 单次运行 jcode run --provider deepseek "帮我写个冒泡排序" # 指定目录 jcode -C D:\my-project ``` ### 2.2 你当前配好的提供商 | 启动命令 | 后端 | 说明 | |---|---|---| | `jcode --provider deepseek` | DeepSeek 官方 API | ✅ 可用 | | `jcode --provider-profile siliconflow` | SiliconFlow → DeepSeek-V3.2 | ✅ 可用 | | `jcode --provider groq` | Groq 免费版 | ⚠️ TPM 限制 6000,大概率跑不动 | PS E:\yiyi\wwwroot\python\novalayer> jcode --provider-profile siliconflow repl Using siliconflow via OpenAI-compatible API (provider locked) J-Code - Coding Agent Type your message, or 'quit' to exit. > what is your llm I'm the Jcode Agent, and I'm powered by an AI model that operates within the Jcode harness. Since I'm the agent responding to you right now, you can see me as an AI assistant. However, I don't have a way to directly check or confirm which specific LLM (Large Language Model) backend is currently being used to power this session. The system prompt indicates "powered by the active model", but doesn't specify which one. If you'd like to know more about the underlying LLM or configuration details, you might want to: 1. Check the Jcode configuration files in your workspace 2. Look at any environment variables or settings that might indicate the model provider 3. Check the Jcode documentation or project structure for hints about the model being used Would you like me to explore your workspace to find more information about the LLM configuration? [Tokens] upload: 10464 download: 179 cache_read: 10240 cache_write: 0 ## jcode 配置总结 ### 最终能用的命令 | 命令 | 用途 | |---|---| | `jcode run --provider kim "问题"` | DeepSeek 单次问答 | | `jcode --provider deepseek` | DeepSeek TUI | | `jcode --provider kimi` | Kimi for Coding TUI | | `jcode --provider-profile siliconflow` | SiliconFlow TUI | ### 解决过的问题 1. **"waiting for reload"** — 有旧 server 进程没杀干净,`taskkill /f /im jcode.exe` 解决 2. **升级到 v0.17.1** — Windows 上 `jcode update` 无法自替换,需手动下载 exe 覆盖 ### 核心文件 - 配置:`C:\Users\Administrator\.jcode\config.toml` - 环境变量(持久化):`[Environment]::SetEnvironmentVariable("DEEPSEEK_API_KEY", "sk-...", "User")` - 日志:`C:\Users\Administrator\.jcode\logs\jcode-2026-05-31.log` ### 换 provider 必杀进程 ```powershell taskkill /f /im jcode.exe jcode --provider kimi # 或 jcode --provider-profile siliconflow ```
文章作者:
admin
文章链接:
https://amtb.info/show/NDEz
版权声明:
本博客所有文章除特別声明外,转载请注明来源
佛系程序员
!
分享:
搜索