<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>终端 Agent on Text Matrix</title><link>https://txtmix.com/tags/%E7%BB%88%E7%AB%AF-agent/</link><description>Recent content in 终端 Agent on Text Matrix</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 21 Jul 2026 20:06:14 +0800</lastBuildDate><atom:link href="https://txtmix.com/tags/%E7%BB%88%E7%AB%AF-agent/index.xml" rel="self" type="application/rss+xml"/><item><title>oh-my-pi：把 hash-anchored 编辑做进终端 AI 编程 Agent</title><link>https://txtmix.com/posts/tech/can1357-oh-my-pi-hash-anchored-terminal-coding-agent-guide/</link><pubDate>Thu, 25 Jun 2026 18:05:11 +0800</pubDate><guid>https://txtmix.com/posts/tech/can1357-oh-my-pi-hash-anchored-terminal-coding-agent-guide/</guid><description>&lt;h1 id="oh-my-pi把-hash-anchored-编辑做进终端-ai-编程-agent">oh-my-pi：把 hash-anchored 编辑做进终端 AI 编程 Agent&lt;/h1>
&lt;h2 id="快速信息卡">快速信息卡&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>项目&lt;/th>
 &lt;th>信息&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Stars&lt;/strong>&lt;/td>
 &lt;td>14,781+&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Forks&lt;/strong>&lt;/td>
 &lt;td>1,302+&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>许可证&lt;/strong>&lt;/td>
 &lt;td>MIT&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>语言&lt;/strong>&lt;/td>
 &lt;td>TypeScript + Rust&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>仓库&lt;/strong>&lt;/td>
 &lt;td>&lt;a href="https://github.com/can1357/oh-my-pi" target="_blank" rel="noopener noreffer ">can1357/oh-my-pi&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="学习目标">学习目标&lt;/h2>
&lt;p>阅读本文后，你将能够：&lt;/p>
&lt;ol>
&lt;li>&lt;strong>解释 hashline 锚定编辑的原理和优势&lt;/strong>，掌握其 &lt;code>[PATH#TAG]&lt;/code> 格式、状态机和 stale-tag 恢复机制&lt;/li>
&lt;li>&lt;strong>描述 oh-my-pi 的四层架构&lt;/strong>（交互层、编排层、工具层、Rust 内核），并解释每层的核心职责&lt;/li>
&lt;li>&lt;strong>对比 hashline 与 str_replace 的精度和成本&lt;/strong>，通过真实编辑示例理解为什么 hashline 能显著降低 token 消耗和失败率&lt;/li>
&lt;li>&lt;strong>列出 oh-my-pi 的 32 个内置工具 + 14 LSP + 28 DAP 操作&lt;/strong>，理解&amp;quot;Agent 真的能调的工具&amp;quot;的含义&lt;/li>
&lt;li>&lt;strong>判断什么时候选 omp，什么时候 Claude Code / Cursor / Aider 更合适&lt;/strong>，基于项目类型、任务长度、工具需求做决策&lt;/li>
&lt;/ol>
&lt;h2 id="目录">目录&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="#%e6%a0%b8%e5%bf%83%e5%88%a4%e6%96%ad" rel="">核心判断&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e9%98%85%e8%af%bb%e8%b7%af%e5%be%84" rel="">阅读路径&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e7%b3%bb%e7%bb%9f%e5%9c%b0%e5%9b%be" rel="">系统地图&lt;/a>&lt;/li>
&lt;li>&lt;a href="#hashline-%e6%a0%bc%e5%bc%8f" rel="">hashline 格式&lt;/a>&lt;/li>
&lt;li>&lt;a href="#hashline-%e7%8a%b6%e6%80%81%e6%9c%ba" rel="">hashline 状态机&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e7%9c%9f%e5%ae%9e%e7%bc%96%e8%be%91%e7%a4%ba%e4%be%8b" rel="">真实编辑示例&lt;/a>&lt;/li>
&lt;li>&lt;a href="#hashline-%e7%9a%84%e7%9c%9f%e5%ae%9e%e6%95%88%e6%9e%9c" rel="">hashline 的真实效果&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e4%b8%8e-claude-code--gemini-cli--aider-%e7%9a%84%e5%af%b9%e6%af%94" rel="">与 Claude Code / Gemini CLI / Aider 的对比&lt;/a>&lt;/li>
&lt;li>&lt;a href="#rust-%e5%86%85%e6%a0%b8" rel="">Rust 内核&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e5%b7%a5%e4%bd%9c%e6%b5%81%e7%89%b9%e6%80%a7" rel="">工作流特性&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e9%80%82%e7%94%a8%e5%9c%ba%e6%99%af%e4%b8%8e%e8%be%b9%e7%95%8c" rel="">适用场景与边界&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e8%87%aa%e6%b5%8b%e6%b8%85%e5%8d%95" rel="">自测清单&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e8%bf%9b%e9%98%b6%e8%b7%af%e5%be%84" rel="">进阶路径&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e5%b8%b8%e8%a7%81%e9%97%ae%e9%a2%98" rel="">常见问题&lt;/a>&lt;/li>
&lt;li>&lt;a href="#%e5%8f%82%e8%80%83%e9%93%be%e6%8e%a5" rel="">参考链接&lt;/a>&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="核心判断">核心判断&lt;/h2>
&lt;p>&lt;code>can1357/oh-my-pi&lt;/code>（命令名 &lt;code>omp&lt;/code>，项目主页 &lt;a href="https://omp.sh" target="_blank" rel="noopener noreffer ">omp.sh&lt;/a>）是 Can Bölük 维护的终端 AI 编程 Agent，2025-12-31 立项，到 2026-06 已经 14.5k+ Stars、1.2k+ Forks。它 fork 自 Mario Zechner 的 &lt;a href="https://github.com/badlogic/pi-mono" target="_blank" rel="noopener noreffer ">pi-mono&lt;/a>，把&amp;quot;Pi&amp;quot;从一个底层 LLM 客户端重写成&amp;quot;开箱即用的编码工作流&amp;quot;。&lt;/p></description></item></channel></rss>