开源项目 GitHub Topic ai-agent 2026-09-18T00:01 正文 ok 4730 words

oh-my-pi:将 IDE 与调试器全面接通的高性能开源 Coding Agent

英文标题:📦 can1357/oh-my-pi

开源项目 oh-my-pi(omp)基于 Mario Zechner 的 Pi 进行了全面重构与增强,拥有约 8 万行 Rust 核心、支持 60+ 模型提供商与 31 种内置工具。它深度集成了 LSP 语言服务协议与 DAP 原生调试器,实现了高精度的代码重构、运行时断点排查与多语言交互执行。通过引入流式规则拦截、类型化子 Agent 派发及双模型审查(Advisor)机制,项目大幅降低了模型在代码生成时的重试开销并显著提升了通过率,为开发者构建下一代终端 AI 编程工作流提供了功能完整的工具范式。
打开原文相关 7.7 · 机会 4
media154.8 KB media1.2 KB media1.3 KB media1.3 KB media1.2 KB media2.8 KB media6.6 KB media1.2 KB media2.9 KB media73.3 KB media834.5 KB media100.4 KB media95.4 KB media199.3 KB media132.0 KB media57.6 KB media224.8 KB media46.6 KB media59.5 KB media2.3 MB

中文

omp

将 IDE 全面接通的 Coding Agent。 omp.sh

npm version Changelog CI License TypeScript Rust Bun Discord

基于 @mariozechner 的 Pi 进行 Fork 开发

当下功能最为强大的开箱即用 Agent 界面。经由真实使用场景持续打磨——开箱即用,自底向上全面开源。

60+ 提供商 · 31 个内置工具 · 14 项 LSP 操作 · 28 项 DAP 操作 · ~8万 行 Rust 核心代码。

说明

Pull Request 目前处于试验阶段,暂时向所有人开放。此前我们在接收 PR 前需要担保(vouch);为评估完全开放贡献的效果,该限制现已暂时解除。根据后续运行情况,担保机制可能会恢复。

macOS · Linux

sh curl -fsSL https://omp.sh/install | sh

Alpine / musl: 预编译的 musl 二进制文件动态链接了 libstdc++/libgcc,而原生 Alpine 并未预装它们。请先执行安装:apk add libstdc++ libgcc。

Homebrew

sh brew install can1357/tap/omp

Bun(推荐)

sh bun install -g @oh-my-pi/pi-coding-agent

Nix

sh

无需安装直接运行

nix run github:can1357/oh-my-pi

或安装到当前激活的 profile 中

nix profile install github:can1357/oh-my-pi

Flake 用户可以使用 packages.<system>.omp、overlays.default、nixosModules.default 或 homeManagerModules.default。Home Manager 配置可以安装 OMP 并以声明式方式管理其设置:

nix { inputs.omp.url = "github:can1357/oh-my-pi";

在你的 Home Manager 模块中:

imports = [ inputs.omp.homeManagerModules.default ]; programs.omp = { enable = true; settings.startup.quiet = true; }; }

Windows (PowerShell)

powershell irm https://omp.sh/install.ps1 | iex

锁定版本(mise)

sh mise use -g github:can1357/oh-my-pi

macOS · Linux · Windows · bun ≥ 1.3.14

omp 会根据实时命令/参数元数据为 bash、zsh 和 fish 自动生成补全脚本,因此它们永远不会与实际的 CLI 脱节。子命令、参数和枚举值支持静态补全;模型名称(--model、--smol、--slow、--plan)会基于内置的模型目录进行解析,而 --resume 会基于本地磁盘上的会话进行匹配解析。

sh

zsh — 添加至 ~/.zshrc(或将输出写入 $fpath 包含的文件中)

eval "$(omp completions zsh)"

bash — 添加至 ~/.bashrc

eval "$(omp completions bash)"

fish

omp completions fish > ~/.config/fish/completions/omp.fish

编辑一次命中。读取时只总结文件关键信息而非一股脑倾倒全部内容。搜索秒级响应。任意选用模型——omp 都能妥善处理。

模型 指标 详情说明
Grok Code Fast 1 6.7% → 68.3% 一旦编辑格式不再严重拖垮模型表现,性能提升达十倍。
Gemini 3 Flash +5 个百分点 相比 str_replace 的提升——超越了 Google 自身对该格式的最佳优化尝试。
Grok 4 Fast −61% Token 一旦摆脱针对错误 diff 的重试循环,输出消耗直接断崖式下降。
MiniMax 2.1× 通过率翻倍以上。完全相同的模型权重,完全相同的 Prompt。
  • read:摘要化代码片段 · 理想的默认设置 · 高选择器命中率
  • grep:全网最快检索
  • lsp:你的 IDE 所知晓的一切,Agent 同样知晓
  • prompts:针对每个模型进行持续且极致的微调

阅读完整博文 ↗

你所热爱的 Pi,现已自带电池全开(Batteries Included)。

最初基于 Mario Zechner 优秀的 Pi 打造,omp 为其补齐了你所缺失的所有拼图。

01 · 具备工具调用能力的代码执行

大多数运行环境(harness)只是丢给 Agent 一个 Python 沙箱就草草了事。而我们提供持久化的 Python 与 Bun 工作线程,两个内核都可以通过环回网桥(loopback bridge)反向调用 Agent 自身的工具——read、search、task。Agent 可以直接在 Python 内部使用 tool.read 加载 CSV,再直接用 JavaScript 绘制图表,全程无需离开该执行单元。

omp TUI 正在运行 Python 代码并渲染图表。

02 · LSP 深度融入每次代码写入

发起重命名请求,就能得到精准的全局重命名。调用过程遵循 workspace/willRenameFiles 协议规范,因此在文件移动之前,二次导出(re-exports)、统一入口文件(barrel files)以及别名导入都会同步更新。IDE 知道的一切,Agent 全都知道。

运行着 TypeScript 与 Biome 语言服务器的 omp TUI。

阅读 LSP 配置文档

03 · 驱动真正的调试器

C 编译文件发生段错误:Agent 会挂载 lldb,单步步进到错误指针位置,读取调用栈帧。Go 服务假死:挂载 dlv 并遍历 goroutine。Python 进程卡死:借助 debugpy 进行暂停、检查并执行表达式求值。当大多数 Agent 还在满屏塞 print 调试时,omp 已经开始运行专业调试器。

omp TUI:针对 /tmp/omp-native/demo 原生二进制程序运行的实时 lldb-dap 会话。适配器为 lldb-dap,状态为 stopped,栈帧为 xorshift32,指令指针 0x10000055C,位于 demo.c:6:10。Debug scopes 与 Debug variables 卡片展示了局部变量(x = 57351),且 Agent 验证了该计算逻辑:x 从 7 → 57351 (= 7 ^ (7<<13))。

视频/嵌入内容:观看实录演示

04 · 时空回溯流式规则(Time-traveling stream rules)

你的规则始终保持休眠状态,直到模型偏离预期轨道。正则匹配可在 Token 输出的中途立即中断数据流,将规则作为系统提示注入,并从同一处断点重新开始尝试。你无需为每一轮对话承受上下文成本,就能实现精准的实时纠偏。注入内容在上下文压缩(compaction)后依然得以保留,确保修正持续生效。

omp TUI:Agent 正在读取 src.rs 准备写入 Box::leak 时请求中断(红色 Error: Request was aborted),黄色 ⚠ Injecting rule: box-leak 卡片注入了规则内容“Don't reach for Box::leak in production code paths”,随后 Agent 自动修正路线提出改用 Arc<str> 并请求用户确认。

视频/嵌入内容:观看实录演示

05 · 原生一等公民子 Agent

将任务拆解分发给多个 Worker,并取回具备强类型定义的结果。task 会扇出分发到各自独立的 Git worktree 中,每个 Worker 运行自己独立的工具环境,最终产生符合 Schema 校验的对象并由父级直接读取。无需解析自然语言文本,各个子任务之间不会产生合并冲突,也不存在孤立遗留的代码修改。

omp TUI 显示 task 衍生出 ComponentsExports 和 RoutesExports 两个子 Agent,约束块要求同伴之间使用 IRC 私信,每个子 Agent 状态卡片展示开销和耗时,最后的 Findings 部分列出两个导出结果以及关于单向握手的真实“IRC 协作记录”。

视频/嵌入内容:观看实录演示

在任务运行时直观监控多任务扇出:快捷键 Alt+A 可打开 Agent Hub,花名册会展示每个子 Agent 的实时动态与资源消耗。点开任意一个即可查看实时交互记录、输入引导消息、唤醒暂歇的 Worker,或者强制终止卡死的子任务而无需中止父会话。

06 · 双模型机制:第二模型全程审查

为“顾问(advisor)”角色配置一个专门的审查模型,它会审视主 Agent 的每一步操作,并在行内实时注入批注——无论是轻声提醒、潜在担忧,还是硬性拦截。它运行在完全独立的上下文与模型之上,能够敏锐捕捉执行者匆忙间遗漏的疏漏。主 Agent 接收到批注后可立即纠偏,或向你解释不予采纳的原因。

omp TUI:/advisor 状态显示顾问模型运行于 openai-codex/gpt-5.5;在主 Agent 将 catch 错误捕获范围限定在 ENOENT 而非捕获所有错误后,黄色“Advisor 1 note (concern)”卡片发出告警,提示该修改不再符合用户的字面验收标准。

视频/嵌入内容:观看实录演示

07 · 抛出链接,即刻加入协作

运行 /collab 会将你的实时会话发布到中继服务上,并返回一个访问链接以及二维码。团队成员可以通过 omp join 从另一个终端加入,也可以直接在浏览器中打开。分享读写权限即可针对同一个 Agent 进行结对编程,或者使用 /collab view 生成只读链接,供他人实时围观而无法干预引导。数据帧在客户端均已加密;中继服务绝不会触碰你的密钥。

omp TUI:/collab view 输出“Collab session started!”,包含 omp join 命令、my.omp.sh 浏览器链接以及“Anyone with this link can watch the session but cannot prompt the agent”的说明,并附带一个大型可扫描二维码。

视频/嵌入内容:观看实录演示

08 · 直接阅读 arXiv 论文,又有何不可?

web_search 串联了 23 个排序数据源,并将检索到的 URL 直接移交给 read 处理。无论是 arXiv 上的 PDF、GitHub 页面,还是 Stack Overflow 的问答,都会解析为保留锚点结构的格式化 Markdown——这与你在本地文件上使用的工具界面完全一致。引用、跳转、摘录,探索轨迹永不迷失。

omp TUI:web_search 针对推理阶段算力扩展返回了 10 个按排序排列的 Perplexity 来源,Agent 选中一篇 arXiv 论文,调用 read https://arxiv.org/pdf/2604.10739v1,并用具体数据概括了该论文的核心结论。

English / 原文

omp

A coding agent with the IDE wired in. omp.sh

npm version Changelog CI License TypeScript Rust Bun Discord

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.

60+ providers · 31 built-in tools · 14 lsp ops · 28 dap ops · ~80k lines of Rust core.

Note

Pull requests are temporarily open to everyone as a trial. We previously required a vouch before accepting PRs; that requirement is lifted for now while we evaluate how open contributions go. Depending on the results, the vouch system may return.

macOS · Linux

curl -fsSL https://omp.sh/install | sh

Alpine / musl: the prebuilt musl binary links libstdc++/libgcc dynamically, which stock Alpine does not ship. Install them first: apk add libstdc++ libgcc.

Homebrew

brew install can1357/tap/omp

Bun (recommended)

bun install -g @oh-my-pi/pi-coding-agent

Nix

# Run without installing
nix run github:can1357/oh-my-pi

# Or install into the active profile
nix profile install github:can1357/oh-my-pi

Flake consumers can use packages.<system>.omp, overlays.default, nixosModules.default, or homeManagerModules.default. A Home Manager configuration can install OMP and own its settings declaratively:

{
  inputs.omp.url = "github:can1357/oh-my-pi";

  # In your Home Manager module:
  imports = [ inputs.omp.homeManagerModules.default ];
  programs.omp = {
    enable = true;
    settings.startup.quiet = true;
  };
}

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

omp generates its own completion scripts for bash , zsh , and fish from the live command/flag metadata, so they never drift from the actual CLI. Subcommands, flags, and enum values complete statically; model names (--model, --smol, --slow, --plan) resolve against the bundled model catalog and --resume against your on-disk sessions.

# zsh — add to ~/.zshrc (or write the output into a file on your $fpath)
eval "$(omp completions zsh)"

# bash — add to ~/.bashrc
eval "$(omp completions bash)"

# fish
omp completions fish > ~/.config/fish/completions/omp.fish

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.

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.
  • read : summarized snippets · ideal defaults · selector hit rate
  • grep : fastest in the west
  • lsp : everything your IDE knows, the agent knows
  • prompts : adjusted relentlessly for each model

Read the full post ↗

The Pi you love , with batteries included.

Originally built on Mario Zechner's wonderful Pi, omp adds everything you're missing.

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.

omp TUI running Python code and rendering a chart.

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.

omp TUI with TypeScript and Biome language servers active.

Read the LSP config docs

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.

omp TUI: a live lldb-dap session against a native binary at /tmp/omp-native/demo. Adapter=lldb-dap, Status=stopped, Frame=xorshift32, Instruction pointer 0x10000055C, Location demo.c:6:10. Debug scopes and Debug variables cards show locals (x = 57351) and the agent confirms the math: x went from 7 → 57351 (= 7 ^ (7<<13)).

Watch the capture ↗

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.

omp TUI: agent reading src.rs and about to write Box::leak when the request aborts (red Error: Request was aborted), an amber ⚠ Injecting rule: box-leak card injects the rule body Don't reach for Box::leak in production code paths, and the agent then course-corrects by proposing Arc<str> and asking the user to confirm.

Watch the capture ↗

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.

omp TUI showing task spawning two subagents ComponentsExports and RoutesExports, the constraints block requiring an IRC DM between peers, the per-subagent status cards with cost and duration, and a final Findings section listing both exports plus an honest 'IRC coordination note' about a one-sided handshake.

Watch the capture ↗

Watch the fan-out while it runs: Alt+A opens Agent Hub, where the roster shows current activity and usage for every subagent. Open one to read its live transcript, type a steering message, revive a parked worker, or kill a stuck one without aborting the parent session.

06 · A second model, watching every turn.

Pair a reviewer model to the 'advisor' role and it reads every turn the main agent takes, injecting notes inline — a quiet aside, a concern, or a hard blocker. It runs on its own context and its own model, so it catches what the doer rushed past. The main agent sees the note and course-corrects, or tells you why it won't.

omp TUI: /advisor status shows the advisor running on openai-codex/gpt-5.5; after the main agent scopes a catch to ENOENT instead of swallowing every error, an amber 'Advisor 1 note (concern)' card warns the fix no longer matches the user's literal acceptance criterion.

Watch the capture ↗

07 · Hand someone the link, they're in.

/collab puts your live session on a relay and hands back a link — and a QR. A teammate joins from another terminal with omp join, or just opens it in a browser. Share read-write to pair on the same agent, or /collab view for a read-only link anyone can watch but no one can steer. Frames are sealed client-side; the relay never sees your keys.

omp TUI: /collab view prints 'Collab session started!' with an omp join command, a my.omp.sh browser link, the note 'Anyone with this link can watch the session but cannot prompt the agent', and a large scannable QR code.

Watch the capture ↗

08 · Read a pdf on arxiv, why not?

web_search chains twenty-three 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.

omp TUI: web_search returns 10 ranked Perplexity sources for inference-time compute scaling, the agent picks an arxiv paper, calls read https://arxiv.org/pdf/2604.10739v1, and summarizes the paper's headline result with real numbers.

Watch the capture ↗

09 · 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, and 58 command-line utilities (ls, sed, sort, xargs, even jq) ported into the builtins crate and run in-process, zero fork/exec. The same omp binary runs on macOS, Linux, and Windows — no WSL bridge.

10 · 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.

11 · 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.

12 · 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.

13 · Memory the agent curates

The agent remembers your codebase between sessions. It writes facts mid-run with retain, captures reusable lessons with learn, pulls them back with recall, and compresses each session into a mental model that loads on the first turn of the next one. Pick the engine with memory.backend — local, Hindsight, or Mnemopi. Project-scoped by default, so what it learns about this repo stays with this repo.

14 · 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.

15 · 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.

16 · omp commit: atomic splits, validated messages

omp reads the working tree through git_overview, git_file_diff, and git_hunk, then splits unrelated changes into atomic commits ordered by their dependencies. Cycles are rejected before anything is written. Source files score above tests, docs, and configs, so the headline commit is the one that matters. Lock files are excluded from analysis entirely.

17 · Read PRs. Walk skills. Pull JSON out of subagents.

Sixteen internal schemes — pr://, issue://, agent://, skill://, ssh://, and the rest — resolve transparently inside every FS-shaped tool the agent already calls. read pr://1428 returns the same shape as read src/foo.ts. grep walks a diff like a directory. agent://<id>/findings.0.path pulls a field out of a subagent's output by path.

18 · Conflict resolution, made easy.

Each merge conflict becomes one URL. The agent writes @theirs, @ours, or @base to conflict://N and the file resolves cleanly. Bulk form: conflict://*.

omp TUI: ✓ Read src/session.ts (⚠ 1 conflict), then ✓ Write conflict://1 · 1 line with content @theirs, then a confirmation 'Resolved.'

Watch the capture ↗

19 · Preview, then accept.

ast_edit returns a (proposed) card with the replacement count. The change is staged. The agent writes a one-line reason to xd://resolve; the TUI turns it into an Accept card and the disk move happens — atomic, all or nothing.

omp TUI: ✓ AST Edit: console.log($X) (proposed) 3 replacements · 1 file, then ✓ Accept: 3 replacements in 1 file (AST Edit), followed by 'Applied 3 replacements in src/auth.ts.'

Watch the capture ↗

20 · Drives a real browser. Or your Slack?

Eval's browser.open(...) returns a tab handle with direct navigation, inspection, interaction, and element helpers; tab.run(...) handles custom JavaScript. It drives Chromium or Electron in an isolated tab runtime. Stealth is on by default, while the browser relay can adopt Chrome tabs you already have open without stealing focus.

21 · Hands on the desktop itself

Eval's computer helpers — computer.window(...), win.screenshot(), win.ax(), el.press(), plus computer.run(fnOrCode, options) for multi-step scripts — control the real host: enumerate windows and displays, capture screenshots, send native input, walk the OS accessibility tree, and use the clipboard. It exposes no browser DOM.

Whatever the task needs, it's already in the box.

Core tools live in the same namespace as read and bash. Pin the active set with --tools read,edit,bash,…; rarely used discoverable tools stay behind xd:// devices. read xd:// lists them, and write xd://<tool> runs one when tools.xdev is enabled.

Files & search

  • read — files, dirs, archives, SQLite, PDFs, notebooks, URLs, remote ssh:// paths, and internal :// schemes through one path.
  • write — create or overwrite a file, archive entry, or SQLite row.
  • edit — hashline patches with content-hash anchors and stale-anchor recovery.
  • ast_edit — structural rewrites previewed before apply, via ast-grep.
  • ast_grep — structural code queries over 50+ tree-sitter grammars.
  • grep — regex over files, globs, and internal URLs.
  • glob — glob-based path lookup; reach for grep when you need content matches.

Runtime

  • bash — workspace shell with 46 in-process coreutils, optional PTY, and background-job dispatch.
  • eval — persistent Python and JavaScript cells with shared prelude and tool re-entry.

Code intelligence

  • lsp — diagnostics, navigation, symbols, renames, code actions, raw requests.
  • debug — drive a DAP session — breakpoints, stepping, threads, stack, variables.
  • security_scan — plan and run native security reviews; drives Codex Security cloud scans.

Coordination

  • task — fan out subagents in parallel, optionally workspace-isolated.
  • hub — message live agents, wait on or cancel background jobs, and supervise long-running processes.
  • todo — ordered mutations over the session todo list with phase tracking.
  • ask — structured follow-up questions for interactive runs.

Desktop & web

  • browser — Puppeteer tabs over headless Chromium, CDP-attached apps, or your own Chrome via the relay.
  • computer — persistent JS against the host desktop: windows, screenshots, native input, AX tree, clipboard.
  • web_search — one query across configured providers, returning answer plus citations.
  • github — GitHub CLI ops — repo, PR, issues, code search, Actions run-watch.
  • generate_image — generate or edit raster images via Gemini, GPT, or xAI Grok image models.
  • tts — text-to-speech via xAI Grok Voice — five built-in voices, WAV or MP3.

Memory & skills

  • checkpoint — mark conversation state for a later collapse-and-report.
  • rewind — prune exploratory context, keep a concise report.
  • retain — queue durable facts into the active memory bank.
  • recall — search the memory bank for raw memories.
  • reflect — synthesize an answer over the bank.
  • memory_edit — update, forget, or invalidate stored memories by id.
  • learn — capture a reusable lesson; optionally promote it into a managed skill.
  • manage_skill — create, update, or delete an isolated managed skill.

Setting-gated, off by default: github, security_scan, generate_image, tts, checkpoint, rewind, and the memory tools (retain/recall/reflect/memory_edit, per memory.backend).

Full reference →

Three standalone, lowercase words opt a turn into specialized agent behavior:

  • ultrathink — request careful multi-step reasoning and the highest supported automatic thinking effort.
  • orchestrate — run substantial independent work through parallel subagents and verify each phase.
  • workflowz — build a deterministic multi-subagent workflow with the active task tool.

They trigger only in prose, not inside code spans, fenced code blocks, XML/HTML sections, identifiers, or paths. See Magic keywords for exact matching rules and configuration.

Slash commands shift how a whole session runs:

  • /vibe — enter Vibe mode: act as a director driving persistent fast/good worker sessions with a read-only toolset.
  • /fresh — reset the provider stream state (stale prompt cache, wedged stream) without changing the local transcript. See Session operations.

Sixty-plus providers, a thousand models, one /model away.

Nine roles route work by intent. default for normal turns. smol for cheap subagent fan-out. slow for deep reasoning. plan for plan mode. commit for changelogs. Plus vision, task, advisor, and tiny for their namesakes. Override at launch with --smol, --slow, or --plan; cycle through the configured models for the active role with Ctrl+P. Swap the active model mid-session with the /model slash command.

Auth tags below: oauth signs in with your provider account, plan routes through a coding-plan subscription, local runs against a local server with the key optional.

Direct APIs and gateways. Mix providers per role.

Anthropic oauth · OpenAI · OpenAI Codex oauth · Google Gemini · Google Vertex · Google Antigravity oauth · xAI · SuperGrok oauth · DeepSeek · Mistral · Groq · Cerebras · Fireworks · Together · Baseten · DeepInfra · Hugging Face · NVIDIA · Meta · Amazon Bedrock · Azure OpenAI · SiliconFlow · GMI Cloud · CoreWeave · Sakana AI · Command Code · Charm Hyper · OpenRouter · Synthetic · Vercel AI Gateway · Cloudflare AI Gateway · Wafer Serverless

Subscription-routed. /login attaches the session.

Cursor oauth · GitHub Copilot oauth · GitLab Duo · Devin oauth · Kimi Code plan · Moonshot · MiniMax Coding Plan plan · MiniMax Coding Plan CN plan · Alibaba Coding Plan plan · Qwen Portal oauth · Z.AI / GLM Coding Plan plan · Zhipu Coding Plan plan · Xiaomi MiMo · Qianfan · Umans plan · NanoGPT · Novita · Venice · Kilo · ZenMux · OpenCode Go · OpenCode Zen

OpenAI-compatible /v1/models. Local instances skip the key.

Ollama local · Ollama Cloud · LM Studio local · llama.cpp local · vLLM local · LiteLLM

Custom OpenAI-compatible providers

Define custom providers in ~/.omp/agent/models.yml:

providers:
  spark:
    baseUrl: http://192.168.10.223:8000/v1
    api: openai-completions
    apiKey: dummy
    models:
      - id: minimax-m3
        name: MiniMax M3
        contextWindow: 100000
        maxTokens: 32000

Run omp models spark to verify discovery. Then run omp setup and choose the model in the default-model step, or open /model in a session and assign it to the default role.

To preconfigure the default without the picker, add the selector to ~/.omp/agent/config.yml:

modelRoles:
  default: spark/minimax-m3

Four knobs that make routing useful

  • Custom providers — Declare anything that speaks openai-completions, openai-responses, openai-codex-responses, azure-openai-responses, anthropic-messages, bedrock-converse-stream, google-generative-ai, google-gemini-cli, or google-vertex in ~/.omp/agent/models.yml.
  • Fallback chains — Per-role or per-model chains under retry.fallbackChains. When the primary throws 429s or hits a quota wall, the next entry takes the rest of the turn — restored on cooldown.
  • Path-scoped models — Scope enabledModels and disabledProviders entries to a path: prefix to pin a different model set on one repo without touching the global config. Scoped entries cover the path and everything under it.
  • Round-robin credentials — Stack API keys per provider and the runtime rotates with session affinity and per-credential backoff. Useful when one key would burn its quota by lunch.

Full provider & routing reference at omp.sh/docs/providers.

Twenty-three backends. One tool the agent already knows.

web_search is built in, not bolted on. auto walks a twenty-three-provider chain; pin one by name if you already pay for it. Behind every hit, site-aware extraction turns GitHub, registries, arXiv, Stack Overflow, and docs into structured markdown — anchors and link targets survive.

Twenty-three backends. Pin one, or let auto walk the chain in order.

provider auth
auto chain
perplexity PERPLEXITY_API_KEY (anonymous fallback)
gemini oauth
anthropic oauth
codex oauth
xai oauth or XAI_API_KEY
zai ZAI_API_KEY
exa EXA_API_KEY (or mcp)
tinyfish TINYFISH_API_KEY
jina JINA_API_KEY
kagi KAGI_API_KEY
tavily TAVILY_API_KEY
firecrawl FIRECRAWL_API_KEY (keyless fallback)
brave BRAVE_API_KEY
kimi /login kimi-code or search key
parallel PARALLEL_API_KEY
synthetic SYNTHETIC_API_KEY
searxng self-hosted
duckduckgo no key
startpage no key
google no key (browser)
ecosia no key (browser)
mojeek no key (browser)
public no key (all of the above, consolidated)

Exa also accepts a stored API key through /login exa; explicit keyless selection uses the public MCP fallback.

The agent gets structured content, not stripped HTML.

  • Code hosts — github, gitlab
  • Package registries — npm, PyPI, crates.io, Hex, Hackage, NuGet, Maven, RubyGems, Packagist, pub.dev, Go packages
  • Research sources — arxiv, semantic scholar
  • Forums — stack overflow, reddit, hn
  • Docs — mdn, readthedocs, docs.rs

Pages convert to markdown with link structure intact. The agent can cite, follow, and quote without losing anchors.

Vuln lookups answer with vendor data, not blog summaries.

  • NVD — national vulnerability database
  • OSV — open source vuln feed
  • CISA KEV — known exploited vulns

web_search reference ↗

Roughly ~80,000 lines of Rust, doing the work other harnesses shell out for.

Six crates, one platform-tagged N-API addon. Search, shell, AST, highlight, PTY, desktop control, image decode, BPE counting — all in-process on the libuv pool. No fork/exec on the hot path. Another ~80k lines ride along vendored: the brush bash fork, plus 58 command-line utilities — coreutils, findutils, sed, jq, ripgrep-backed grep, fd, diff, moreutils — ported into the builtins crate and compiled straight into the shell.

  • Crates: pi-natives, pi-shell, pi-ast, pi-iso, pi-voice, pi-walker
  • Platforms: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64 — x64 ships dual AVX2 and baseline binaries

Per crate, code lines only:

Crate What it does ~LoC
pi-shell Embedded bash engine · persistent sessions · in-process coreutils dispatch · minimizer 38,000
pi-natives The N-API surface — every module in the table below 25,000
pi-walker Parallel ignore-aware walker + scan cache shared by grep · glob · workspace · shell 5,200
pi-iso Workspace isolation · apfs · btrfs · zfs · reflink · overlayfs · projfs · rcopy 3,300
pi-ast tree-sitter + ast-grep matching, block resolution, structural summaries 2,900
pi-voice Audio capture/playback · Opus · live WebRTC 1,000

Inside pi-natives, the per-module breakdown (glue and tests omitted):

Module What it does Powered by ~LoC
desktop Window/display enumeration · screenshot · native input · AX tree for computer xcap · enigo · OS AX FFI 10,600
grep Regex search · parallel/sequential · glob & type filters · fuzzy find grep-regex · grep-searcher 3,280
text ANSI-aware width · truncation · column slicing · SGR-preserving wrap unicode-width · segmentation 2,070
snapcompact Bitmap-frame rasterization + PNG encode for context compression image · png 1,760
keys Kitty keyboard protocol with xterm fallback · PHF perfect-hash lookup phf 1,740
ast ast-grep pattern matching and structural rewrites ast-grep-core 1,510
diff Structured file diffing for tools and previews in-tree 1,030
pty Native PTY allocation for sudo · ssh interactive prompts portable-pty 630
crash_handler Native crash capture and reporting in-tree 610
highlight Syntax highlighting · 11 semantic categories · 30+ aliases syntect 550
appearance Mode 2031 + native macOS dark/light via CoreFoundation FFI core-foundation 450
task Blocking work on libuv thread pool · cancellation · timeout · profiling tokio · napi 440
glob Discovery with glob · type filters · mtime sort · gitignore respect ignore · globset 430
fd Filesystem walker for find-tool replacement ignore 385
clipboard Text copy and image read from system clipboard · no xclip/pbcopy arboard 370
workspace Workspace walker with gitignore + AGENTS.md discovery in one pass ignore 275
power macOS power-assertion API for idle/system/display-sleep prevention IOKit FFI 270
prof Circular buffer profiler with folded-stack and SVG flamegraph output inferno 240
file_lock Cross-process advisory file locking in-tree 210
ps Cross-platform process-tree kill and descendant listing libc · libproc · CreateToolhelp32Snapshot 195
tokens O200k / Cl100k BPE token counting · both tables embedded tiktoken-rs 70
html HTML to Markdown with optional content cleaning html-to-markdown-rs 60
sixel Terminal image rendering · decode PNG · JPEG · WebP · GIF · resize · SIXEL encode icy_sixel · image 55

Four entry points: interactive , one-shot , RPC, and ACP.

Same engine, four wrappers. omp runs the TUI. omp -p answers a single prompt and exits. The Node SDK embeds the session in your process. omp --mode rpc and omp acp hand the wheel to another program over stdio.

Interactive — when in doubt, the agent asks

The TUI is the default surface. Tool calls render as cards, edits preview before they land, and ambiguity routes through the ask tool — a structured option picker the agent can call mid-turn. The keyboard handles the rest.

The same prompt cards surface over ACP, so editors get the picker without writing one.

omp TUI showing a multi-select question from the ask tool.

@oh-my-pi/pi-coding-agent

Node and TypeScript hosts pull the engine in directly. The package exposes ModelRegistry, SessionManager, createAgentSession, and discoverAuthStorage; the session emits typed events you subscribe to.

import {
  ModelRegistry,
  SessionManager,
  createAgentSession,
  discoverAuthStorage,
} from "@oh-my-pi/pi-coding-agent";

const auth = await discoverAuthStorage();
const models = new ModelRegistry(auth);
await models.refresh();

const { session } = await createAgentSession({
  sessionManager: SessionManager.inMemory(),
  authStorage: auth,
  modelRegistry: models,
});
await session.prompt("list .ts files");

omp --mode rpc

For non-Node embedders, or when you want process isolation. NDJSON commands in, response and event frames out. --mode rpc-ui adds tool cards, selectors, and dialogs as extension_ui_request frames the host must answer.

$ omp --mode rpc --no-session
> {"id":"r1","type":"prompt","message":"list .ts files"}
< {"id":"r1","type":"response", ...}
> {"id":"r2","type":"set_model","provider":"anthropic","modelId":"sonnet-4.5"}
> {"id":"r3","type":"abort"}

omp acp

The Agent Client Protocol over JSON-RPC. When the editor advertises capabilities, tool I/O routes through it and writes are gated by session/request_permission.

omp tool ACP route
bash terminal/create + terminal/output
read fs/read_text_file
write fs/write_text_file
edit, bash session/request_permission

Full reference: omp.sh/docs/sdk.

A harness worth keeping is one you don't outgrow.

Pick it up at omp.sh.

omp is a fork of Pi by Mario Zechner, rewritten as a coding-first surface: sessions, subagents, slash commands, extensions — all TypeScript, all MIT, all on GitHub. Shape it from config, hook it from outside, or read the source when you need to.

An extension is a TypeScript module. Same tool API, same slash-command registry, same hotkey table, same TUI primitives the built-ins use. Nothing is reserved.

On first run omp inherits whatever is already on disk: rules, skills, and MCP servers from .claude, .cursor, .windsurf, .gemini, .codex, .cline, .github/copilot, and .vscode. No migration script.

Ask omp to write the piece you're missing, then /reload-plugins. Keep it local, ship it in a marketplace, or publish it to npm.

omp is a fork of pi-mono by Mario Zechner, extended with a batteries-included coding workflow.

Key ideas:

  • Keep interactive terminal-first UX for real coding work
  • Include practical built-ins (tools, sessions, branching, subagents, extensibility)
  • Make advanced behavior configurable rather than hidden

Getting started from source

Fresh clones need both workspace dependencies and the local Rust/N-API addon before the source CLI can start.

bun setup installs Bun workspaces and builds @oh-my-pi/pi-natives. Re-run bun run build:native after changing Rust crates or packages/natives.

Nix users get the pinned Bun and Rust toolchains plus all native build dependencies:

nix develop
bun setup
bun dev

Build and smoke-test the distributable Nix package with nix build .#omp. Wayland screencast support is off by default (linking libpipewire adds ~750 MB of runtime closure); enable it with omp.override { withWaylandScreencast = true; }. nix/bun.nix is generated only when bun.lock changes; releases regenerate it automatically. For dependency changes, run:

The command uses bun2nix from nix develop when available, otherwise enters the development shell through Nix, then falls back to the pinned bunx bun2nix@2.1.2. Do not edit nix/bun.nix manually.

For a non-interactive smoke check:

/debug opens tools for debugging, reporting, and profiling.

For architecture and contribution guidelines, see packages/coding-agent/DEVELOPMENT.md.


Package Description
@oh-my-pi/collab-web Browser guest client, mock host, and local relay for collab live sessions
@oh-my-pi/pi-ai Multi-provider LLM client with streaming and model/provider integration
@oh-my-pi/pi-catalog Model catalog: bundled model database, provider descriptors, and identity
@oh-my-pi/pi-agent-core Agent runtime with tool calling and state management
@oh-my-pi/pi-coding-agent Interactive coding agent CLI and SDK
@oh-my-pi/pi-tui Terminal UI library with differential rendering
@oh-my-pi/pi-natives N-API bindings for grep, shell, image, text, syntax highlighting, and more
@oh-my-pi/omp-stats Local observability dashboard for AI usage statistics
@oh-my-pi/omptype ArkType-compatible schema validation with lazy JIT compilation
@oh-my-pi/pi-utils Shared utilities (logging, streams, dirs/env/process helpers)
@oh-my-pi/pi-wire Shared collab live-session protocol types and relay constants
@oh-my-pi/pi-mnemopi Local SQLite memory engine for Oh My Pi agents
@oh-my-pi/snapcompact Bitmap-frame context compression package and SQuAD eval suite
@oh-my-pi/browser-relay Chrome extension that lets the Eval browser API drive your existing tabs
@oh-my-pi/pi-metaharness Unified benchmark runners, Harbor run storage, REST/SSE API, live dashboard
@oh-my-pi/typescript-edit-benchmark Edit benchmark suite built on TypeScript source mutations
Crate Description
--- ---
pi-natives Core Rust native addon (N-API cdylib) used by @oh-my-pi/pi-natives; aggregates the crates below
pi-shell Embedded shell / PTY / process management split out of pi-natives (wraps brush-*)
pi-ast tree-sitter-based code summarizer and AST utilities (50+ language grammars)
pi-iso Task isolation backend resolver: APFS clones, btrfs/zfs reflinks, overlayfs, projfs, rcopy
pi-voice Audio capture/playback, Opus codecs, and live WebRTC streaming primitives
pi-walker Parallel ignore-aware filesystem walker with the scan cache shared by grep, glob, and workspace
pi-edit Edit engine behind the edit tool: line-anchored patch/hashline modes, streaming previews, atomic apply
brush-core Vendored fork of brush-shell for embedded bash execution
pi-builtins Bash builtins (cd, echo, test, printf, read, export, …) plus 67 in-process command-line utilities

Issues and pull requests are open to everyone. Open PRs are currently a trial — the previous vouch requirement is lifted while we evaluate how it goes, and it may return. See CONTRIBUTING.md for guidelines on contributing.


OMP is licensed under the MIT License.

Third-party and vendored code, including crates/vendor/brush-core and the third-party portions identified in crates/pi-builtins/LICENSE, remains under its respective upstream license. See THIRD-PARTY-NOTICES.txt and component-local notices for attribution and additional terms.

© 2025 Mario Zechner
© 2025-2026 Can Bölük
© 2026 Stencil Labs, Inc.

made for terminals that stay open