omp - an open-source AI endpoint programming agent that can deeply integrate with IDEs.
omp (oh-my-pi) is an open-source AI terminal programming agent based on the Pi project. Its core code consists of approximately 27,000 lines of Rust and supports 40+ model vendors and 32+ built-in tools.
What is OMP?
omp (oh-my-pi) is an open-source AI terminal programming agent based on the Pi project. Its core code consists of approximately 27,000 lines of Rust, supporting over 40 model vendors and 32+ built-in tools. omp is positioned as a terminal coding tool that can deeply integrate with IDEs. Through its unique Hashline hash anchoring editing technology, LSP/DAP protocol integration, and real browser-driven architecture, omp unifies code editing, refactoring, debugging, and searching capabilities into a single terminal interface, breaking the limitations of current AI coding tools that require viewing code through a glass window.
Main functions of OMP
-
Hashline Intelligent Code EditorThis approach uses code content hashes as anchor points to locate modification positions, replacing traditional text matching and resolving editing failures caused by whitespace mismatches.
-
LSP Deep IntegrationIt interfaces with language server protocols to enable IDE-level code analysis capabilities such as symbol reference lookup, cross-file refactoring, and function renaming.
-
DAP debugger driverSupports real debuggers such as LLDB, Delve, and debugpy, and allows setting breakpoints, reading variable values and call stacks, replacing log printing for troubleshooting.
-
Dual-kernel code executionBuilt-in persistent Python and Bun worker, supporting callbacks from code to the agent's own read, search, task, and other tools.
-
Web search and browsingIt integrates 14 search providers, can drive real browsers and enable anti-crawling avoidance mode, and feeds web page content to the model in a structured manner.
-
Parallel execution of sub-agentsIt supports breaking down complex tasks into multiple subtasks, assigning them to different sub-agents for parallel processing, and then merging the results.
-
Hindsight (cross-session memory)The agent can retain memories of project structure and other information between conversations, so that new conversations do not need to explain the context from scratch.
-
Model dynamic routingAutomatically switches between different models based on task type, supporting [further functionality].
/modelUse the command or the shortcut Ctrl+P to manually cycle through the commands.
OMP technical principles
-
Hashline anchoring algorithmA unique anchor point is generated by calculating the content hash value of the code snippet. The model only needs to output the hash anchor point and the modified content, without having to completely rewrite the original code snippet.
-
LSP Protocol BridgingAs an LSP client, it communicates with the project's existing language server, exposing advanced semantic operations such as workspace/willRenameFiles to the AI Agent.
-
DAP Protocol BridgingBy interacting with backends such as LLDB-DAP, delve, and debugpy through the debug adapter protocol, breakpoint states, variable scopes, and call stack information are transformed into structured data that the model can understand.
-
Loopback Tool BridgeThe Python/Bun execution environment uses a local loopback interface to call the agent's toolset, enabling bidirectional communication between code execution and file system/search capabilities.
-
Time-traveling stream rulesReal-time regular expression matching in the model output stream; triggering a rule interrupts the stream, injects a system alert, and retryes from the same point, without paying extra context tokens for each round of dialogue.
-
Memory compression persistenceThe Hindsight mechanism compresses and persists key contexts, retaining them even after session compression, thus achieving long-term memory across sessions.
How to use OMP
-
macOS / Linux installation: Execute in the terminal
curl -fsSL https://omp.sh/install | shOne-click installation. -
Bundle installation (recommended):implement
bun install -g @oh-my-pi/pi-coding-agentPerform a global installation. -
Windows installation: Execute in PowerShell
irm https://omp.sh/install.ps1 | iexNative support without the need for WSL. -
Mise version control:implement
mise use -g github:can1357/oh-my-piLock a specific version. -
Start usingRun the command in the project directory after installation.
ompYou can start coding, refactoring, or debugging by describing your requirements in natural language. -
Model switching: Input in the dialogue
/modelCommand or pressCtrl+PCyclicly switch the currently used AI model. -
Configure API KeyFor first-time users, you need to configure the API key of the selected model vendor as prompted. Local Ollama/LM Studio zero-key operation is supported.
OMP's core advantages
-
Editing success rate increased by nearly ten timesHashline improved the success rate of Grok Code Fast 1 editing from 6.7% to 68.3%, while reducing token consumption by approximately 61%.
-
IDE-level semantic operationsUnlike plain text replacement, omp can call LSP to achieve precise reconstruction across files, and automatically synchronize all reference points after renaming.
-
Real debugging, not guesswork: By directly driving the debugger to read the runtime state through DAP, it avoids the inefficient method of blindly checking by simply adding print statements in traditional AI tools.
-
Model independence and cost optimizationSupports 40+ vendors and local models, automatically routes different tasks to the most cost-effective model, and reduces API costs.
-
The ready-to-use family bucketIt has 32+ built-in tools including search, browser, code execution, sub-agent, and memory, without the need for additional MCP configuration or plugins.
-
Cross-platform native supportWindows runs natively without WSL, while macOS and Linux both offer one-click installation scripts.
omp project address
- GitHub repositoryhttps://github.com/can1357/oh-my-pi
OMP's Competitive Product Comparison
| Comparison Dimensions | omp (oh-my-pi) | OpenCode | Aider |
|---|---|---|---|
| position | Terminal coding intelligence agent linked with IDE | Terminal native open source code Agent | Git-native terminal pair programming assistant |
| Open source license | MIT | MIT | Apache 2.0 |
| Core Language | Rust (~27,000 lines of core) | Go + TypeScript + Rust + Tauri | Python |
| Model Supplier | 40+ (including local Ollama/LM Studio) | 75+ (including local Ollama/LM Studio) | Any LLM (Claude/GPT/Gemini/Local) |
| Code editing technology | Hashline Hash AnchoringThis reduced token usage by 61% and increased the success rate of edits by nearly 10 times. | Traditional diff/patch text editing | Traditional diff editing + tree-sitter codebase understanding |
| LSP Integration | Deep integrationIt supports refactoring, reference lookup, and cross-file synchronization (13 LSP operations). | Automatic LSP loading, real-time diagnostics and type awareness | No native LSP plugin, pure text-based operation |
| Debugger support | DAP driver(LLDB/Delve/debugpy, 27 DAP operations), supports breakpoints and variable reading. | No native debugger driver | No native debugger driver |
| Git integration | Basic file operations | Basic file operations | Git-firstAutomatically commits and generates semantic commits with each change, supporting... /undo rollback |
| Sub-agents / Parallelism | Built-in sub-agents execute in parallelThe results of task splitting and merging | Multi-session parallelism (multiple agents for the same project) | Single Agent tool, no native sub-agent orchestration |
| Cross-session memory | HindsightThe dialogue room retains the memory of the project structure. | Single session, no persistent cross-session memory | Single session, no persistent cross-session memory |
| Code execution environment | Dual-core(Persistent Python + Bun worker), kernel can call back Agent tools | Supports shell execution and code running. | Supports shell execution, with built-in linter and test runner for automatic repair. |
| Web search / browsing | 14 search providers + Real browser driver (anti-scraping circumvention) | Supports web fetching | No built-in browser driver |
| Flow control mechanism | Time-traveling stream rulesRegular expression matching stream and real-time rule injection for correction. | none | none |
Application scenarios of OMP
-
Large-scale project restructuringUse LSP for cross-file reference analysis, securely rename functions, extract interfaces, and automatically synchronize all import points.
-
Debugging complex bugs: Set breakpoints directly in C/Rust/Go/Python projects to allow AI to read runtime variables and call stacks to locate segfaults or deadlocks.
-
Multilingual hybrid development: Through automatic model routing, use lightweight models in everyday conversations and seamlessly switch to top-level inference models when encountering complex algorithms.
-
Research and Prototype ValidationDrive a real browser to search GitHub/Stack Overflow/arxiv, structure the results and directly generate runnable prototype code.
-
Long-term maintenance projectsWith the help of Hindsight's cross-session memory, AI continuously remembers the project architecture and coding standards, avoiding the need to repeatedly explain the background in each new session.