Stop Using Claude Code CLI. Use THIS Instead! (Oh-My-Pi)

Stop Using Claude Code CLI — Use THIS Instead! (Oh-My-Pi)

Andres (Better Stack) · ~5 min · Deep Dive Document
Video thumbnail
⏱ ~5 min 🎤 Andres 🏢 Better Stack 🏷 Oh-My-Pi · LSP · DAP · Hashline Edits · Agent Harness · Pi

Overview

Andres from Better Stack introduces Oh-My-Pi — an open-source AI agent harness built on top of the Pi framework that treats your project as a living application runtime rather than flat text files. The four key architectural upgrades are native Language Server Protocol (LSP) integration for IDE-level refactoring, Debugger Adapter Protocol (DAP) support for live debugging, a model-agnostic architecture with per-task model selection, and hashline edits that save up to 61% on LLM tokens. A compact but feature-dense overview of what may be the most technically advanced terminal agent harness available.

1 Why Standard AI CLI Wrappers Fail

▶ 0:27

Andres frames the problem with existing tools like Claude Code CLI and standard LLM wrappers:

  • You ask it to fix a bug → it stares at your source code as a giant wall of text
  • It guesses the fix, throws in some print statements, and hopes for the best
  • The fundamental issue: these tools treat your project as a collection of flat text files
Oh-My-Pi's core differentiator: it treats your project like a living, breathing application runtime — not just text files. This is achieved through four architectural upgrades that give the agent IDE-level and debugger-level understanding of your code.

2 Feature 1 — Native LSP Integration

▶ 0:52

Oh-My-Pi hooks directly into your Language Server Protocol — the same technology that powers IDE features like IntelliSense, go-to-definition, and workspace-wide refactoring:

  • Workspace-level structural refactors — rename a core module or refactor a function imported across 50 files, and it performs a proper, safe refactor
  • Automatic barrel file updates — handles re-exports and index files
  • Aliased import handling — correctly resolves and updates aliased imports
  • Pre-disk validation — cleans up re-exports before touching the filesystem
This is what's missing in standard Claude Code CLI: it works like an IDE, not a text editor. Instead of regex-based search-and-replace across files, it uses the language server's structural understanding of your code.

3 Feature 2 — Built-in DAP Support

▶ 1:31

Oh-My-Pi has full Debugger Adapter Protocol support built in:

  • Go deadlocks → boots up dlv (Delve debugger) and attaches to the broken process
  • Python runtime errors → launches debugpy and attaches directly
  • C/C++ crashes → connects through GDB/LLDB via DAP
  • Live inspection — can hit breakpoints, evaluate live memory state, and inspect stack frames

This means the agent isn't just reading error messages and guessing — it can actually inspect the running program's state to understand what went wrong.

4 Feature 3 — Model Agnostic Architecture

▶ 2:02

Oh-My-Pi supports many providers and has two standout capabilities:

  • Claude Code account import — log in with your Claude Code account and it automatically ports all your plugins and settings to Oh-My-Pi
  • Per-task model selection — assign different models for different task types:
    • A specialized vision model for vision tasks
    • A designer model for design tasks
    • A fast model for quick edits, a powerful model for complex reasoning

5 Feature 4 — Hashline Edits (61% Token Savings)

▶ 2:24

The most technically innovative feature. How standard editors (like Claude Code) work:

  • Send the literal old string and the literal new string
  • The model reproduces every character it wants to change
  • Expensive in tokens and prone to whitespace/syntax errors

How Hashline Edits Work

  • Instead of retyping the whole file or sending massive text diffs, Oh-My-Pi targets the exact line using a content hash anchor
  • Only the changed content is transmitted — the hash identifies which line to modify
  • Prevents whitespace syntax errors — a common problem with text-diff-based approaches
  • For a model like Grok-4-Fast, this saves up to 61% on LLM token usage
Hashline edits are a fundamentally different approach to file editing: instead of sending "old text → new text" pairs, the agent targets specific lines by content hash and sends only what changed. This is both cheaper and more reliable.

6 Real-World Test — Building a Rust App

▶ 2:58

Andres tests Oh-My-Pi by asking it to build a Rust desktop application that lists ticker symbols from StockTwits:

  • Oh-My-Pi has its own built-in browser tool — when it needed to retrieve data from the web, it launched a Chrome browser instance rather than using curl or fetch
  • The headless browser approach is more reliable for dynamic web content than raw HTTP requests
  • The app was successfully built and functional

7 TUI Design & Pi Extension Compatibility

▶ 3:20

Andres highlights the visual design and extension ecosystem:

TUI Design

  • Integrated task windows — much easier to read through than Claude Code CLI's output
  • Clear visual hierarchy showing what the agent is doing at each step
  • The authors clearly invested significant effort in the terminal UI design

Pi Extension Compatibility

  • Since Oh-My-Pi is built on Pi, it supports all Pi packages/extensions
  • Install command: oh-my-pi plugin install <package-name>
  • Andres demonstrates by installing the Doom package from the Pi ecosystem — you can play classic Doom inside the terminal by typing /doom

8 Advanced Features & Final Verdict

▶ 4:07

Additional features Andres mentions but doesn't have time to cover in depth:

  • PR review tool — built-in pull request review capabilities
  • Sub-agent support — can spawn and manage sub-agents for parallel work
  • PDF reading — can easily parse and understand PDF documents
  • Hindsight for agent memory — memory management system that helps the agent maintain context across sessions

Andres's verdict: Oh-My-Pi is a "powerhouse tool" — open source, feature-rich, and built on the extensible Pi foundation. He definitively recommends trying it out.

🎯 Key Takeaways

🔑 Key Takeaways

  • Oh-My-Pi treats code as runtime, not text — the fundamental difference from Claude Code CLI and other wrappers
  • Native LSP = IDE-level refactoring — proper workspace-wide renames, barrel file updates, aliased import handling through the language server
  • Built-in DAP = real debugging — attach to running processes with dlv/debugpy, hit breakpoints, inspect live memory and stack frames
  • Model agnostic with per-task routing — use different models for vision, design, coding; import settings from Claude Code
  • Hashline edits save 61% on tokens — content-hash anchors instead of full text diffs; prevents whitespace errors
  • Built-in browser tool — launches Chrome instances instead of relying on curl/fetch for web data
  • Full Pi extension compatibility — install any Pi package with oh-my-pi plugin install
  • Open source — available on GitHub (can1357/oh-my-pi)
  • Beautiful TUI — integrated task windows that are significantly more readable than standard CLI output
  • Additional features — PR review, sub-agents, PDF reading, hindsight memory management

🔗 Resources & Links

Timestamp Index

▶ 0:00Intro — Oh-My-Pi overview
▶ 0:27Why standard CLI wrappers fail — flat text file problem
▶ 0:52Feature 1: Native LSP integration — IDE-level refactoring
▶ 1:31Feature 2: Built-in DAP — live debugging with dlv/debugpy
▶ 2:02Feature 3: Model agnostic — per-task model selection
▶ 2:24Feature 4: Hashline edits — 61% token savings
▶ 2:58Testing — building a Rust app with built-in browser
▶ 3:20TUI design & Pi extension compatibility (Doom!)
▶ 4:07Advanced features — PR review, sub-agents, hindsight