[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73661":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":42,"readmeContent":43,"aiSummary":44,"trendingCount":16,"starSnapshotCount":16,"syncStatus":45,"lastSyncTime":46,"discoverSource":47},73661,"oh-my-pi","can1357\u002Foh-my-pi","can1357","⌥  AI Coding agent for the terminal — hash-anchored edits, optimized tool harness, LSP, Python, browser, subagents, and more","",null,"TypeScript",11892,1008,43,115,0,194,1397,5653,1036,44.01,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"ai-agent","ai-coding-agent","anthropic","bun","claude","cli","coding-assistant","llm","mcp","multi-provider","openai","rust","terminal","tui","typescript","2026-06-12 02:03:16","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002Fassets\u002Fhero.png?raw=true\" alt=\"omp\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>A coding agent with the IDE wired in.\u003C\u002Fstrong>\n  \u003Cstrong>\u003Ca href=\"https:\u002F\u002Fomp.sh\">omp.sh\u003C\u002Fa>\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@oh-my-pi\u002Fpi-coding-agent\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@oh-my-pi\u002Fpi-coding-agent?style=flat&colorA=222222&colorB=CB3837\" alt=\"npm version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002FCHANGELOG.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchangelog-keep-E05735?style=flat&colorA=222222\" alt=\"Changelog\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fcan1357\u002Foh-my-pi\u002Fci.yml?style=flat&colorA=222222&colorB=3FB950\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fcan1357\u002Foh-my-pi?style=flat&colorA=222222&colorB=58A6FF\" alt=\"License\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.typescriptlang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-3178C6?style=flat&colorA=222222&logo=typescript&logoColor=white\" alt=\"TypeScript\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.rust-lang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRust-DEA584?style=flat&colorA=222222&logo=rust&logoColor=white\" alt=\"Rust\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fbun.sh\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime-Bun-f472b6?style=flat&colorA=222222\" alt=\"Bun\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F4NMW9cdXZa\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-5865F2?style=flat&colorA=222222&logo=discord&logoColor=white\" alt=\"Discord\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Fork of \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\">Pi\u003C\u002Fa> by \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmariozechner\">@mariozechner\u003C\u002Fa> \n\u003C\u002Fp>\n\nThe most capable agent surface that ships. Continuously tuned by real-world use — complete out of the box, open all the way down.\n\n**40+** providers · **32** built-in tools · **13** lsp ops · **27** dap ops · **~27k** lines of Rust core.\n\n## Install\n\n**macOS · Linux**\n\n```sh\ncurl -fsSL https:\u002F\u002Fomp.sh\u002Finstall | sh\n```\n\n**Bun (recommended)**\n\n```sh\nbun install -g @oh-my-pi\u002Fpi-coding-agent\n```\n\n**Windows (PowerShell)**\n\n```powershell\nirm https:\u002F\u002Fomp.sh\u002Finstall.ps1 | iex\n```\n\n**Pinned versions (mise)**\n\n```sh\nmise use -g github:can1357\u002Foh-my-pi\n```\n\nmacOS · Linux · Windows · bun ≥ 1.3.14\n\n## Every tool, _benchmaxxed_.\n\nEdits 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.\n\n| model            | metric       | what                                                                  |\n| ---------------- | ------------ | --------------------------------------------------------------------- |\n| Grok Code Fast 1 | 6.7% → 68.3% | Tenfold lift the moment the edit format stops eating the model alive. |\n| Gemini 3 Flash   | +5 pp        | Over str_replace — beats Google's own best attempt at the format.     |\n| Grok 4 Fast      | −61% tokens  | Output collapses once the retry loop on bad diffs disappears.         |\n| MiniMax          | 2.1×         | Pass rate more than doubles. Same weights, same prompt.               |\n\n- `read` : summarized snippets · ideal defaults · selector hit rate\n- `search` : fastest in the west\n- `lsp` : everything your IDE knows, the agent knows\n- `prompts` : adjusted relentlessly for each model\n\n[Read the full post ↗](https:\u002F\u002Fblog.can.ac\u002F2026\u002F02\u002F12\u002Fthe-harness-problem\u002F)\n\n## The Pi _you love_, with **batteries included**.\n\nOriginally built on [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fmariozechner)'s wonderful [Pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono), omp adds everything you're missing.\n\n### 01 · Code execution w\u002F tool-calling\n\nMost 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.\n\n![omp TUI: a single eval session with `[1\u002F2] pandas describe` (Python) printing a real DataFrame.describe() table, followed by `[2\u002F2] top scorer` (JavaScript) running a reduce. Footer: 'Both kernels ran in one session.'](https:\u002F\u002Fomp.sh\u002Fcaptures\u002Feval.webp)\n\n### 02 · LSP wired into every write\n\nAsk for a rename and you get a rename. The call goes through workspace\u002FwillRenameFiles, so re-exports, barrel files, and aliased imports update before the file moves. Everything your IDE knows, the agent knows.\n\n![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\u002Freport.ts\u002Fcli.ts, then a `Search formatBytes 0 matches` confirmation. Final line: 'Rename complete. Five edits across three files…'.](https:\u002F\u002Fomp.sh\u002Fcaptures\u002Flsp.webp)\n\n### 03 · Drives a real debugger\n\nA 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.\n\n![omp TUI: a live lldb-dap session against a native binary at \u002Ftmp\u002Fomp-native\u002Fdemo. 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\u003C\u003C13)).](https:\u002F\u002Fomp.sh\u002Fclips\u002Fdap-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Fdap.mp4)_\n\n### 04 · Time-traveling stream rules\n\nYour 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.\n\n![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\u003Cstr>` and asking the user to confirm.](https:\u002F\u002Fomp.sh\u002Fclips\u002Fttsr-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Fttsr.mp4)_\n\n### 05 · First-class subagents\n\nSplit 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.\n\n![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.](https:\u002F\u002Fomp.sh\u002Fclips\u002Firc-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Firc.mp4)_\n\n### 06 · Read a pdf on arxiv, why not?\n\nweb_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.\n\n![omp TUI: web_search returns 10 ranked Perplexity sources for inference-time compute scaling, the agent picks an arxiv paper, calls read https:\u002F\u002Farxiv.org\u002Fpdf\u002F2604.10739v1, and summarizes the paper's headline result with real numbers.](https:\u002F\u002Fomp.sh\u002Fclips\u002Fweb-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Fweb.mp4)_\n\n### 07 · Unapologetically native. Even on Windows.\n\nOther 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.\n\n### 08 · Code review with priorities and a verdict\n\nGet a clear verdict on whether the change ships, with every issue ranked P0 through P3 and scored for confidence. \u002Freview 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.\n\n### 09 · Hashline: edit by content hash\n\nPerfect 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.\n\n### 10 · GitHub is just another filesystem\n\nOther 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.\n\n### 11 · Hindsight: memory the agent curates\n\nThe 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.\n\n### 12 · ACP: editor-drivable agent\n\nRun 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.\n\n### 13 · Inherits what your other tools already wrote\n\nEvery 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.\n\n### 14 · omp commit: atomic splits, validated messages\n\nomp 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.\n\n### 15 · Read PRs. _Walk skills._ Pull JSON out of subagents.\n\nTen internal schemes — `pr:\u002F\u002F`, `issue:\u002F\u002F`, `agent:\u002F\u002F`, `skill:\u002F\u002F`, `rule:\u002F\u002F`, and the rest — resolve transparently inside every FS-shaped tool the agent already calls. `read pr:\u002F\u002F1428` returns the same shape as `read src\u002Ffoo.ts`. `search` walks a diff like a directory. `agent:\u002F\u002F\u003Cid>\u002Ffindings.0.path` pulls a field out of a subagent's output by path.\n\n![omp TUI reading pr:\u002F\u002Fcan1357\u002Foh-my-pi\u002F1063 and then \u002Fdiff\u002F1, showing hunk headers, added lines, and a [MODIFIED] (+12 -0) summary.](https:\u002F\u002Fomp.sh\u002Fcaptures\u002Fpr.webp)\n\n### 16 · Conflict resolution, made easy.\n\nEach merge conflict becomes one URL. The agent writes `@theirs`, `@ours`, or `@base` to `conflict:\u002F\u002FN` and the file resolves cleanly. Bulk form: `conflict:\u002F\u002F*`.\n\n![omp TUI: ✓ Read src\u002Fsession.ts (⚠ 1 conflict), then ✓ Write conflict:\u002F\u002F1 · 1 line with content @theirs, then a confirmation 'Resolved.'](https:\u002F\u002Fomp.sh\u002Fclips\u002Fconflict-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Fconflict.mp4)_\n\n### 17 · Preview, then accept.\n\n`ast_edit` returns a _(proposed)_ card with the replacement count. The change is staged. The agent calls `resolve` with a reason; the TUI turns it into an **Accept** card and the disk move happens — atomic, all or nothing.\n\n![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\u002Fauth.ts.'](https:\u002F\u002Fomp.sh\u002Fclips\u002Fcodemod-poster.webp)\n\n_[Watch the capture ↗](https:\u002F\u002Fomp.sh\u002Fclips\u002Fcodemod.mp4)_\n\n### 18 · Drives a _real browser_. _Or your Slack?_\n\nStealth's on by default, so pages see a normal user instead of a headless bot. The same API drives any Electron app in place — point it at Slack and the agent reads your DMs the way it reads the web.\n\n![omp TUI driving the browser tool against DuckDuckGo](https:\u002F\u002Fomp.sh\u002Fcaptures\u002Fbrowser.webp)\n\n## Whatever the task needs, _it's already in the box_.\n\n32 tools live in the same namespace as `read` and `bash`. Pin the active set with `--tools read,edit,bash,…` and the rest stay hidden but indexed — `search_tool_bm25` pulls them back in mid-session when `tools.discoveryMode` says so.\n\n**Files & search**\n\n- `read` — files, dirs, archives, SQLite, PDFs, notebooks, URLs, and internal `:\u002F\u002F` schemes through one path.\n- `write` — create or overwrite a file, archive entry, or SQLite row.\n- `edit` — hashline patches with content-hash anchors and stale-anchor recovery.\n- `ast_edit` — structural rewrites previewed before apply, via ast-grep.\n- `ast_grep` — structural code queries over 50+ tree-sitter grammars.\n- `search` — regex over files, globs, and internal URLs.\n- `find` — glob-based path lookup; reach for `search` when you need content matches.\n\n**Runtime**\n\n- `bash` — workspace shell, with optional PTY or background-job dispatch.\n- `eval` — persistent Python and JavaScript cells with shared prelude and tool re-entry.\n- `recipe` — invoke a target from a detected task runner — bun, just, make, cargo.\n- `ssh` — one remote command against a configured host.\n\n**Code intelligence**\n\n- `lsp` — diagnostics, navigation, symbols, renames, code actions, raw requests.\n- `debug` — drive a DAP session — breakpoints, stepping, threads, stack, variables.\n\n**Coordination**\n\n- `task` — fan out subagents in parallel, optionally workspace-isolated.\n- `irc` — short prose between live agents in this process.\n- `todo_write` — ordered mutations over the session todo list with phase tracking.\n- `job` — wait on or cancel background jobs.\n- `ask` — structured follow-up questions for interactive runs.\n\n**Outside the box**\n\n- `browser` — Puppeteer tabs over headless Chromium or CDP-attached apps.\n- `web_search` — one query across configured providers, returning answer plus citations.\n- `github` — GitHub CLI ops — repo, PR, issues, code search, Actions run-watch.\n- `generate_image` — generate or edit raster images via Gemini image models.\n- `inspect_image` — vision-model analysis of a local image file.\n- `render_mermaid` — Mermaid source to terminal-friendly ASCII or PNG.\n\n**Memory & state**\n\n- `checkpoint` — mark conversation state for a later collapse-and-report.\n- `rewind` — prune exploratory context, keep a concise report.\n- `retain` — queue durable facts into the active Hindsight bank.\n- `recall` — search the Hindsight bank for raw memories.\n- `reflect` — ask Hindsight to synthesize an answer over the bank.\n\n**Misc**\n\n- `calc` — deterministic arithmetic — no model in the loop.\n- `resolve` — apply or discard a queued preview action.\n- `search_tool_bm25` — BM25 over the hidden tool index; activates top matches mid-session.\n\nSetting-gated, off by default: `github`, `calc`, `inspect_image`, `render_mermaid`, `checkpoint`, `rewind`, `search_tool_bm25`, `retain`, `recall`, `reflect`. Flip them on once, scoped per project.\n\n[Full reference →](https:\u002F\u002Fomp.sh\u002Fdocs\u002Ftools)\n\n## Forty-plus providers, hundreds of models, _one \u002Fmodel away_.\n\nRoles 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. 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 `\u002Fmodel` slash command.\n\nAuth 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.\n\n### Frontier APIs\n\nDirect APIs and gateways. Mix providers per role.\n\nAnthropic `oauth` · OpenAI · OpenAI Codex `oauth` · Google Gemini · Google Antigravity `oauth` · xAI · Mistral · Groq · Cerebras · Fireworks · Together · Hugging Face · NVIDIA · OpenRouter · Synthetic · Vercel AI Gateway · Cloudflare AI Gateway · Perplexity `oauth`\n\n### Coding plans\n\nSubscription-routed. `\u002Flogin` attaches the session.\n\nCursor `oauth` · GitHub Copilot `oauth` · GitLab Duo · Kimi Code `plan` · Moonshot · MiniMax Coding Plan `plan` · MiniMax Coding Plan CN `plan` · Alibaba Coding Plan `plan` · Qwen Portal · Z.AI \u002F GLM Coding Plan `plan` · Xiaomi MiMo · Qianfan · NanoGPT · Venice · Kilo · ZenMux · OpenCode Go · OpenCode Zen\n\n### Run it yourself\n\nOpenAI-compatible `\u002Fv1\u002Fmodels`. Local instances skip the key.\n\nOllama `local` · Ollama Cloud · LM Studio `local` · llama.cpp `local` · vLLM `local` · LiteLLM\n\n### Four knobs that make routing useful\n\n- **Custom providers** — Declare anything that speaks `openai-completions`, `openai-responses`, `openai-codex-responses`, `azure-openai-responses`, `anthropic-messages`, `google-generative-ai`, or `google-vertex` in `~\u002F.omp\u002Fagent\u002Fmodels.yml`.\n- **Fallback chains** — Per-role 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.\n- **Path-scoped roles** — Nest `paths:` under `modelRoles` to pin a heavier `default` on one repo without touching the global config. Closest path wins.\n- **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.\n\nFull provider & routing reference at [omp.sh\u002Fdocs\u002Fproviders](https:\u002F\u002Fomp.sh\u002Fdocs\u002Fproviders).\n\n## Fourteen backends. _One tool the agent already knows_.\n\n`web_search` is built in, not bolted on. `auto` walks a fourteen-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.\n\n### Search providers\n\nFourteen backends. Pin one, or let `auto` walk the chain in order.\n\n| provider     | auth                   |\n| ------------ | ---------------------- |\n| `auto`       | chain                  |\n| `exa`        | `EXA_API_KEY` (or mcp) |\n| `brave`      | `BRAVE_API_KEY`        |\n| `jina`       | `JINA_API_KEY`         |\n| `kimi`       | `MOONSHOT_API_KEY`     |\n| `zai`        | `ZAI_API_KEY`          |\n| `anthropic`  | oauth                  |\n| `perplexity` | `PERPLEXITY_API_KEY`   |\n| `gemini`     | oauth                  |\n| `codex`      | oauth                  |\n| `tavily`     | `TAVILY_API_KEY`       |\n| `parallel`   | `PARALLEL_API_KEY`     |\n| `kagi`       | `KAGI_API_KEY`         |\n| `synthetic`  | `SYNTHETIC_API_KEY`    |\n| `searxng`    | self-hosted            |\n\n### Specialised handlers\n\nThe agent gets structured content, not stripped HTML.\n\n- **Code hosts** — github, gitlab\n- **Package registries** — npm, PyPI, crates.io, Hex, Hackage, NuGet, Maven, RubyGems, Packagist, pub.dev, Go packages\n- **Research sources** — arxiv, semantic scholar\n- **Forums** — stack overflow, reddit, hn\n- **Docs** — mdn, readthedocs, docs.rs\n\nPages convert to markdown with link structure intact. The agent can cite, follow, and quote without losing anchors.\n\n### Security databases\n\nVuln lookups answer with vendor data, not blog summaries.\n\n- **NVD** — national vulnerability database\n- **OSV** — open source vuln feed\n- **CISA KEV** — known exploited vulns\n\n[`web_search` reference ↗](https:\u002F\u002Fomp.sh\u002Fdocs\u002Ftools#web_search)\n\n## Roughly **~27,000** lines of Rust, doing the work other harnesses shell out for.\n\nThree crates, one platform-tagged N-API addon. Search, shell, AST, highlight, PTY, image decode, BPE counting — all in-process on the libuv pool. No fork\u002Fexec on the hot path.\n\n- Crates: `pi-natives`, `pi-shell`, `pi-ast`\n- Platforms: `linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64`\n\nThe table below is a per-module breakdown that intentionally omits glue and tests.\n\n| Module     | What it does                                                                         | Powered by                                |  ~LoC |\n| ---------- | ------------------------------------------------------------------------------------ | ----------------------------------------- | ----: |\n| shell      | Embedded bash · persistent sessions · timeout\u002Fabort · custom builtins                | brush-shell (vendored)                    | 3,700 |\n| grep       | Regex search · parallel\u002Fsequential · glob & type filters · fuzzy find                | grep-regex · grep-searcher                | 1,900 |\n| keys       | Kitty keyboard protocol with xterm fallback · PHF perfect-hash lookup                | phf                                       | 1,490 |\n| text       | ANSI-aware width · truncation · column slicing · SGR-preserving wrap                 | unicode-width · segmentation              | 1,450 |\n| summarize  | Tree-sitter structural source summaries with elision controls                        | tree-sitter · ast-grep-core               | 1,040 |\n| ast        | ast-grep pattern matching and structural rewrites                                    | ast-grep-core                             | 1,000 |\n| fs_cache   | Mtime-keyed file cache shared by read · grep · lsp                                   | in-tree                                   |   840 |\n| highlight  | Syntax highlighting · 11 semantic categories · 30+ aliases                           | syntect                                   |   470 |\n| pty        | Native PTY allocation for sudo · ssh interactive prompts                             | portable-pty                              |   455 |\n| glob       | Discovery with glob · type filters · mtime sort · gitignore respect                  | ignore · globset                          |   410 |\n| workspace  | Workspace walker with gitignore + AGENTS.md discovery in one pass                    | ignore · git2                             |   385 |\n| appearance | Mode 2031 + native macOS dark\u002Flight via CoreFoundation FFI                           | core-foundation                           |   270 |\n| power      | macOS power-assertion API for idle\u002Fsystem\u002Fdisplay-sleep prevention                   | IOKit FFI                                 |   270 |\n| task       | Blocking work on libuv thread pool · cancellation · timeout · profiling              | tokio · napi                              |   260 |\n| fd         | Filesystem walker for find-tool replacement                                          | ignore                                    |   250 |\n| iso        | Workspace isolation shim · apfs · btrfs · zfs · reflink · overlayfs · projfs · rcopy | pi-iso (PAL)                              |   245 |\n| prof       | Circular buffer profiler with folded-stack and SVG flamegraph output                 | inferno                                   |   240 |\n| ps         | Cross-platform process-tree kill and descendant listing                              | libc · libproc · CreateToolhelp32Snapshot |   195 |\n| image      | Decode\u002Fencode PNG · JPEG · WebP · GIF · resize with 5 filters                        | image                                     |   190 |\n| clipboard  | Text copy and image read from system clipboard · no xclip\u002Fpbcopy                     | arboard                                   |    80 |\n| tokens     | O200k \u002F Cl100k BPE token counting · both tables embedded                             | tiktoken-rs                               |    65 |\n| html       | HTML to Markdown with optional content cleaning                                      | html-to-markdown-rs                       |    50 |\n\n## Four entry points: _interactive_, _one-shot_, RPC, and ACP.\n\nSame 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.\n\n### Interactive — when in doubt, the agent asks\n\nThe 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.\n\nThe same prompt cards surface over ACP, so editors get the picker without writing one.\n\n![omp TUI: the ask tool renders an option picker with three choices, a (Recommended) badge on the first, and 'up\u002Fdown navigate · enter select · esc cancel' footer.](https:\u002F\u002Fomp.sh\u002Fcaptures\u002Fask.webp)\n\n### SDK — embed in Node\n\n`@oh-my-pi\u002Fpi-coding-agent`\n\nNode and TypeScript hosts pull the engine in directly. The package exposes `ModelRegistry`, `SessionManager`, `createAgentSession`, and `discoverAuthStorage`; the session emits typed events you subscribe to.\n\n```ts\nimport { ModelRegistry, SessionManager, createAgentSession, discoverAuthStorage } from \"@oh-my-pi\u002Fpi-coding-agent\";\n\nconst auth = await discoverAuthStorage();\nconst models = new ModelRegistry(auth);\nawait models.refresh();\n\nconst { session } = await createAgentSession({\n\tsessionManager: SessionManager.inMemory(),\n\tauthStorage: auth,\n\tmodelRegistry: models,\n});\nawait session.prompt(\"list .ts files\");\n```\n\n### RPC — drive over stdio\n\n`omp --mode rpc`\n\nFor 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.\n\n```\n$ omp --mode rpc --no-session\n> {\"id\":\"r1\",\"type\":\"prompt\",\"message\":\"list .ts files\"}\n\u003C {\"id\":\"r1\",\"type\":\"response\", ...}\n> {\"id\":\"r2\",\"type\":\"set_model\",\"provider\":\"anthropic\",\"modelId\":\"sonnet-4.5\"}\n> {\"id\":\"r3\",\"type\":\"abort\"}\n```\n\n### ACP — speak to editors\n\n`omp acp`\n\nThe [Agent Client Protocol](https:\u002F\u002Fgithub.com\u002Fzed-industries\u002Fagent-client-protocol) over JSON-RPC. When the editor advertises capabilities, tool I\u002FO routes through it and writes are gated by `session\u002Frequest_permission`.\n\n| omp tool                      | ACP route                           |\n| ----------------------------- | ----------------------------------- |\n| `bash`                        | `terminal\u002Fcreate + terminal\u002Foutput` |\n| `read`                        | `fs\u002Fread_text_file`                 |\n| `write`                       | `fs\u002Fwrite_text_file`                |\n| `edit, ast_edit, write, bash` | `session\u002Frequest_permission`        |\n\nFull reference: [omp.sh\u002Fdocs\u002Fsdk](https:\u002F\u002Fomp.sh\u002Fdocs\u002Fsdk).\n\n## A harness worth keeping is one you _don't_ outgrow.\n\nPick it up at **[omp.sh](https:\u002F\u002Fomp.sh)**.\n\nomp is a fork of [Pi](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono) by [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fmariozechner), rewritten as a coding-first surface: sessions, subagents, slash commands, extensions — all TypeScript, all MIT, all on [GitHub](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi). Shape it from config, hook it from outside, or read the source when you need to.\n\n### Primitives\n\nAn 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.\n\n### Discovery\n\nOn first run omp inherits whatever is already on disk: rules, skills, and MCP servers from `.claude`, `.cursor`, `.windsurf`, `.gemini`, `.codex`, `.cline`, `.github\u002Fcopilot`, and `.vscode`. No migration script.\n\n### Extensibility\n\nAsk omp to write the piece you're missing, then `\u002Freload-plugins`. Keep it local, ship it in a `marketplace`, or publish it to npm.\n\n## Philosophy\n\nomp is a fork of [pi-mono](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono) by [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fmariozechner), extended with a batteries-included coding workflow.\n\nKey ideas:\n\n- Keep interactive terminal-first UX for real coding work\n- Include practical built-ins (tools, sessions, branching, subagents, extensibility)\n- Make advanced behavior configurable rather than hidden\n\n---\n\n## Development\n\n### Debug Command\n\n`\u002Fdebug` opens tools for debugging, reporting, and profiling.\n\nFor architecture and contribution guidelines, see [packages\u002Fcoding-agent\u002FDEVELOPMENT.md](packages\u002Fcoding-agent\u002FDEVELOPMENT.md).\n\n---\n\n## Monorepo Packages\n\n| Package                                                   | Description                                                                |\n| --------------------------------------------------------- | -------------------------------------------------------------------------- |\n| **[@oh-my-pi\u002Fpi-ai](packages\u002Fai)**                        | Multi-provider LLM client with streaming and model\u002Fprovider integration    |\n| **[@oh-my-pi\u002Fpi-agent-core](packages\u002Fagent)**             | Agent runtime with tool calling and state management                       |\n| **[@oh-my-pi\u002Fpi-coding-agent](packages\u002Fcoding-agent)**    | Interactive coding agent CLI and SDK                                       |\n| **[@oh-my-pi\u002Fpi-tui](packages\u002Ftui)**                      | Terminal UI library with differential rendering                            |\n| **[@oh-my-pi\u002Fpi-natives](packages\u002Fnatives)**              | N-API bindings for grep, shell, image, text, syntax highlighting, and more |\n| **[@oh-my-pi\u002Fomp-stats](packages\u002Fstats)**                 | Local observability dashboard for AI usage statistics                      |\n| **[@oh-my-pi\u002Fpi-utils](packages\u002Futils)**                  | Shared utilities (logging, streams, dirs\u002Fenv\u002Fprocess helpers)              |\n| **[@oh-my-pi\u002Fswarm-extension](packages\u002Fswarm-extension)** | Swarm orchestration extension package                                      |\n\n### Rust Crates\n\n| Crate                                                         | Description                                                                                         |\n| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |\n| **[pi-natives](crates\u002Fpi-natives)**                           | Core Rust native addon (N-API `cdylib`) used by `@oh-my-pi\u002Fpi-natives`; aggregates the crates below |\n| **[pi-shell](crates\u002Fpi-shell)**                               | Embedded shell \u002F PTY \u002F process management split out of `pi-natives` (wraps `brush-*`)               |\n| **[pi-ast](crates\u002Fpi-ast)**                                   | tree-sitter-based code summarizer and AST utilities (50+ language grammars)                         |\n| **[pi-iso](crates\u002Fpi-iso)**                                   | Task isolation backend resolver: APFS clones, btrfs\u002Fzfs reflinks, overlayfs, projfs, rcopy          |\n| **[brush-core-vendored](crates\u002Fbrush-core-vendored)**         | Vendored fork of [brush-shell](https:\u002F\u002Fgithub.com\u002Freubeno\u002Fbrush) for embedded bash execution        |\n| **[brush-builtins-vendored](crates\u002Fbrush-builtins-vendored)** | Vendored bash builtins (cd, echo, test, printf, read, export, etc.)                                 |\n\n---\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\n© 2025 Mario Zechner  \n© 2025-2026 Can Bölük\n\n_made for terminals that stay open_\n\n- [omp.sh](https:\u002F\u002Fomp.sh)\n- [GitHub](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi)\n- [Changelog](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002FCHANGELOG.md)\n- [npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@oh-my-pi\u002Fpi-coding-agent)\n- [Discord](https:\u002F\u002Fdiscord.gg\u002F4NMW9cdXZa)\n- [MIT](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002FLICENSE)\n","oh-my-pi 是一个集成在终端中的AI编码助手，支持多种编程语言和工具。它通过哈希锚定编辑、优化的工具链整合、LSP（语言服务器协议）支持以及多模型提供者等特性，为开发者提供高效且智能的编码体验。项目采用TypeScript编写，并结合了Rust以提升性能，确保在处理代码时能够快速准确地完成任务。适用于需要在命令行环境中进行复杂开发工作的场景，尤其适合那些希望利用AI技术提高生产力的专业程序员。",2,"2026-06-11 03:46:34","high_star"]