# omp (oh-my-pi)

> A terminal-based AI coding agent with IDE-grade tooling: hash-anchored edits, LSP, DAP debugger, subagents, browser automation, and 40+ model providers.

omp (oh-my-pi) is an open-source, terminal-first AI coding agent forked from Mario Zechner's Pi project and extended by Can Bölük into a batteries-included coding surface. It runs as a single Bun process, supports 40+ model providers, and ships 32 built-in tools backed by a 100,000+ line Rust core — all under the MIT license. The project reached 19,000+ GitHub stars and is actively maintained, with the latest release (v17.0.7) published in July 2026.

## What It Is

omp is a CLI coding agent designed for engineers who live in a terminal. Unlike agents that bolt on IDE features as afterthoughts, omp wires LSP, DAP debugging, subagents, browser automation, and a persistent memory system directly into the same tool surface the model uses to read files and run shell commands. It runs natively on macOS, Linux, and Windows (no WSL required) and can be embedded in editors via the Agent Client Protocol (ACP) or driven programmatically through a Node/TypeScript SDK or NDJSON RPC interface.

## How the Tool Surface Works

omp's 32 built-in tools share a single flat namespace. Key tools include:

- **read** — handles files, directories, archives, SQLite, PDFs, notebooks, URLs, and internal `://` schemes (pr://, issue://, agent://, skill://, vault://, mcp://) through one interface
- **edit** — uses "hashline" patches: content-hash anchors replace line numbers, so whitespace battles and stale-diff loops stop; the project reports Grok 4 Fast spending 61% fewer output tokens on the same tasks
- **lsp** — 14 operations across 53 language servers; renames go through `workspace/willRenameFiles` so barrel files and re-exports update atomically
- **debug** — drives real DAP adapters (lldb-dap, dlv, debugpy, js-debug-adapter, and more) for breakpoints, stepping, and variable inspection
- **task** — fans work out to isolated subagent worktrees with schema-validated typed results; siblings coordinate over an in-process IRC bus
- **eval** — persistent Python and Bun JavaScript kernels that can call back into the agent's own tools over a loopback bridge
- **browser** — Puppeteer tabs over headless Chromium or CDP-attached Electron apps, with stealth mode on by default

## Architecture: Native Rust Core

Seven Rust crates plus a vendored shell and coreutils compile into a single platform-tagged N-API addon. ripgrep, glob, find, an embedded bash (brush-shell), and BPE token counting all run in-process on the libuv thread pool — no fork/exec on the hot path. The snapcompact module renders context history into dense pixel-font PNGs (a 1568×1568 frame carries roughly 40,000 characters) for deterministic, on-device context compaction with no summarizer model call. Platforms covered: linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64.

## Model Routing and Provider Breadth

omp supports 40+ providers across three groups: frontier APIs (Anthropic, OpenAI, Google Gemini, xAI, Mistral, Groq, Cerebras, Fireworks, OpenRouter, and others), coding-plan subscriptions (Cursor, GitHub Copilot, GitLab Duo, Kimi Code, MiniMax, Alibaba, Z.AI/GLM, and others), and self-hosted OpenAI-compatible servers (Ollama, LM Studio, llama.cpp, vLLM, LiteLLM). Roles (`default`, `smol`, `slow`, `plan`, `commit`) route work by intent, and per-role fallback chains handle 429s and quota walls automatically. Round-robin credential rotation and path-scoped model overrides are also supported.

## Distinctive Features

- **Time-traveling stream rules (TTSR):** regex rules sit dormant until the model goes off-script; a match aborts the stream mid-token, injects the rule, and retries from the same point — zero context cost until triggered
- **Live session sharing (/collab):** AES-256-GCM end-to-end encrypted relay; the key lives only in the URL fragment; guests join from another terminal or a browser with no install
- **Advisor role:** a second model watches every turn and injects notes (aside / concern / blocker) inline without sharing the main agent's context
- **mnemopi memory:** local SQLite store with vector embeddings and graph tools; `retain`, `recall`, `reflect`, and `memory_edit` persist facts across sessions, scoped globally or per-project
- **GitHub as a virtual filesystem:** `read pr://1428`, `read issue://1234`, `read pr://1428/diff/3` — no separate gh_* tools, just paths
- **omp commit:** splits unrelated working-tree changes into topologically ordered atomic commits; lock files excluded from analysis
- **Config inheritance:** on first run, omp reads rules, skills, and MCP servers from `.claude`, `.cursor`, `.windsurf`, `.gemini`, `.codex`, `.cline`, `.github/copilot`, and `.vscode` with no migration script

## Update: v17.0.7 and Recent Releases

The latest release is v17.0.7 (July 21, 2026). The changelog covers versions 15.5 through 17.x, with notable additions including: live session sharing over an E2E-encrypted relay (`/collab`), the snapcompact on-device context compaction strategy, the mnemopi local SQLite memory backend, four compaction strategies (`shake`, `handoff`, `snapcompact`, `context-full`), the `/omfg` command for deriving stream rules from mistakes, on-device tiny-model housekeeping (session titling and memory extraction via transformers.js models), server-side session stores (Redis, Postgres, MySQL/MariaDB, SQLite), per-turn auto thinking level classification, and plugin installation directly from GitHub/GitLab/Bitbucket repos. The project is actively developed with 920 open issues and pushes as recently as July 22, 2026.

## Features
- Hash-anchored edits (hashline) with stale-anchor recovery
- LSP integration: 14 operations across 53 language servers
- DAP debugger: 28 operations, 14 bundled adapters (lldb-dap, dlv, debugpy, js-debug-adapter)
- 32 built-in tools in a flat namespace
- First-class subagents with isolated worktrees and IRC coordination bus
- Time-traveling stream rules (TTSR): regex-triggered mid-stream course correction
- Live session sharing with AES-256-GCM end-to-end encryption (/collab)
- Advisor role: second model watches every turn and injects notes
- mnemopi local SQLite memory with vector embeddings and graph tools
- snapcompact: on-device deterministic context compaction to pixel-font PNGs
- Persistent Python and Bun JavaScript eval kernels with tool re-entry
- Browser automation via Puppeteer (headless Chromium or CDP-attached Electron apps)
- GitHub as a virtual filesystem (pr://, issue://, pr://N/diff/M)
- 40+ model providers with per-role routing and fallback chains
- omp commit: atomic topological commit splitting
- ACP (Agent Client Protocol) for editor integration (Zed)
- Node/TypeScript SDK and NDJSON RPC interface
- Config inheritance from Cursor, Cline, Codex, Copilot, Claude, Windsurf, Gemini
- 100,000+ line Rust core: in-process ripgrep, glob, find, embedded bash
- Windows-native support (no WSL required)
- web_search with 25 backends and site-aware structured extraction
- Plan mode with sandboxed planner model
- Session branching and forking (JSONL-based)
- Code review with P0-P3 priority ranking and verdict (/review)
- Conflict resolution via conflict:// URL scheme
- AST-based structural edits with preview-then-accept flow (ast_edit)
- On-device tiny-model housekeeping (session titling, memory extraction)
- Plugin system: install from npm or GitHub/GitLab/Bitbucket repos
- Shell completions for bash, zsh, fish generated from live metadata
- Obsidian vault integration (vault:// scheme)

## Integrations
Anthropic Claude, OpenAI, OpenAI Codex, Google Gemini, Google Antigravity, xAI Grok, Mistral, Groq, Cerebras, Fireworks, Together AI, Hugging Face, NVIDIA, OpenRouter, Vercel AI Gateway, Cloudflare AI Gateway, Perplexity, Cursor, GitHub Copilot, GitLab Duo, Kimi Code, MiniMax, Alibaba Coding Plan, Z.AI / GLM, Ollama, LM Studio, llama.cpp, vLLM, LiteLLM, Zed (ACP), MCP (Model Context Protocol), GitHub, Obsidian, Exa, Brave Search, Jina, Tavily, Kagi, SearXNG, Redis, PostgreSQL, MySQL/MariaDB, SQLite, Puppeteer / Chromium, tree-sitter (50+ grammars), transformers.js (on-device models)

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, VSC_EXTENSION, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v17.0.7

## Links
- Website: https://omp.sh
- Documentation: https://omp.sh/docs
- Repository: https://github.com/can1357/oh-my-pi
- EveryDev.ai: https://www.everydev.ai/tools/omp-oh-my-pi
