can1357 /oh-my-pi

⌥ Coding agent with the IDE wired in. Built by Stencil Labs.

★ 38,497⑂ 4,377👁 94⑃ 10,406● 7,065▤ 682◈ 317
TypeScriptMITCreated 2025-12-31omp.sh
38,497
stars
+156
4,377
forks
94
watchers
10,406
prs
7,065
issues
682
releases
317
discussions

README

一个内置 IDE 能力的编程智能体。
  omp.sh



  Language: English | 简体中文



  
  
  
  
  
  
  
  



  由 Stencil Labs 打造 · 派生自 @mariozechner 的 Pi


目前能力最强的编程智能体。在真实使用中持续打磨——开箱即用,从里到外完全开放。

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

 [!NOTE]
 Pull Request 目前临时向所有人开放,作为一次试行。此前我们要求 PR 必须先获得担保(vouch)才会被接受;在评估开放贡献效果期间,这一要求暂时取消。视结果而定,担保机制可能会恢复。

 安装

macOS · Linux

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


如果没有可用的 bun(或指定了 --binary),安装脚本会从 build.stencil.so 下载预编译二进制,并在安装前校验其 SHA-256。可通过 curl -fsSL https://omp.sh/install | sh -s -- --binary --ref v 固定某个版本(PowerShell:-Binary -Ref v)。

 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
 Run without installing
nix run github:can1357/oh-my-pi

 Or install into the active profile (Nix .omp、overlays.default、nixosModules.default 或 homeManagerModules.default。Home Manager 配置可以安装 OMP 并以声明式方式管理其设置:

nix
{
  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)

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


固定版本(mise)

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


macOS · Linux · Windows · bun ≥ 1.4.4

 Shell 补全

omp 会根据实时的命令/参数元数据,为 bash、zsh 和 fish 生成自己的补全脚本,因此永远不会与实际 CLI 脱节。子命令、参数和枚举值是静态补全的;模型名(--model、--smol、--slow、--plan)会根据内置模型目录解析,--resume 则根据磁盘上的会话解析。

sh
 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


 每个工具,都 _调校到极致_。

编辑一次成功。读取时给出文件摘要,而不是把整个文件倒出来。搜索即时返回。无论选哪个模型,omp 都能让它把事做好。

| 模型             | 指标         | 说明                                                 |
| ---------------- | ------------ | ---------------------------------------------------- |
| Grok Code Fast 1 | 6.7% → 68.3% | 编辑格式不再拖垮模型的那一刻,成功率提升十倍。       |
| Gemini 3 Flash   | +5 pp        | 优于 str_replace——超过了 Google 自己在该格式上的最佳成绩。 |
| Grok 4 Fast      | −61% tokens  | 不再因错误 diff 反复重试,输出量大幅下降。           |
| MiniMax          | 2.1×         | 通过率翻倍有余。同样的权重,同样的提示词。           |

- read:摘要片段 · 合理的默认值 · 选择器命中率
- grep:快到没有对手
- lsp:IDE 知道的一切,智能体都知道
- prompts:针对每个模型持续调整

阅读完整文章 ↗

 你 _喜爱_ 的 Pi,如今全副武装。

omp 最初基于 Mario Zechner 出色的 Pi 构建,补齐了你所缺少的一切。

 01 · 可调用工具的代码执行

大多数智能体框架给智能体一个 Python 沙箱就算完事。我们运行持久化的 Python 和 Bun worker,而且两个内核都能通过本地回环桥接回调智能体自己的工具——read、search、task。智能体可以在 Python 里用 tool.read 加载 CSV,再用 JavaScript 绘图,全程不离开同一个单元格。

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

 02 · 每次写入都接入 LSP

要求重命名,得到的就是真正的重命名。调用会走 workspace/willRenameFiles,因此在文件移动之前,重导出、barrel 文件和带别名的导入都会先被更新。IDE 知道的一切,智能体都知道。

!启用了 TypeScript 和 Biome 语言服务器的 omp TUI。

_阅读 LSP 配置文档_

 03 · 驱动真正的调试器

C 程序段错误:智能体挂上 lldb,单步到出错的指针,读取栈帧。Go 服务卡死:挂上 dlv,逐个查看 goroutine。Python 进程卡住:debugpy、暂停、检查、

Top issues

Discussions

Latest release

v18.18.2 v18.18.2 2026-11-08
@oh-my-pi/pi-agent-core

 Added

- Added canReplayRemoteCompactionFrom() to determine whether a model can replay provider-native compaction produced by another model.

 Fixed

- Fixed GenAI message-content capture configured in omp's own .env files so it continues to apply when those values are no longer exposed through the process environment.
- Fixed compaction preparation for remote OpenAI compaction that the active model cannot replay, ensuring the content is expanded and remains available for compaction.
- Fixed generic remote compaction requests to /chat/completions so gateway sessions r

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON