Oh My Pi (omp) โ€” the Rust-Powered Fork

Lesson 9: Oh My Pi (omp) โ€” the Rust-Powered Fork

Oh My Pi (omp, omp.sh) is a fork of pi by can1357 that keeps the pi experience and adds an IDE's worth of machinery: a native Rust engine (~80k lines) doing the heavy lifting, with the tooling layer in TypeScript/Bun. Its tagline is "a coding agent with the IDE wired in" โ€” subagents, plan mode, LSP, DAP, hindsight memory, hashline edits, and time-traveling rules.

Key idea: omp is the "batteries included" pi. The pitch: 60+ providers, 31 built-in tools, 14 LSP operations, 28 DAP operations โ€” and a claim on omp.sh that reads are "summarized snippets" rather than file dumps, with edits that land on the first attempt.

Installing omp

# macOS / Linux
curl -fsSL https://omp.sh/install | sh
# Homebrew
brew install can1357/tap/omp
# Bun
bun install -g @oh-my-pi/pi-coding-agent
# Nix (run without installing)
nix run github:can1357/oh-my-pi
# Windows
irm https://omp.sh/install.ps1 | iex

The feature tour (highlights)

FeatureWhat it does
Hashline editsPatch by content-hash anchors instead of retyping lines โ€” stale anchors get rejected before they corrupt. omp claims Grok 4 Fast spends 61% fewer output tokens on the same work.
Eval kernelsPersistent Python and Bun cells that can call back into the agent's own tools (read, search, task) over a loopback bridge.
LSP wired into writesRenames go through workspace/willRenameFiles; references, symbols, diagnostics, code actions โ€” the agent knows what the IDE knows.
DAP debuggingDrives real debuggers (lldb, dlv, debugpy): breakpoints, stepping, threads, variables.
Subagents (task)Fan out into isolated worktrees; each worker has its own tool surface; results return as schema-validated objects. Agent Hub (Alt+A) supervises the roster.
Advisor roleA second model reads every turn on its own context and injects notes โ€” quiet asides, concerns, or blockers.
Time-traveling stream rulesRules stay dormant until a regex match aborts the stream mid-token, injects the rule, and retries from the same point โ€” course correction without paying context tax every turn. Injections survive compaction.
Memoryretain, learn, recall with pluggable backends (local, Hindsight, Mnemopi), project-scoped by default.
/collabLive session sharing via relay link + QR; omp join from another terminal, or a read-only browser view.
web_searchOne tool across 23 chained providers with site-aware extraction (arXiv PDFs, GitHub, Stack Overflow โ†’ structured markdown).
GitHub as a filesystemread pr://1428, issue://, agent://, ssh:// โ€” internal schemes resolve inside every FS-shaped tool.
Native everythingripgrep, glob, find in-process; brush shell with 58 built-in utilities โ€” no fork/exec per call, works on Windows without WSL.
Rules importReads Cursor MDC, Cline .clinerules, Codex AGENTS.md, and Copilot applyTo natively โ€” no migration.
omp commit & /reviewAtomic commit splitting with dependency ordering; parallel reviewer subagents returning P0โ€“P3 ranked verdicts.
Browser & computerHeadless Chromium with Stealth, a relay to adopt your own Chrome tabs, and desktop control (windows, screenshots, input, accessibility tree).

Model roles โ€” routing by intent

omp assigns a role to each kind of work: default (normal turns), smol (cheap subagent fan-out), slow (deep reasoning), plan (plan mode), commit (changelogs), plus vision, designer, task, advisor, and tiny. Override at launch with --smol, --slow, --plan; cycle role models with Ctrl+P; swap mid-session with /model. Custom providers go in ~/.omp/agent/models.yml (nine API dialects, from openai-completions to bedrock-converse-stream), with per-role fallback chains, path-scoped model sets, and round-robin API keys.

๐Ÿช™ Token angle: omp's headline numbers are token numbers. Hashline edits reportedly cut Grok 4 Fast output tokens by 61% by killing the retry loop on bad diffs; summarized reads mean the agent pays for a digest instead of a file dump; stream rules inject only on violation (no per-turn context tax) and survive compaction; the advisor runs on its own context and model; and the smol/tiny roles route subagent traffic to the cheapest models while slow reserves the big reasoning model for the hard parts. The flip side: 31 declared tools is a bigger system prompt than pi's four โ€” pin the active set with --tools read,edit,bash,โ€ฆ when you want the leaner surface.

Further Reading

๐Ÿง  Knowledge Check

1. What is Oh My Pi (omp) relative to pi?

2. What makes hashline edits token-efficient?

3. What is the purpose of omp's "advisor" model role?