SuperAPI AI Directory

omp - An open-source AI terminal coding agent that deeply integrates with IDEs

Author: AI小集 · Original source: AI工具集

What is omp

omp (oh-my-pi) is an open-source AI terminal built as a secondary development based on the Pi projectprogrammingagent, with core code of about 27,000 lines of Rust, supporting 40+ model providers and 32+ built-in tools. omp is positioned as a terminal coding tool that can deeply integrate with IDEs. Through its original Hashline hash-anchored editing technology, LSP/DAP protocol integration, and real browser driving, it unifies code editing, refactoring, debugging, searching, and other capabilities into a single terminal interface, breaking the limitation of current AI coding tools looking at code through glass.

omp

Main features of omp

  • Hashline intelligent code editing: Uses code content hashes as anchors to locate modification positions, replacing traditional text matching and solving edit failures caused by whitespace mismatches.
  • Deep LSP integration: Connects to the Language Server Protocol to implement IDE-level code analysis capabilities such as symbol reference lookup, cross-file refactoring, and function renaming.
  • DAP debugger driving: Supports real debuggers such as LLDB, Delve, and debugpy, and can set breakpoints, read variable values and call stacks, replacing print-log troubleshooting.
  • Dual-kernel code execution: Built-in persistent Python and Bun workers, supporting callbacks from code to the agent's own tools such as read, search, and task.
  • Web search and browsing: Integrates 14 search providers, can drive a real browser and enable anti-crawling evasion mode, and feeds web content to the model in a structured form.
  • Parallel execution of sub-agents: Supports splitting complex tasks into multiple subtasks, assigning them to different sub-agents for parallel processing, and then merging the results.
  • Cross-session memory (Hindsight): The agent can retain memories such as project structure between conversations, so new sessions do not need to explain the context from scratch.
  • Dynamic model routing: Automatically switches between different models according to task type, supporting manual cyclic switching via the /model command or the Ctrl+P shortcut.

Technical principles of omp

  • Hashline anchoring algorithm: Generates a unique anchor by calculating the content hash of a code snippet. The model only needs to output the hash anchor and the modification content, without fully writing back the original code snippet.
  • LSP protocol bridging: Acts as an LSP client to communicate with the project's existing language server, exposing advanced semantic operations such as workspace/willRenameFiles to the AI Agent.
  • DAP protocol bridging: Interacts with backends such as LLDB-DAP, delve, and debugpy through the Debug Adapter Protocol, converting breakpoint states, variable scopes, and call stack information into structured data that the model can understand.
  • Loopback tool bridge: The Python/Bun execution environment calls back into the agent's toolset through a local loopback interface, enabling bidirectional interoperability between code execution and file system and search capabilities.
  • Time-traveling stream rules: Performs real-time regex matching in the model output stream. When a rule is triggered, it interrupts the stream, injects a system reminder, and retries from the same point, without paying extra context tokens for each round of conversation.
  • Memory compression and persistence: The Hindsight mechanism compresses and persists key context, retaining it even after session compression, thereby achieving long-term memory across sessions.

How to use omp

  • macOS / Linux installation: Run in the terminal curl -fsSL https://omp.sh/install | sh for one-click installation.
  • Bun installation (recommended): Run bun install -g @oh-my-pi/pi-coding-agent for global installation.
  • Windows installation: Run in PowerShell irm https://omp.sh/install.ps1 | iex; native support requires no WSL.
  • mise version management: Run mise use -g github:can1357/oh-my-pi to pin a specific version.
  • Start using: After installation, run in the project directory omp, and describe your requirements in natural language to start coding, refactoring, or debugging.
  • Model switching: In the conversation, enter the /model command or press Ctrl+P to cycle through the currently used AI models.
  • Configure API Key: For first-time use, follow the prompts to configure the API key for the selected model provider; local Ollama/LM Studio zero-key operation is supported.

omp's core advantages

  • Edit success rate increased nearly tenfold: Hashline raised Grok Code Fast 1's edit success rate from 6.7% to 68.3%, while reducing Token consumption by about 61%.
  • IDE-level semantic operations: Unlike plain text replacement, omp can call LSP to achieve precise cross-file refactoring, automatically synchronizing all reference points after renaming.
  • Real debugging instead of guessing: It directly drives the debugger through DAP to read runtime state, avoiding the inefficient blind troubleshooting of traditional AI tools that rely only on adding print statements.
  • Model-agnostic and cost optimization: Supports 40+ providers and local models, automatically routing different tasks to the most cost-effective models, reducing API costs.
  • Out-of-the-box all-in-one toolkit: Built-in 32+ tools including search, browser, code execution, sub-agents, and memory, with no need for additional MCP or plugin configuration.
  • Native cross-platform support: Runs natively on Windows without WSL, and one-click installation scripts are provided for both macOS and Linux.

omp's project address

  • GitHub repository:https://github.com/can1357/oh-my-pi

omp's comparison with similar competitors

Comparison dimension omp(oh-my-pi) OpenCode Aider
Positioning Terminal coding agent integrated with the IDE Terminal-native open-source coding Agent Git-native terminal pair programming assistant
Open-source license MIT MIT Apache 2.0
Core language Rust (~27k lines of core) Go + TypeScript + Rust + Tauri Python
Model providers 40+ (including local Ollama/LM Studio) 75+ (including local Ollama/LM Studio) Any LLM (Claude/GPT/Gemini/local)
Code editing technology Hashline hash anchoring, reducing Tokens by 61%, with edit success rate increased nearly 10x Traditional diff/patch text editing Traditional diff editing + tree-sitter codebase understanding
LSP integration ✅ Deep integration, supporting refactoring, reference lookup, and cross-file synchronization (13 LSP operations) ✅ Automatically loads LSP, real-time diagnostics and type awareness ❌ No native LSP plugin, text-level operations only
Debugger support ✅ DAP-driven(LLDB/Delve/debugpy, 27 DAP operations), supports breakpoints and variable inspection ❌ No native debugger driver ❌ No native debugger driver
Git integration Basic file operations Basic file operations ✅ Git-first, automatically commits on every change and generates semantic commits, supports /undo rollback
Sub-agents / Parallelism ✅ Built-in sub-agent parallel execution, merges results after task splitting ✅ Multi-session parallelism (multiple Agents on the same project) ❌ Single Agent tool, no native sub-agent orchestration
Cross-session memory ✅ Hindsight, retains project structure memory between conversations ❌ Single session, no persistent cross-session memory ❌ Single session, no persistent cross-session memory
Code execution environment ✅ Dual kernel(persistent Python + Bun worker), kernels can call back into Agent tools Supports shell execution and code running Supports shell execution, built-in linter and test runner with automatic fixes
Web search / browsing ✅ 14 search providers + real browser driver (anti-scraping evasion) Supports web fetching No built-in browser driver
Flow control mechanism ✅ Time-traveling stream rules, regex-matches the stream and injects rule corrections in real time None None

omp application scenarios

  • Large-scale project refactoring: Use LSP cross-file reference analysis to safely rename functions, extract interfaces, and automatically sync all import points.
  • Complex Bug debugging: Set breakpoints directly in C/Rust/Go/Python projects, letting the AI read runtime variables and call stacks to locate segfaults or deadlocks.
  • Multi-language mixed development: Through automatic model routing, use lightweight models for everyday conversations and seamlessly switch to top-tier reasoning models when encountering complex algorithms.
  • Research and prototype validation: Drive a real browser to search GitHub/Stack Overflow/arxiv, structure the results, and directly generate runnable prototype code.
  • Long-term maintenance projects: With Hindsight cross-session memory, the AI continuously remembers the project architecture and coding standards, avoiding the need to re-explain the background in every new session.