can1357 / oh-my-pi

can1357 / oh-my-pi

A coding agent with the IDE wired in. omp.sh Fork of Pi by @mariozechner The most capable agent surface that ships. Continuously tuned by real-world use — complete out of the box, open all the way down. 40+ providers · 32 built-in tools · 13 lsp ops · 27 dap ops · ~27k lines of Rust core. 一个深度集成 IDE 的编程智能体。omp.sh 是 @mariozechner 所开发的 Pi 的分支版本,也是目前市面上功能最强大的智能体平台。它通过真实场景的使用不断优化,开箱即用,且完全开源。包含 40+ 模型提供商、32 个内置工具、13 个 LSP 操作、27 个 DAP 操作,以及约 2.7 万行 Rust 核心代码。

Install macOS · Linux curl -fsSL https://omp.sh/install | sh Bun (recommended) bun install -g @oh-my-pi/pi-coding-agent Windows (PowerShell) irm https://omp.sh/install.ps1 | iex Pinned versions (mise) mise use -g github:can1357/oh-my-pi macOS · Linux · Windows · bun ≥ 1.3.14 安装方式:macOS/Linux 使用 curl -fsSL https://omp.sh/install | sh;Bun(推荐)使用 bun install -g @oh-my-pi/pi-coding-agent;Windows (PowerShell) 使用 irm https://omp.sh/install.ps1 | iex。固定版本管理(mise)使用 mise use -g github:can1357/oh-my-pi。支持 macOS、Linux、Windows,要求 bun ≥ 1.3.14。

Every tool, benchmaxxed. Edits that land on the first attempt. Reads that summarize files instead of dumping their content. Searches that return instantly. Pick any model — omp will get it right. 每一个工具都经过了性能极限优化。代码修改一次成功;读取文件时提供摘要而非直接倾倒全文;搜索响应即时。无论选择哪种模型,omp 都能确保其表现出色。

model metric what Grok Code Fast 1 6.7% → 68.3% Tenfold lift the moment the edit format stops eating the model alive. Gemini 3 Flash +5 pp Over str_replace — beats Google’s own best attempt at the format. Grok 4 Fast −61% tokens Output collapses once the retry loop on bad diffs disappears. MiniMax 2.1× Pass rate more than doubles. Same weights, same prompt. 模型指标表现:Grok Code Fast 从 6.7% 提升至 68.3%,当编辑格式不再消耗模型算力时,性能提升了十倍。Gemini 3 Flash 在 str_replace 基础上提升了 5 个百分点,超越了谷歌官方的最佳实现。Grok 4 Fast 减少了 61% 的 token 消耗,消除了因 diff 错误导致的重试循环。MiniMax 的通过率翻了 2.1 倍,在相同权重和提示词下表现更佳。

read : summarized snippets · ideal defaults · selector hit rate search : fastest in the west lsp : everything your IDE knows, the agent knows prompts : adjusted relentlessly for each model Read the full post ↗ read:提供摘要片段、理想的默认设置、高选择命中率。search:业界最快。lsp:IDE 知道的一切,智能体都知道。prompts:针对每个模型进行不懈调整。阅读全文 ↗

The Pi you love, with batteries included. Originally built on Mario Zechner’s wonderful Pi, omp adds everything you’re missing. 你所喜爱的 Pi,现已内置全套功能。omp 基于 Mario Zechner 出色的 Pi 构建,并补全了你所需要的一切。

01 · Code execution w/ tool-calling Most harnesses give the agent a Python sandbox and call it done. Ours runs persistent Python and a Bun worker, and either kernel can call back into the agent’s own tools — read, search, task — over a loopback bridge. The agent loads a CSV with tool.read from inside Python, charts it from JavaScript, and never leaves the cell. 01 · 带工具调用的代码执行:大多数框架只给智能体一个 Python 沙箱就完事了。而我们运行持久化的 Python 和 Bun worker,任何一个内核都可以通过回环桥接调用智能体的工具(read, search, task)。智能体可以在 Python 内部用 tool.read 加载 CSV,用 JavaScript 绘图,无需离开当前环境。

02 · LSP wired into every write Ask for a rename and you get a rename. The call goes through workspace/willRenameFiles, so re-exports, barrel files, and aliased imports update before the file moves. Everything your IDE knows, the agent knows. 02 · 深度集成 LSP 的写入:请求重命名,它就能完成重命名。调用会经过 workspace/willRenameFiles,因此在文件移动前,重导出、barrel 文件和别名导入都会自动更新。IDE 知道的一切,智能体都知道。

03 · Drives a real debugger A C binary segfaults: the agent attaches lldb, steps to the bad pointer, reads the frame. A Go service hangs: it attaches dlv and walks the goroutines. A Python process is wedged: debugpy, pause, inspect, evaluate. Most agents are still sprinkling print statements. Watch the capture ↗ 03 · 驱动真正的调试器:C 二进制文件段错误时,智能体挂载 lldb,步进到错误指针并读取帧;Go 服务挂起时,挂载 dlv 并遍历 goroutines;Python 进程卡死时,使用 debugpy 暂停、检查、评估。大多数智能体还在到处加 print 语句。观看演示 ↗

04 · Time-traveling stream rules Your rules sit dormant until the model goes off-script. A regex match aborts the stream mid-token, injects the rule as a system reminder, and retries from the same point. You get course-correction without paying context tax on every turn. Injections survive compaction, so the fix sticks. Watch the capture ↗ 04 · 时光倒流式流规则:你的规则在模型偏离脚本前处于休眠状态。一旦正则匹配触发,流会在 token 中途终止,将规则作为系统提醒注入,并从同一点重试。你无需在每一步都支付上下文成本即可实现纠偏。注入内容在压缩后依然有效,因此修复是持久的。观看演示 ↗

05 · First-class subagents Split a job across workers and get typed results back. task fans out into isolated worktrees, each worker runs its own tool surface, and the final yield is a schema-validated object the parent reads directly. No prose to parse, no merge conflicts between siblings, no orphaned edits. Watch the capture ↗ 05 · 一等公民子智能体:将任务分配给多个 worker 并获取类型化的结果。task 会分发到隔离的工作树中,每个 worker 运行自己的工具集,最终产出是一个父进程可直接读取的、经过模式验证的对象。无需解析文本,没有兄弟任务间的合并冲突,也没有孤立的编辑。观看演示 ↗

06 · Read a pdf on arxiv, why not? web_search chains fourteen ranked providers and hands whatever URLs it finds straight to read. Arxiv PDFs, GitHub pages, Stack Overflow threads come back as structured markdown with anchors intact — the same tool surface you use on local files. Cite, follow, quote, never lose where you came from. Watch the capture ↗ 06 · 阅读 Arxiv PDF,有何不可?web_search 串联了 14 个排名靠前的提供商,并将找到的 URL 直接交给 read 处理。Arxiv PDF、GitHub 页面、Stack Overflow 帖子都会以带有锚点的结构化 Markdown 格式返回——与你处理本地文件使用的工具集完全一致。引用、追踪、摘录,永远不会迷失来源。观看演示 ↗

07 · Unapologetically native. Even on Windows. Other agents shell out to rg, grep, find, and bash. On many machines those binaries don’t exist, and on the ones where they do, every call costs a fork-exec round-trip. omp links the real implementations into the process. ripgrep, glob, find: in-process. brush is the bash, with sessions that survive across calls. The same omp binary runs on macOS, Linux, and Windows — no WSL bridge. 07 · 极致原生,甚至在 Windows 上。其他智能体通过 shell 调用 rg、grep、find 和 bash。在许多机器上这些二进制文件不存在,即使存在,每次调用也都有 fork-exec 的开销。omp 将真正的实现链接到进程中。ripgrep、glob、find 都在进程内运行。brush 是内置的 bash,会话跨调用持久存在。同一个 omp 二进制文件可在 macOS、Linux 和 Windows 上运行,无需 WSL 桥接。

08 · Code review with priorities and a verdict Get a clear verdict on whether the change ships, with every issue ranked P0 through P3 and scored for confidence. /review spawns dedicated reviewer subagents that sweep branches, single commits, or uncommitted work in parallel. You tackle what blocks release first; nothing important hides in a wall of prose. 08 · 带有优先级和结论的代码审查:获得关于变更是否可以发布的明确结论,每个问题按 P0 到 P3 分级并给出置信度评分。/review 会生成专门的审查子智能体,并行扫描分支、单个提交或未提交的工作。你优先处理阻碍发布的任务;重要信息不会淹没在长篇大论中。

09 · Hashline: edit by content hash Perfect edits, fewer tokens. The model points at anchors instead of retyping the lines it wants to change, so whitespace battles and string-not-found loops just stop happening. Edit a stale file and the anchors diverge — we reject the patch before it corrupts anything. Grok 4 Fast spends 61% fewer output tokens on the same work. 09 · Hashline:基于内容哈希的编辑。完美的编辑,更少的 token。模型指向锚点而非重写代码行,因此不再有空格冲突和字符串未找到的循环。编辑过期文件时,如果锚点不匹配,我们会拒绝补丁,防止损坏。Grok 4 Fast 在相同工作量下减少了 61% 的输出 token。

10 · GitHub is just another filesystem Other harnesses bolt on gh_issue_view, gh_pr_view, gh_search — each with its own parameters the agent has to learn and you have to debug. We skipped that. read already handles paths; PRs are paths. One interface to teach the model, one surface to keep correct. 10 · GitHub 只是另一个文件系统。其他框架强行添加 gh_issue_view、gh_pr_view、gh_search 等工具,每个工具都有智能体需要学习、你需要调试的参数。我们跳过了这些。read 已经处理了路径;PR 就是路径。只需教会模型一个接口,维护一个表面即可。

11 · Hindsight: memory the agent curates The agent remembers your codebase between sessions. It writes facts mid-run with retain, pulls them back with recall, and compresses each session into a mental model that loads on the first turn of the next one. Project-scoped by default, so what it learns about this repo stays with this repo. 11 · Hindsight:智能体策划的记忆。智能体在会话间记住你的代码库。它在运行中用 retain 写入事实,用 recall 调取,并将每个会话压缩成一个心理模型,在下一次会话的第一轮加载。默认按项目划分作用域,因此它对该仓库的学习内容仅限于该仓库。

12 · ACP: editor-drivable agent Run omp inside Zed and you get the same agent you drive from the terminal — reading the buffer you’re actually looking at, writing through the editor’s save path, spawning shells in the editor’s terminal. Destructive tools pause for a permission prompt you can answer once and forget. No bridge, no plugin, no second brain to keep in sync. 12 · ACP:编辑器驱动的智能体。在 Zed 中运行 omp,你将获得与终端中相同的智能体体验——读取你当前查看的缓冲区,通过编辑器的保存路径写入,在编辑器的终端中生成 shell。破坏性工具会暂停并请求权限,你只需回答一次即可。无需桥接、无需插件、无需同步第二个大脑。

13 · Inherits what your other tools already wrote Every other agent ships an importer and expects you to convert. omp reads the eight formats already on disk in their native shape — Cursor MDC, Cline .clinerules, Codex AGENTS.md, Copilot applyTo, and the rest. No migration script, no YAML-to-TOML port, no “supported subset” footnotes. The config your team wrote last quarter still works tonight. 13 · 继承你现有工具的配置。其他智能体都提供导入器并期望你进行转换。omp 以原生格式读取磁盘上已有的八种格式——Cursor MDC、Cline .clinerules、Codex AGENTS.md、Copilot applyTo 等。无需迁移脚本,无需 YAML 转 TOML,没有“仅支持子集”的脚注。你团队上季度写的配置今晚依然有效。

14 · omp commit: atomic splits 14 · omp commit:原子化拆分。