MCPcopy
hub / github.com/can1357/oh-my-pi

github.com/can1357/oh-my-pi @v16.3.3 sqlite

repository ↗ · DeepWiki ↗ · release v16.3.3 ↗
34,575 symbols 143,733 edges 3,535 files 4,504 documented · 13%
README

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.

40+ providers · 32 built-in tools · 14 lsp ops · 28 dap ops · ~55k lines of Rust core.

Install

macOS · Linux

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

Homebrew

brew install can1357/tap/omp

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

Shell completions

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

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.

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
  • search : 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: a single eval session with [1/2] pandas describe (Python) printing a real DataFrame.describe() table, followed by [2/2] top scorer (JavaScript) running a reduce. Footer: 'Both kernels ran in one session.'

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: LSP references returns five hits across three files for the symbol formatBytes, then LSP rename applies the change with edits to format.ts/report.ts/cli.ts, then a Search formatBytes 0 matches confirmation. Final line: 'Rename complete. Five edits across three files…'.

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 ↗

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

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.

Twelve internal schemes — pr://, issue://, agent://, skill://, rule://, 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. search walks a diff like a directory. agent://<id>/findings.0.path pulls a field out of a subagent's output by path.

omp TUI reading pr://can1357/oh-my-pi/1063 and then /diff/1, showing hunk headers, added lines, and a [MODIFIED] (+12 -0) summary.

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.'

_[Wa

Extension points exported contracts — how you extend this code

PasteTarget (Interface)
Minimal contract for any component that can receive a paste payload directly. [6 implementers]
packages/coding-agent/src/modes/controllers/input-controller.ts
MessageListenerPort (Interface)
Minimal `parentPort` surface the inbox needs (Node/Bun `MessagePort`). [4 implementers]
packages/utils/src/worker-host.ts
RenderScheduler (Interface)
(no doc) [7 implementers]
packages/tui/src/tui.ts
Harness (Interface)
(no doc) [125 implementers]
packages/ai/test/cursor-streaming-args.test.ts
LocalRelay (Interface)
(no doc) [19 implementers]
packages/collab-web/scripts/local-relay.ts
WritableOutput (Interface)
(no doc) [13 implementers]
packages/mnemopi/src/mcp-server.ts
BenchmarkClient (Interface)
Common interface for both RPC and in-process clients [1 implementers]
packages/typescript-edit-benchmark/src/runner.ts
PlanFrame (Interface)
One planned frame: the source slice and the shape (quality tier) to render.
packages/snapcompact/src/snapcompact.ts

Core symbols most depended-on inside this repo

push
called by 8935
packages/coding-agent/src/tts/tts-client.ts
join
called by 6970
packages/coding-agent/src/collab/guest.ts
map
called by 3974
packages/catalog/src/model-manager.ts
slice
called by 2950
packages/coding-agent/src/modes/controllers/streaming-reveal.ts
trim
called by 2455
packages/utils/src/ptree.ts
filter
called by 2106
python/robomp/src/logging_config.py
join
called by 2048
packages/utils/src/temp.ts
fg
called by 2012
packages/coding-agent/src/extensibility/legacy-pi-coding-agent-shim.ts

Shape

Function 19,127
Method 8,970
Interface 4,377
Class 1,820
Enum 242
Route 39

Languages

TypeScript91%
Python9%

Modules by API surface

packages/coding-agent/src/session/agent-session.ts579 symbols
packages/coding-agent/src/modes/interactive-mode.ts275 symbols
packages/ai/src/auth-storage.ts261 symbols
packages/tui/test/render-stress-harness.ts254 symbols
packages/ai/src/providers/openai-responses-wire.ts218 symbols
packages/catalog/src/provider-models/openai-compat.ts197 symbols
packages/coding-agent/src/tools/gh.ts191 symbols
packages/tui/src/tui.ts167 symbols
packages/ai/src/providers/gitlab-duo-workflow.ts166 symbols
packages/coding-agent/src/utils/git.ts165 symbols
packages/coding-agent/src/modes/types.ts152 symbols
python/omp-rpc/src/omp_rpc/client.py151 symbols

Dependencies from manifests, versioned

@agentclientprotocol/sdkcatalog: · 1×
@babel/generatorcatalog: · 1×
@babel/parsercatalog: · 1×
@babel/traversecatalog: · 1×
@babel/typescatalog: · 1×
@biomejs/biomecatalog: · 1×
@bufbuild/protobufcatalog: · 1×
@bufbuild/protoc-gen-escatalog: · 1×
@mozilla/readabilitycatalog: · 1×
@napi-rs/clicatalog: · 1×
@oh-my-pi/hashlinecatalog: · 1×
@oh-my-pi/omp-statscatalog: · 1×

Datastores touched

(mysql)Database · 1 repos
dbDatabase · 1 repos
dbDatabase · 1 repos

For agents

$ claude mcp add oh-my-pi \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact