[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-can1357--oh-my-pi":3,"tool-can1357--oh-my-pi":61},[4,18,26,36,44,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",150037,2,"2026-04-10T23:33:47",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":32,"last_commit_at":42,"category_tags":43,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":45,"name":46,"github_repo":47,"description_zh":48,"stars":49,"difficulty_score":32,"last_commit_at":50,"category_tags":51,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[52,13,15,14],"插件",{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":32,"last_commit_at":59,"category_tags":60,"status":17},4721,"markitdown","microsoft\u002Fmarkitdown","MarkItDown 是一款由微软 AutoGen 团队打造的轻量级 Python 工具，专为将各类文件高效转换为 Markdown 格式而设计。它支持 PDF、Word、Excel、PPT、图片（含 OCR）、音频（含语音转录）、HTML 乃至 YouTube 链接等多种格式的解析，能够精准提取文档中的标题、列表、表格和链接等关键结构信息。\n\n在人工智能应用日益普及的今天，大语言模型（LLM）虽擅长处理文本，却难以直接读取复杂的二进制办公文档。MarkItDown 恰好解决了这一痛点，它将非结构化或半结构化的文件转化为模型“原生理解”且 Token 效率极高的 Markdown 格式，成为连接本地文件与 AI 分析 pipeline 的理想桥梁。此外，它还提供了 MCP（模型上下文协议）服务器，可无缝集成到 Claude Desktop 等 LLM 应用中。\n\n这款工具特别适合开发者、数据科学家及 AI 研究人员使用，尤其是那些需要构建文档检索增强生成（RAG）系统、进行批量文本分析或希望让 AI 助手直接“阅读”本地文件的用户。虽然生成的内容也具备一定可读性，但其核心优势在于为机器",93400,"2026-04-06T19:52:38",[52,14],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":76,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":116,"forks":117,"last_commit_at":118,"license":119,"difficulty_score":32,"env_os":120,"env_gpu":121,"env_ram":121,"env_deps":122,"category_tags":129,"github_topics":130,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":146,"updated_at":147,"faqs":148,"releases":178},4999,"can1357\u002Foh-my-pi","oh-my-pi","⌥  AI Coding agent for the terminal — hash-anchored edits, optimized tool harness, LSP, Python, browser, subagents, and more","oh-my-pi 是一款专为终端打造的 AI 编程助手，旨在让开发者在命令行环境中即可享受智能化的代码编写体验。它解决了传统开发中频繁切换窗口、手动处理繁琐 Git 操作以及上下文管理困难等痛点，将代码编辑、文件浏览、语言服务器协议（LSP）支持乃至浏览器交互无缝集成在终端内。\n\n这款工具特别适合习惯使用命令行的高效开发者和技术极客。其核心亮点在于强大的\"Agent\"能力：不仅能理解代码库结构进行精准修改，还内置了智能的 Git 提交工具。该工具能自动分析代码变更，将复杂的修改拆分为符合规范的原子化提交，甚至自动生成变更日志，极大提升了版本管理的规范性与效率。此外，oh-my-pi 支持会话分支、自主记忆上下文以及高度可定制的插件系统（如自定义技能与工具），允许用户根据项目需求灵活扩展。基于 TypeScript 和 Rust 构建，并依托 Bun 运行时，它在保证功能丰富的同时也兼顾了执行速度，是提升终端开发工作流的得力伙伴。","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_9dbbf45dee4f.png\" alt=\"Pi Monorepo\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>AI coding agent for the terminal\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@oh-my-pi\u002Fpi-coding-agent\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@oh-my-pi\u002Fpi-coding-agent?style=flat&colorA=222222&colorB=CB3837\" alt=\"npm version\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002FCHANGELOG.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchangelog-keep-E05735?style=flat&colorA=222222\" alt=\"Changelog\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fcan1357\u002Foh-my-pi\u002Fci.yml?style=flat&colorA=222222&colorB=3FB950\" alt=\"CI\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fcan1357\u002Foh-my-pi?style=flat&colorA=222222&colorB=58A6FF\" alt=\"License\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.typescriptlang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-3178C6?style=flat&colorA=222222&logo=typescript&logoColor=white\" alt=\"TypeScript\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.rust-lang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRust-DEA584?style=flat&colorA=222222&logo=rust&logoColor=white\" alt=\"Rust\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fbun.sh\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime-Bun-f472b6?style=flat&colorA=222222\" alt=\"Bun\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F4NMW9cdXZa\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-5865F2?style=flat&colorA=222222&logo=discord&logoColor=white\" alt=\"Discord\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  Fork of \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\">badlogic\u002Fpi-mono\u003C\u002Fa> by \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmariozechner\">@mariozechner\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Table of Contents\n\n- [Highlights](#highlights)\n- [Installation](#installation)\n- [Getting Started](#getting-started)\n  - [Terminal Setup](#terminal-setup)\n  - [API Keys & OAuth](#api-keys--oauth)\n  - [First 15 Minutes (Recommended)](#first-15-minutes-recommended)\n- [Usage](#usage)\n  - [Slash Commands](#slash-commands)\n  - [Editor Features](#editor-features)\n  - [Keyboard Shortcuts](#keyboard-shortcuts)\n  - [Bash Mode](#bash-mode)\n  - [Image Support](#image-support)\n- [Sessions](#sessions)\n  - [Session Management](#session-management)\n  - [Context Compaction](#context-compaction)\n  - [Branching](#branching)\n  - [Autonomous Memory](#autonomous-memory)\n- [Configuration](#configuration)\n  - [Project Context Files](#project-context-files)\n  - [Custom System Prompt](#custom-system-prompt)\n  - [Custom Models and Providers](#custom-models-and-providers)\n  - [Settings File](#settings-file)\n- [Extensions](#extensions)\n  - [Themes](#themes)\n  - [Custom Slash Commands](#custom-slash-commands)\n  - [Skills](#skills)\n  - [Hooks](#hooks)\n  - [Custom Tools](#custom-tools)\n- [CLI Reference](#cli-reference)\n- [Tools](#tools)\n- [Programmatic Usage](#programmatic-usage)\n  - [SDK](#sdk)\n  - [RPC Mode](#rpc-mode)\n  - [HTML Export](#html-export)\n- [Philosophy](#philosophy)\n- [Development](#development)\n- [Monorepo Packages](#monorepo-packages)\n- [License](#license)\n\n---\n\n## Highlights\n\n### + Commit Tool (AI-Powered Git Commits)\n\nAI-powered conventional commit generation with intelligent change analysis:\n\n- **Agentic mode**: Tool-based git inspection with `git-overview`, `git-file-diff`, `git-hunk` for fine-grained analysis\n- **Split commits**: Automatically separates unrelated changes into atomic commits with dependency ordering\n- **Hunk-level staging**: Stage individual hunks when changes span multiple concerns\n- **Changelog generation**: Proposes and applies changelog entries to `CHANGELOG.md` files\n- **Commit validation**: Detects filler words, meta phrases, and enforces conventional commit format\n- **Legacy mode**: `--legacy` flag for deterministic pipeline when preferred\n- Run via `omp commit` with options: `--push`, `--dry-run`, `--no-changelog`, `--context`\n\n### + Python Tool (IPython Kernel)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_e055f846b70d.webp\" alt=\"python\">\n\u003C\u002Fp>\n\nExecute Python code with a persistent IPython kernel and rich helper prelude:\n\n- **Streaming output**: Real-time stdout\u002Fstderr with image and JSON rendering\n- **Prelude helpers**: File I\u002FO, search, find\u002Freplace, line operations, shell, and text utilities built into the kernel\n- **Line operations**: `lines()`, `insert_at()`, `delete_lines()`, `delete_matching()` and related helpers for precise edits\n- **Shared gateway**: Resource-efficient kernel reuse across sessions (`python.sharedGateway` setting)\n- **Custom modules**: Load extensions from `.omp\u002Fmodules\u002F` and `~\u002F.omp\u002Fagent\u002Fmodules\u002F`\n- **Rich output**: Supports `display()` for HTML, Markdown, images, and interactive JSON trees\n- **Markdown rendering**: Python cell output with Markdown content renders inline\n- **Mermaid diagrams**: Renders mermaid code blocks as inline graphics in iTerm2\u002FKitty terminals\n- Install dependencies via `omp setup python`\n\n### + LSP Integration (Language Server Protocol)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_16f2f96c8ac4.webp\" alt=\"lsp\">\n\u003C\u002Fp>\n\nFull IDE-like code intelligence with automatic formatting and diagnostics:\n\n- **11 LSP operations**: `diagnostics`, `definition`, `type_definition`, `implementation`, `references`, `hover`, `symbols`, `rename`, `code_actions`, `status`, `reload`\n- **Format-on-write**: Auto-format code using the language server's formatter (rustfmt, gofmt, prettier, etc.)\n- **Diagnostics on write\u002Fedit**: Immediate feedback on syntax errors and type issues after every file change\n- **Workspace diagnostics**: Check entire project for errors with `lsp` action `diagnostics` (without a file)\n- **40+ language configs**: Out-of-the-box support for Rust, Go, Python, TypeScript, Java, Kotlin, Scala, Haskell, OCaml, Elixir, Ruby, PHP, C#, Lua, Nix, and many more\n- **Local binary resolution**: Auto-discovers project-local LSP servers in `node_modules\u002F.bin\u002F`, `.venv\u002Fbin\u002F`, etc.\n- **Symbol disambiguation**: `occurrence` parameter resolves repeated symbols on the same line\n\n### + Time Traveling Streamed Rules (TTSR)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_3422a8aa4c1c.webp\" alt=\"ttsr\">\n\u003C\u002Fp>\n\nZero context-use rules that inject themselves only when needed:\n\n- **Pattern-triggered injection**: Rules define regex triggers that watch the model's output stream\n- **Just-in-time activation**: When a pattern matches, the stream aborts, the rule injects as a system reminder, and the request retries\n- **Zero upfront cost**: TTSR rules consume no context until they're actually relevant\n- **One-shot per session**: Each rule only triggers once, preventing loops\n- Define via `ttsrTrigger` field in rule files (regex pattern)\n\nExample: A \"don't use deprecated API\" rule only activates when the model starts writing deprecated code, saving context for sessions that never touch that API.\n\n### + Interactive Code Review\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_6e9a073e3f80.webp\" alt=\"review\">\n\u003C\u002Fp>\n\nStructured code review with priority-based findings:\n\n- **`\u002Freview` command**: Interactive mode selection (branch comparison, uncommitted changes, commit review)\n- **Structured findings**: `report_finding` tool with priority levels (P0-P3: critical → nit)\n- **Verdict rendering**: aggregates findings into approve\u002Frequest-changes\u002Fcomment\n- Combined result tree showing verdict and all findings\n\n### + Task Tool (Subagent System)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_709fd8e947b0.webp\" alt=\"task\">\n\u003C\u002Fp>\n\nParallel execution framework with specialized agents and real-time streaming:\n\n- **6 bundled agents**: explore, plan, designer, reviewer, task, quick_task\n- **Parallel exploration**: Reviewer agent can spawn explore agents for large codebase analysis\n- **Real-time artifact streaming**: Task outputs stream as they're created, not just at completion\n- **Full output access**: Read complete subagent output via `agent:\u002F\u002F\u003Cid>` resources when previews truncate\n- **Isolation backends**: `isolated: true` runs tasks in git worktrees, Unix fuse-overlay filesystems, or Windows ProjFS (`fuse-projfs`), with patch or branch merge strategies\n- **Async background jobs**: Background execution with configurable concurrency (up to 100 jobs) and `await` tool for blocking on results\n- **Agent Control Center**: `\u002Fagents` dashboard for managing and creating custom agents\n- **AI-powered agent creation**: Generate custom agent definitions with the architect model\n- **Per-agent model overrides**: Assign specific models to individual agents via swarm extension\n- User-level (`~\u002F.omp\u002Fagent\u002Fagents\u002F`) and project-level (`.omp\u002Fagents\u002F`) custom agents\n\n### + Model Roles\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_068922da3e7b.webp\" alt=\"models\">\n\u003C\u002Fp>\n\nConfigure different models for different purposes with automatic discovery:\n\n- **Role-based routing**: `default`, `smol`, `slow`, `plan`, and `commit` roles\n- **Configurable discovery**: Role defaults are auto-resolved and can be overridden per role\n- **Role-based selection**: Task tool agents can use `model: pi\u002Fsmol` for cost-effective exploration\n- CLI args (`--smol`, `--slow`, `--plan`) and env vars (`PI_SMOL_MODEL`, `PI_SLOW_MODEL`, `PI_PLAN_MODEL`)\n- Configure roles interactively via `\u002Fmodel` selector and persist assignments to settings\n\n### + Todo Tool (Task Tracking)\n\nStructured task management with phased progress tracking:\n\n- **Phased task lists**: Organize work into named phases with ordered tasks\n- **5 operations**: `replace` (setup), `add_phase`, `add_task`, `update` (status changes), `remove_task`\n- **4 task states**: `pending`, `in_progress`, `completed`, `abandoned`\n- **Auto-normalization**: Ensures exactly one task is `in_progress` at all times\n- **Persistent panel**: Todo list displays above the editor with real-time progress\n- **Completion reminders**: Agent warned when stopping with incomplete todos (`todo.reminders` setting)\n- **Toggle visibility**: `Ctrl+T` expands\u002Fcollapses the todo panel\n\n### + Ask Tool (Interactive Questioning)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_f917cdd84a22.webp\" alt=\"ask\">\n\u003C\u002Fp>\n\nStructured user interaction with typed options:\n\n- **Multiple choice questions**: Present options with descriptions for user selection\n- **Multi-select support**: Allow multiple answers when choices aren't mutually exclusive\n- **Multi-part questions**: Ask multiple related questions in sequence via `questions` array parameter\n\n### + Custom TypeScript Slash Commands\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_5cdfeede11d8.webp\" alt=\"slash\">\n\u003C\u002Fp>\n\nProgrammable commands with full API access:\n\n- Create at `~\u002F.omp\u002Fagent\u002Fcommands\u002F[name]\u002Findex.ts` or `.omp\u002Fcommands\u002F[name]\u002Findex.ts`\n- Export factory returning `{ name, description, execute(args, ctx) }`\n- Full access to `HookCommandContext` for UI dialogs, session control, shell execution\n- Return string to send as LLM prompt, or void for fire-and-forget actions\n- Also loads from Claude Code directories (`~\u002F.claude\u002Fcommands\u002F`, `.claude\u002Fcommands\u002F`)\n\n### + Universal Config Discovery\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_d9ab9211d7bc.webp\" alt=\"discovery\">\n\u003C\u002Fp>\n\nUnified capability-based discovery that loads configuration from 8 AI coding tools:\n\n- **Multi-tool support**: Claude Code, Cursor, Windsurf, Gemini, Codex, Cline, GitHub Copilot, VS Code\n- **Discovers everything**: MCP servers, rules, skills, hooks, tools, slash commands, prompts, context files\n- **Native format support**: Cursor MDC frontmatter, Windsurf rules, Cline `.clinerules`, Copilot `applyTo` globs, Gemini `system.md`, Codex `AGENTS.md`\n- **Provider attribution**: See which tool contributed each configuration item\n- **Discovery settings**: Enable\u002Fdisable individual providers via `\u002Fextensions` interactive dashboard\n- **Priority ordering**: Multi-path resolution across `.omp`, `.claude`, `.codex`, and `.gemini` directories\n\n### + MCP & Plugin System\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_a0866820ff6c.webp\" alt=\"perplexity\">\n\u003C\u002Fp>\n\nFull Model Context Protocol support with external tool integration:\n\n- Stdio and HTTP transports for connecting to MCP servers\n- **OAuth support**: Explicit `clientId` and `callbackPort` in MCP server config, manual OAuth callbacks via slash commands\n- **Browser server filtering**: Automatically filters browser-type MCP servers to prevent conflicts with built-in browser tool\n- **Automatic Exa filtering**: Extracts Exa API keys and prefers the native Exa integration\n- **Config schema + setup guide**: [`docs\u002Fmcp-config.md`](.\u002Fdocs\u002Fmcp-config.md) and [`packages\u002Fcoding-agent\u002Fsrc\u002Fconfig\u002Fmcp-schema.json`](.\u002Fpackages\u002Fcoding-agent\u002Fsrc\u002Fconfig\u002Fmcp-schema.json)\n- Plugin CLI (`omp plugin install\u002Fenable\u002Fconfigure\u002Fdoctor`)\n- Hot-loadable plugins from `~\u002F.omp\u002Fplugins\u002F` with npm\u002Fbun integration\n- `disabledServers` works on both project-level and user-level third-party servers\n\n### + Web Search & Fetch\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_319fe98e082d.webp\" alt=\"arxiv\">\n\u003C\u002Fp>\n\nMulti-provider search and full-page scraping with specialized handlers:\n\n- **Multi-provider search**: `auto`, `exa`, `brave`, `jina`, `kimi`, `zai`, `anthropic`, `perplexity`, `gemini`, `codex`, `synthetic`\n- **Specialized handlers**: Site-specific extraction for code hosts, registries, research sources, forums, and docs\n- **Package registries**: npm, PyPI, crates.io, Hex, Hackage, NuGet, Maven, RubyGems, Packagist, pub.dev, Go packages\n- **Security databases**: NVD, OSV, CISA KEV vulnerability data\n- HTML-to-markdown conversion with link preservation\n\n### + SSH Tool\n\nRemote command execution with persistent connections:\n\n- **Project discovery**: Reads SSH hosts from `ssh.json` \u002F `.ssh.json` in your project\n- **Host management**: Add, remove, and list hosts via `omp ssh` CLI or `\u002Fssh` slash command\n- **Persistent connections**: Reuses SSH connections across commands for faster execution\n- **OS\u002Fshell detection**: Automatically detects remote OS and shell type\n- **SSHFS mounts**: Optional automatic mounting of remote directories\n- **Compat mode**: Windows host support with automatic shell probing\n\n### + Browser Tool (Puppeteer with Stealth)\n\nHeadless browser automation with 14 stealth scripts to evade bot detection:\n\n- **Automation actions**: Navigate, click, type, fill, scroll, drag, screenshot, evaluate JS, and extract readable content\n- **Accessibility snapshots**: Observe interactive elements via the accessibility tree with numeric IDs for reliable targeting\n- **14 stealth plugins**: Custom scripts covering toString tampering, WebGL fingerprinting, audio context, screen dimensions, font enumeration, plugin\u002Fmime-type mocking, hardware concurrency, codec availability, iframe detection, locale spoofing, worker detection, and more\n- **User agent spoofing**: Removes `HeadlessChrome` identifier, generates proper Client Hints brand lists, applies overrides via CDP Network and Emulation domains\n- **Selector flexibility**: CSS, `aria\u002F`, `text\u002F`, `xpath\u002F`, `pierce\u002F` query handlers for Shadow DOM piercing\n- **Reader mode**: `extract_readable` action uses Mozilla Readability for clean article extraction\n- **Headless\u002Fvisible toggle**: Switch modes at runtime via `\u002Fbrowser` command or `browser.headless` setting\n- **NixOS support**: Automatically detects NixOS (`\u002Fetc\u002FNIXOS`) and resolves a system Chromium (`chromium` on PATH, `~\u002F.nix-profile\u002Fbin\u002Fchromium`, or `\u002Frun\u002Fcurrent-system\u002Fsw\u002Fbin\u002Fchromium`) since Puppeteer's bundled binary cannot run on a non-FHS system\n\n### + Cursor Provider\n\nUse your Cursor Pro subscription for AI completions:\n\n- **Browser-based OAuth**: Authenticate through Cursor's OAuth flow\n- **Tool execution bridge**: Maps Cursor's native tools to omp equivalents (read, write, shell, diagnostics)\n- **Conversation caching**: Persists context across requests in the same session\n- **Shell streaming**: Real-time stdout\u002Fstderr during command execution\n\n### + Multi-Credential Support\n\nDistribute load across multiple API keys:\n\n- **Round-robin distribution**: Automatically cycles through credentials per session\n- **Usage-aware selection**: For OpenAI Codex, checks account limits before credential selection\n- **Automatic fallback**: Switches credentials mid-session when rate limits are hit\n- **Consistent hashing**: FNV-1a hashing ensures stable credential assignment per session\n\n### + Image Generation\n\nCreate images directly from the agent:\n\n- **Gemini integration**: Uses `gemini-3-pro-image-preview` by default\n- **OpenRouter fallback**: Automatically uses OpenRouter when `OPENROUTER_API_KEY` is set\n- **Inline display**: Images render in terminals supporting Kitty\u002FiTerm2 graphics\n- Saves to temp files and reports paths for further manipulation\n\n### + TUI Overhaul\n\nModern terminal interface with smart session management:\n\n- **Auto session titles**: Sessions automatically titled based on first message using commit model, fallback to smol\n- **Welcome screen**: Logo, tips, recent sessions with selection\n- **Powerline footer**: Model, cwd, git branch\u002Fstatus, token usage, context %\n- **LSP status**: Shows which language servers are active and ready\n- **Hotkeys**: `?` displays shortcuts when editor empty\n- **Persistent prompt history**: SQLite-backed with `Ctrl+R` search across sessions\n- **Grouped tool display**: Consecutive Read calls shown in compact tree view\n- **Streaming text preview**: Real-time delta updates during agent output\n- **Overlay UI**: Custom hooks can display components as bottom-centered overlays\n- **Configurable tab width**: `display.tabWidth` setting with `.editorconfig` integration\n- **Scrollback preservation**: Uses home+erase-below instead of clear-screen\n- **Emergency terminal restore**: Crash handlers prevent terminal corruption\n\n### + Hashline Edits\n\nHashline gives every line a short content-hash anchor. The model references anchors instead of reproducing text — no whitespace reproduction, no \"string not found\", no ambiguous matches. If the file changed since the last read, hashes won't match and the edit is rejected before anything gets corrupted.\n\nBenchmarked across 16 models, 180 tasks, 3 runs each:\n\n- **Grok Code Fast 1**: 6.7% → 68.3% — a _tenfold_ improvement hidden behind mechanical patch failures\n- **Gemini 3 Flash**: +5pp over `str_replace`, beating Google's own best attempt\n- **Grok 4 Fast**: 61% fewer output tokens — stopped burning context on retry loops\n- **MiniMax**: more than doubled success rate\n- Matches or beats `str_replace` for nearly every model tested; weakest models gain the most\n\n### + Native Engine (Rust N-API)\n\n~7,500 lines of Rust compiled to a platform-tagged N-API addon, providing performance-critical operations without shelling out to external commands:\n\n| Module        |  Lines | What it does                                                                                                                                         | Powered by                                                        |\n| ------------- | -----: | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |\n| **grep**      | ~1,300 | Regex search over files and in-memory content, parallel\u002Fsequential modes, glob\u002Ftype filtering, context lines, fuzzy find for autocomplete            | `grep-regex`, `grep-searcher`, `grep-matcher` (ripgrep internals) |\n| **shell**     | ~1,025 | Embedded bash execution with persistent sessions, streaming output, timeout\u002Fabort, custom builtins                                                   | [brush-shell](https:\u002F\u002Fgithub.com\u002Freubeno\u002Fbrush) (vendored)        |\n| **text**      | ~1,280 | ANSI-aware visible width, truncation with ellipsis, column slicing, text wrapping that preserves SGR codes across line breaks — all UTF-16 optimized | `unicode-width`, `unicode-segmentation`                           |\n| **keys**      | ~1,300 | Kitty keyboard protocol parser with legacy xterm\u002FVT100 fallback, modifier support, PHF perfect-hash lookup                                           | `phf`                                                             |\n| **highlight** |   ~475 | Syntax highlighting with 11 semantic color categories, 30+ language aliases                                                                          | `syntect`                                                         |\n| **glob**      |   ~340 | Filesystem discovery with glob patterns, type filtering, mtime sorting, `.gitignore` respect                                                         | `ignore`, `globset` (ripgrep internals)                           |\n| **task**      |   ~350 | Blocking work scheduler on libuv thread pool, cooperative\u002Fexternal cancellation, timeout, profiling hooks                                            | `tokio`, `napi`                                                   |\n| **ps**        |   ~290 | Cross-platform process tree kill and descendant listing — `\u002Fproc` on Linux, `libproc` on macOS, `CreateToolhelp32Snapshot` on Windows                | `libc`                                                            |\n| **prof**      |   ~250 | Always-on circular buffer profiler with folded-stack output and optional SVG flamegraph generation                                                   | `inferno`                                                         |\n| **image**     |   ~150 | Decode\u002Fencode PNG\u002FJPEG\u002FWebP\u002FGIF, resize with 5 sampling filters                                                                                      | `image`                                                           |\n| **clipboard** |    ~95 | Text copy and image read from system clipboard — no `xclip`\u002F`pbcopy` needed                                                                          | `arboard`                                                         |\n| **html**      |    ~50 | HTML-to-Markdown conversion with optional content cleaning                                                                                           | `html-to-markdown-rs`                                             |\n\nSupported platforms: `linux-x64`, `linux-arm64`, `darwin-x64`, `darwin-arm64`, `win32-x64`.\n\n### ... and many more\n\n- **`omp config` subcommand**: Manage settings from CLI (`list`, `get`, `set`, `reset`, `path`)\n- **`omp setup` subcommand**: Install optional dependencies (e.g., `omp setup python` for Jupyter kernel)\n- **`omp stats` subcommand**: Local observability dashboard for AI usage (requests, cost, cache rate, tokens\u002Fs)\n- **`xhigh` thinking level**: Extended reasoning for Anthropic models with increased token budgets\n- **Background mode**: `\u002Fbackground` detaches UI and continues agent execution\n- **Completion notifications**: Configurable bell\u002FOSC99\u002FOSC9 when agent finishes\n- **65+ built-in themes**: Catppuccin, Dracula, Nord, Gruvbox, Tokyo Night, Poimandres, and material variants\n- **Automatic dark\u002Flight switching**: Mode 2031 terminal detection, native macOS appearance via CoreFoundation FFI, COLORFGBG fallback\n- **Auto environment detection**: OS, distro, kernel, CPU, GPU, shell, terminal, DE in system prompt\n- **Git context**: System prompt includes branch, status, recent commits\n- **Bun runtime**: Native TypeScript execution, faster startup, all packages migrated\n- **Centralized file logging**: Debug logs with daily rotation to `~\u002F.omp\u002Flogs\u002F`\n- **Bash interceptor**: Optionally block shell commands that have dedicated tools\n- **Per-command PTY control**: Bash tool supports `pty: true` for commands requiring a real terminal (sudo, ssh)\n- **@file auto-read**: Type `@path\u002Fto\u002Ffile` in prompts to inject file contents inline\n- **AST tools**: `ast_grep` and `ast_edit` for syntax-aware code search and codemods via ast-grep\n- **Sampling controls**: `topP`, `topK`, `minP`, `presencePenalty`, `repetitionPenalty` settings for fine-grained model tuning\n\n---\n\n## Installation\n\n### Via Bun (recommended)\n\nRequires [Bun](https:\u002F\u002Fbun.sh) **>= 1.3.7**:\n\n```bash\nbun install -g @oh-my-pi\u002Fpi-coding-agent\n```\n\n### Via installer script\n\n**Linux \u002F macOS:**\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh\n```\n\n**Windows (PowerShell):**\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1 | iex\n```\n\nBy default, the installer uses Bun when available (and compatible), otherwise installs the prebuilt binary.\n\nOptions:\n\n- POSIX (`install.sh`): `--source`, `--binary`, `--ref \u003Cref>`, `-r \u003Cref>`\n- PowerShell (`install.ps1`): `-Source`, `-Binary`, `-Ref \u003Cref>`\n- `--ref`\u002F`-Ref` with binary mode must reference a release tag; branch\u002Fcommit refs require source mode\n\nSet custom install directory with `PI_INSTALL_DIR`.\n\nExamples:\n\n```bash\n# Source install (Bun)\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --source\n\n# Install release tag via binary\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --binary --ref v3.20.1\n\n# Install branch\u002Fcommit via source\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --source --ref main\n```\n\n```powershell\n# Install release tag via binary\n& ([scriptblock]::Create((irm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1))) -Binary -Ref v3.20.1\n# Install branch\u002Fcommit via source\n& ([scriptblock]::Create((irm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1))) -Source -Ref main\n```\n\n### Via [mise](https:\u002F\u002Fmise.jdx.dev)\n\n```bash\nmise use -g github:can1357\u002Foh-my-pi\n```\n\n### Manual download\n\nDownload binaries directly from [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Freleases\u002Flatest).\n\n---\n\n## Getting Started\n\n### Terminal Setup\n\nPi uses the [Kitty keyboard protocol](https:\u002F\u002Fsw.kovidgoyal.net\u002Fkitty\u002Fkeyboard-protocol\u002F) for reliable modifier key detection. Most modern terminals support this protocol, but some require configuration.\n\n**Kitty, iTerm2:** Work out of the box.\n\n**Ghostty:** Add to your Ghostty config (`~\u002F.config\u002Fghostty\u002Fconfig`):\n\n```\nkeybind = alt+backspace=text:\\x1b\\x7f\nkeybind = shift+enter=text:\\n\n```\n\n**wezterm:** Create `~\u002F.wezterm.lua`:\n\n```lua\nlocal wezterm = require 'wezterm'\nlocal config = wezterm.config_builder()\nconfig.enable_kitty_keyboard = true\nreturn config\n```\n\n**Windows Terminal:** Does not support the Kitty keyboard protocol. Shift+Enter cannot be distinguished from Enter. Use Ctrl+Enter for multi-line input instead. All other keybindings work correctly.\n\n### API Keys & OAuth\n\n**Option 1: Environment variables** (common examples)\n\n| Provider                                        | Environment Variable                         |\n|-------------------------------------------------| -------------------------------------------- |\n| Anthropic                                       | `ANTHROPIC_API_KEY`                          |\n| OpenAI                                          | `OPENAI_API_KEY`                             |\n| Google                                          | `GEMINI_API_KEY`                             |\n| Mistral                                         | `MISTRAL_API_KEY`                            |\n| Groq                                            | `GROQ_API_KEY`                               |\n| Cerebras                                        | `CEREBRAS_API_KEY`                           |\n| Hugging Face (`huggingface`)                    | `HUGGINGFACE_HUB_TOKEN` or `HF_TOKEN`        |\n| Synthetic                                       | `SYNTHETIC_API_KEY`                          |\n| NVIDIA (`nvidia`)                               | `NVIDIA_API_KEY`                             |\n| NanoGPT (`nanogpt`)                             | `NANO_GPT_API_KEY`                           |\n| Together (`together`)                           | `TOGETHER_API_KEY`                           |\n| Ollama (`ollama`)                               | `OLLAMA_API_KEY` _(optional)_                |\n| LiteLLM (`litellm`)                             | `LITELLM_API_KEY`                            |\n| LM Studio (`lm-studio`)                         | `LM_STUDIO_API_KEY` _(optional)_             |\n| llama.cpp (`llama.cpp`)                         | `LLAMA_CPP_API_KEY` _(optional)_             |\n| Xiaomi MiMo (`xiaomi`)                          | `XIAOMI_API_KEY`                             |\n| Moonshot (`moonshot`)                           | `MOONSHOT_API_KEY`                           |\n| Venice (`venice`)                               | `VENICE_API_KEY`                             |\n| Kilo Gateway (`kilo`)                           | `KILO_API_KEY`                               |\n| GitLab Duo (`gitlab-duo`)                       | _OAuth only_                                 |\n| Jina (`jina`, web search)                       | `JINA_API_KEY`                               |\n| Perplexity                                      | `PERPLEXITY_API_KEY` or `PERPLEXITY_COOKIES` |\n| xAI                                             | `XAI_API_KEY`                                |\n| OpenRouter                                      | `OPENROUTER_API_KEY`                         |\n| Z.AI                                            | `ZAI_API_KEY`                                |\n| Qwen Portal (`qwen-portal`)                     | `QWEN_OAUTH_TOKEN` or `QWEN_PORTAL_API_KEY`  |\n| vLLM (`vllm`)                                   | `VLLM_API_KEY`                               |\n| Cloudflare AI Gateway (`cloudflare-ai-gateway`) | `CLOUDFLARE_AI_GATEWAY_API_KEY`              |\n| Vercel AI Gateway (`vercel-ai-gateway`)         | `AI_GATEWAY_API_KEY`                         |\n| Qianfan (`qianfan`)                             | `QIANFAN_API_KEY`                            |\n\nSee [Environment Variables](docs\u002Fenvironment-variables.md) for the full list.\n\n**Option 2: `\u002Flogin` (interactive auth \u002F API key setup)**\n\nUse `\u002Flogin` with supported providers:\n\n- Anthropic (Claude Pro\u002FMax)\n- ChatGPT Plus\u002FPro (Codex)\n- GitHub Copilot\n- Google Cloud Code Assist (Gemini CLI)\n- Antigravity (Gemini 3, Claude, GPT-OSS)\n- Cursor\n- Kimi Code\n- Perplexity\n- NVIDIA (`nvidia`)\n- NanoGPT (`nanogpt`)\n- Hugging Face Inference (`huggingface`)\n- OpenCode Zen\n- Kilo Gateway (`kilo`)\n- GitLab Duo (`gitlab-duo`)\n- Qianfan (`qianfan`)\n- Ollama (local \u002F self-hosted, `ollama`)\n- LM Studio (local \u002F self-hosted, `lm-studio`)\n- llama.cpp (local \u002F self-hosted, `llama.cpp`)\n- vLLM (local OpenAI-compatible, `vllm`)\n- Z.AI (GLM Coding Plan)\n- Synthetic\n- Together (`together`)\n- LiteLLM (`litellm`)\n- Xiaomi MiMo (`xiaomi`)\n- Moonshot (Kimi API, `moonshot`)\n- Venice (`venice`)\n- MiniMax Coding Plan (International \u002F China)\n- Qwen Portal (`qwen-portal`)\n- Cloudflare AI Gateway (`cloudflare-ai-gateway`)\n- Vercel AI Gateway (`vercel-ai-gateway`)\n\nFor `ollama`, API key is optional. Leave it unset for local no-auth instances, or set `OLLAMA_API_KEY` for authenticated hosts.\nFor `llama.cpp`, API key is optional. Leave it unset for local no-auth instances, or set `LLAMA_CPP_API_KEY` for authenticated hosts.\nFor `lm-studio`, API key is optional. Leave it unset for local no-auth instances, or set `LM_STUDIO_API_KEY` for authenticated hosts.\nFor `vllm`, paste your key in `\u002Flogin` (or use `VLLM_API_KEY`). For local no-auth servers, any placeholder value works (for example `vllm-local`).\nFor `nanogpt`, `\u002Flogin nanogpt` opens `https:\u002F\u002Fnano-gpt.com\u002Fapi` and prompts for your `sk-...` key (or set `NANO_GPT_API_KEY`). Login validates the key via NanoGPT's models endpoint (not a fixed model entitlement).\nFor `cloudflare-ai-gateway`, set provider base URL to\n`https:\u002F\u002Fgateway.ai.cloudflare.com\u002Fv1\u002F\u003Caccount_id>\u002F\u003Cgateway_id>\u002Fanthropic`\n(for example in `~\u002F.omp\u002Fagent\u002Fmodels.yml`).\n\n```bash\nomp\n\u002Flogin\n```\n\n**Credential behavior:**\n\n- `\u002Flogin` appends credentials for the provider (it does not wipe existing entries)\n- `\u002Flogout` clears saved credentials for the selected provider\n- Credentials are stored in `~\u002F.omp\u002Fagent\u002Fagent.db`\n- For the same provider, saved API key credentials are selected before OAuth credentials\n\n### First 15 Minutes (Recommended)\n\nThis is the practical onboarding flow for new users.\n\n#### 1) Set up providers\n\n- **API keys** (fastest): export `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, etc.\n- **OAuth subscriptions**: run `\u002Flogin` and authenticate with your provider account\n\n#### 2) Configure model roles via `\u002Fmodel`\n\nUse `\u002Fmodel` in the TUI and assign role models:\n\n- `default` → normal implementation work\n- `smol` → fast\u002Fcheap exploration and lightweight tasks\n- `slow` → deep reasoning for complex debugging\u002Frefactors\n- `plan` → model used while plan mode is active (`\u002Fplan`)\n- `commit` → model used by commit\u002Fchangelog workflows\n\nThis setup is interactive and persisted for you.\n\n#### 3) Use `\u002Fplan` before making large changes\n\n`\u002Fplan` toggles plan mode. Use it when you want architecture and execution sequencing before edits.\n\nTypical flow:\n\n1. Run `\u002Fplan`\n2. Ask for a concrete implementation plan\n3. Refine the plan\n4. Approve and execute\n\n#### 4) Review context via `\u002Fextensions`\n\nIf context usage is unexpectedly high, inspect discovered external provider assets (rules\u002Fprompts\u002Fcontext\u002Fhooks\u002Fextensions).\n\nRun `\u002Fextensions` and:\n\n- Browse provider tabs (`Tab` \u002F `Shift+Tab`)\n- Inspect each item source (`via \u003Cprovider>` + file path)\n- Disable full providers or specific items you don't want (`Space`)\n\n---\n\n## Usage\n\n### Slash Commands\n\nThese are **in-chat slash commands** (not CLI subcommands).\n| Command | Description |\n| ------- | ----------- |\n| `\u002Fsettings` | Open settings menu |\n| `\u002Fplan` | Toggle plan mode |\n| `\u002Fmodel` (`\u002Fmodels`) | Open model selector |\n| `\u002Fexport [path]` | Export session to HTML |\n| `\u002Fdump` | Copy session transcript to clipboard |\n| `\u002Fshare` | Upload session as a secret gist |\n| `\u002Fsession` | Show session info and usage |\n| `\u002Fusage` | Show provider usage and limits |\n| `\u002Fhotkeys` | Show keyboard shortcuts |\n| `\u002Fextensions` (`\u002Fstatus`) | Open Extension Control Center |\n| `\u002Fchangelog` | Show changelog entries |\n| `\u002Ftree` | Navigate session tree |\n| `\u002Fbranch` | Open branch selector (tree or message selector, based on settings) |\n| `\u002Ffork` | Fork from a previous message |\n| `\u002Fresume` | Open session picker |\n| `\u002Fnew` | Start a new session |\n| `\u002Fcompact [focus]` | Compact context manually |\n| `\u002Fhandoff [focus]` | Hand off context to a new session |\n| `\u002Fbrowser [headless\\|visible]` | Toggle browser mode |\n| `\u002Fmcp ...` | Manage MCP servers |\n| `\u002Fmemory ...` | Inspect\u002Fclear\u002Frebuild memory state |\n| `\u002Fmove \u003Cpath>` | Move current session to a different cwd |\n| `\u002Fbackground` (`\u002Fbg`) | Detach UI and continue in background |\n| `\u002Fdebug` | Open debug tools |\n| `\u002Fcopy` | Copy last agent message |\n| `\u002Flogin` \u002F `\u002Flogout` | OAuth login\u002Flogout |\n| `\u002Fexit` (`\u002Fquit`) | Exit interactive mode |\n\nBundled custom slash commands include `\u002Freview` (interactive code review launcher).\n\n### Editor Features\n\n**File reference (`@`):** Type `@` to fuzzy-search project files. Respects `.gitignore`.\n\n**Path completion (Tab):** Complete relative paths, `..\u002F`, `~\u002F`, etc.\n\n**Drag & drop:** Drag files from your file manager into the terminal.\n\n**Multi-line paste:** Pasted content is collapsed in preview but sent in full.\n\n**Message queuing:** Submit messages while the agent is working; queue behavior is configurable in `\u002Fsettings`.\n\n### Keyboard Shortcuts\n\n**Navigation:**\n\n| Key                      | Action                                       |\n| ------------------------ | -------------------------------------------- |\n| Arrow keys               | Move cursor \u002F browse history (Up when empty) |\n| Option+Left\u002FRight        | Move by word                                 |\n| Ctrl+A \u002F Home \u002F Cmd+Left | Start of line                                |\n| Ctrl+E \u002F End \u002F Cmd+Right | End of line                                  |\n\n**Editing:**\n\n| Key                       | Action                  |\n| ------------------------- | ----------------------- |\n| Enter                     | Send message            |\n| Shift+Enter \u002F Alt+Enter   | New line                |\n| Ctrl+W \u002F Option+Backspace | Delete word backwards   |\n| Ctrl+U                    | Delete to start of line |\n| Ctrl+K                    | Delete to end of line   |\n\n**Other:**\n\n| Key                   | Action                                                    |\n| --------------------- | --------------------------------------------------------- |\n| Tab                   | Path completion \u002F accept autocomplete                     |\n| Escape                | Cancel autocomplete \u002F abort streaming                     |\n| Ctrl+C                | Clear editor (first) \u002F exit (second)                      |\n| Ctrl+D                | Exit (when editor is empty)                               |\n| Ctrl+Z                | Suspend to background (use `fg` in shell to resume)       |\n| Shift+Tab             | Cycle thinking level                                      |\n| Ctrl+P \u002F Shift+Ctrl+P | Cycle role models (slow\u002Fdefault\u002Fsmol), temporary on shift |\n| Alt+P                 | Select model temporarily                                  |\n| Ctrl+L                | Open model selector                                       |\n| Alt+Shift+P           | Toggle plan mode                                          |\n| Ctrl+R                | Search prompt history                                     |\n| Ctrl+O                | Toggle tool output expansion                              |\n| Ctrl+T                | Toggle todo list expansion                                |\n| Ctrl+G                | Edit message in external editor (`$VISUAL` or `$EDITOR`)  |\n| Alt+H                 | Toggle speech-to-text recording                           |\n\n### Bash Mode\n\nPrefix commands with `!` to execute them and include output in context:\n\n```bash\n!git status\n!ls -la\n```\n\nUse `!!` to execute but **exclude output from LLM context**:\n\n```bash\n!!git status\n```\n\nOutput streams in real-time. Press Escape to cancel.\n\n### Image Support\n\n**Attach images by reference:**\n\n```text\nWhat's in @\u002Fpath\u002Fto\u002Fimage.png?\n```\n\nOr paste\u002Fdrop images directly (`Ctrl+V` or drag-and-drop).\n\nSupported formats: `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`\n\nToggle inline images via `\u002Fsettings` or set `terminal.showImages: false`.\n\n---\n\n## Sessions\n\nSessions are stored as JSONL with a tree structure for branching and replay.\n\nSee [docs\u002Fsession.md](docs\u002Fsession.md) for the file format and API.\n\n### Session Management\n\nSessions auto-save to `~\u002F.omp\u002Fagent\u002Fsessions\u002F` (grouped by working directory).\n\n```bash\nomp --continue             # Continue most recent session\nomp -c\n\nomp --resume               # Open session picker\nomp -r\n\nomp --resume \u003Cid-prefix>   # Resume by session ID prefix\nomp --resume \u003Cpath>        # Resume by explicit .jsonl path\nomp --session \u003Cvalue>      # Alias of --resume\nomp --no-session    # Ephemeral mode (don't save)\n```\n\nSession IDs are Snowflake-style hex IDs (not UUIDs).\n\n### Context Compaction\n\nLong sessions can exhaust context windows. Compaction summarizes older messages while keeping recent context.\n\n**Manual:** `\u002Fcompact` or `\u002Fcompact Focus on the API changes`\n\n**Automatic:** Enable via `\u002Fsettings`.\n\n- **Overflow recovery**: model returns context overflow; compact and retry.\n- **Threshold maintenance**: context exceeds configured headroom after a successful turn.\n\n**Configuration** (`~\u002F.omp\u002Fagent\u002Fconfig.yml`):\n\n```yaml\ncompaction:\n  enabled: true\n  reserveTokens: 16384\n  keepRecentTokens: 20000\n  autoContinue: true\n```\n\nSee [docs\u002Fcompaction.md](docs\u002Fcompaction.md) for internals and hook integration.\n\n### Branching\n\n**In-place navigation (`\u002Ftree`):** Navigate the session tree without creating new files.\n\n- Search by typing, page with ←\u002F→\n- Filter modes (`Ctrl+O`): default → no-tools → user-only → labeled-only → all\n- Press `Shift+L` to label entries as bookmarks\n\n**Create new session (`\u002Fbranch` \u002F `\u002Ffork`):** Branch to a new session file from a selected previous message.\n\n### Autonomous Memory\n\nWhen enabled, the agent extracts durable knowledge from past sessions and injects it at startup. The pipeline runs in the background and never blocks the active session.\n\nMemory is isolated per project (working directory) and stored under `~\u002F.omp\u002Fagent\u002Fmemories\u002F`. At session start, a compact summary is injected into the system prompt. The agent can read deeper context via `memory:\u002F\u002Froot\u002FMEMORY.md` and `memory:\u002F\u002Froot\u002Fskills\u002F\u003Cname>\u002FSKILL.md`.\n\nManage via the `\u002Fmemory` slash command:\n\n- `\u002Fmemory view` — show current injection payload\n- `\u002Fmemory clear` — delete all memory data and artifacts\n- `\u002Fmemory enqueue` — force consolidation at next startup\n\n> See [Memory Documentation](docs\u002Fmemory.md).\n\n---\n\n## Configuration\n\n### Project Context Files\n\nomp discovers project context from supported config directories (for example `.omp`, `.claude`, `.codex`, `.gemini`).\n\nCommon files:\n\n- `AGENTS.md`\n- `CLAUDE.md`\n\nUse these for:\n\n- Project instructions and guardrails\n- Common commands and workflows\n- Architecture documentation\n- Coding\u002Ftesting conventions\n\n### Custom System Prompt\n\nReplace the default system prompt by creating `SYSTEM.md`:\n\n1. **Project-local:** `.omp\u002FSYSTEM.md` (takes precedence)\n2. **Global:** `~\u002F.omp\u002Fagent\u002FSYSTEM.md` (fallback)\n   `--system-prompt` overrides both files. Use `--append-system-prompt` to append additional instructions.\n\n### Custom Models and Providers\n\nAdd custom providers\u002Fmodels via `~\u002F.omp\u002Fagent\u002Fmodels.yml`.\n\n`models.json` is still supported for legacy configs, but `models.yml` is the modern format.\n\n> See [models.yml provider integration guide](docs\u002Fmodels.md) for schema and merge behavior.\n\n```yaml\nproviders:\n  ollama:\n    baseUrl: http:\u002F\u002Flocalhost:11434\u002Fv1\n    apiKey: OLLAMA_API_KEY\n    api: openai-completions\n    models:\n      - id: llama-3.1-8b\n        name: Llama 3.1 8B (Local)\n        reasoning: false\n        input: [text]\n        cost:\n          input: 0\n          output: 0\n          cacheRead: 0\n          cacheWrite: 0\n        contextWindow: 128000\n        maxTokens: 32000\n\n  llama.cpp:\n    baseUrl: http:\u002F\u002F127.0.0.1:8080\n    api: openai-responses\n    auth: none\n    discovery:\n      type: llama.cpp\n```\n\n**Supported APIs:** `openai-completions`, `openai-responses`, `openai-codex-responses`, `azure-openai-responses`, `anthropic-messages`, `google-generative-ai`, `google-vertex`\n\n### Settings File\n\nGlobal settings are stored in:\n\n- `~\u002F.omp\u002Fagent\u002Fconfig.yml`\n\nProject overrides are loaded from discovered project settings files (commonly `.omp\u002Fsettings.json`).\n\nGlobal `config.yml` example:\n\n```yaml\ntheme:\n  dark: titanium\n  light: light\n\nenabledModels:\n  - \"anthropic\u002F*\"\n  - \"*gpt*\"\n  - \"gemini-2.5-pro:high\"\n\nmodelRoles:\n  default: anthropic\u002Fclaude-sonnet-4-20250514\n  plan: anthropic\u002Fclaude-opus-4-1:high\n  smol: anthropic\u002Fclaude-sonnet-4-20250514\ndefaultThinkingLevel: high\n\nretry:\n  enabled: true\n  # Number of retries before giving up on rate limits\u002Fserver errors\n  maxRetries: 3\n  # Wait this long as a base (exponentially backed off) unless the API provides a retry-after-ms\n  baseDelayMs: 2000\n  # Configure role-specific model fallback chains\n  fallbackChains:\n    default:\n      - \"openai\u002Fgpt-4o-mini\"\n      - \"openai\u002Fgpt-4o\"\n    plan:\n      - \"anthropic\u002Fclaude-sonnet-4-6:high\"\n      - \"openai\u002Fo3:high\"\n  # Whether to revert to the primary model when a fallback's cooldown expires\n  fallbackRevertPolicy: cooldown-expiry\nsteeringMode: one-at-a-time\nfollowUpMode: one-at-a-time\ninterruptMode: immediate\n\nshellPath: C:\\\\path\\\\to\\\\bash.exe\nhideThinkingBlock: false\ncollapseChangelog: false\n\ndisabledProviders: []\ndisabledExtensions: []\n\ncompaction:\n  enabled: true\n  reserveTokens: 16384\n  keepRecentTokens: 20000\n\nskills:\n  enabled: true\n\n\nterminal:\n  showImages: true\n\ntopP: -1 # Nucleus sampling (0-1, -1 = provider default)\ntopK: -1 # Top-K tokens (-1 = provider default)\nminP: -1 # Minimum probability (0-1, -1 = provider default)\n\ndisplay:\n  tabWidth: 4 # Tab rendering width (.editorconfig integration)\n\nasync:\n  enabled: false\n  maxJobs: 100\n\ntask:\n  eager: false\n  isolation:\n    mode: none # none | worktree | fuse-overlay | fuse-projfs\n    merge: patch # patch | branch\n```\n\nLegacy migration notes:\n\n- `settings.json` → `config.yml`\n- `queueMode` → `steeringMode`\n- flat `theme: \"...\"` → `theme.dark` \u002F `theme.light`\n\n---\n\n## Extensions\n\n### Themes\n\nBuilt-in themes include `dark`, `light`, and many bundled variants.\n\n**Automatic dark\u002Flight switching**: omp detects terminal appearance via Mode 2031, native macOS CoreFoundation FFI, or `COLORFGBG` fallback, and switches between `theme.dark` and `theme.light` automatically.\n\nSelect theme via `\u002Fsettings` or set in `~\u002F.omp\u002Fagent\u002Fconfig.yml`:\n\n```yaml\ntheme:\n  dark: titanium\n  light: light\n```\n\n**Custom themes:** create `~\u002F.omp\u002Fagent\u002Fthemes\u002F*.json`.\n\n> See [Theme Documentation](docs\u002Ftheme.md).\n\n### Custom Slash Commands\n\nDefine reusable prompt commands as Markdown files:\n\n- Global: `~\u002F.omp\u002Fagent\u002Fcommands\u002F*.md`\n- Project: `.omp\u002Fcommands\u002F*.md`\n\n```markdown\n---\ndescription: Review staged git changes\n---\n\nReview the staged changes (`git diff --cached`). Focus on:\n\n- Bugs and logic errors\n- Security issues\n- Error handling gaps\n```\n\nFilename (without `.md`) becomes the command name.\n\nArgument placeholders:\n\n- `$1`, `$2`, ... positional arguments\n- `$@` and `$ARGUMENTS` for all arguments joined\n\nTypeScript custom commands are also supported:\n\n- `~\u002F.omp\u002Fagent\u002Fcommands\u002F\u003Cname>\u002Findex.ts`\n- `.omp\u002Fcommands\u002F\u003Cname>\u002Findex.ts`\n\nBundled TypeScript command: `\u002Freview`.\n\n### Skills\n\nSkills are capability packages loaded on-demand.\n\nCommon locations:\n\n- `~\u002F.omp\u002Fagent\u002Fskills\u002F*\u002FSKILL.md`\n- `.omp\u002Fskills\u002F*\u002FSKILL.md`\n- `~\u002F.claude\u002Fskills\u002F*\u002FSKILL.md`, `.claude\u002Fskills\u002F*\u002FSKILL.md`\n- `~\u002F.codex\u002Fskills\u002F*\u002FSKILL.md`, `.codex\u002Fskills\u002F*\u002FSKILL.md`\n\n```markdown\n---\nname: brave-search\ndescription: Web search via Brave Search API.\n---\n\n# Brave Search\n```\n\n`description` drives matching; `name` defaults to the folder name when omitted.\n\nDisable skills with `omp --no-skills` or `skills.enabled: false`.\n\n> See [Skills Documentation](docs\u002Fskills.md).\n\n### Hooks\n\nHooks are TypeScript modules that subscribe to lifecycle events.\n\nHook locations:\n\n- Global: `~\u002F.omp\u002Fagent\u002Fhooks\u002Fpre\u002F*.ts`, `~\u002F.omp\u002Fagent\u002Fhooks\u002Fpost\u002F*.ts`\n- Project: `.omp\u002Fhooks\u002Fpre\u002F*.ts`, `.omp\u002Fhooks\u002Fpost\u002F*.ts`\n- CLI: `--hook \u003Cpath>`\n\n```typescript\nimport type { HookAPI } from \"@oh-my-pi\u002Fpi-coding-agent\u002Fhooks\";\n\nexport default function (omp: HookAPI) {\n\tomp.on(\"tool_call\", async (event, ctx) => {\n\t\tif (event.toolName === \"bash\" && \u002Fsudo\u002F.test(event.input.command as string)) {\n\t\t\tconst ok = await ctx.ui.confirm(\"Allow sudo?\", event.input.command as string);\n\t\t\tif (!ok) return { block: true, reason: \"Blocked by user\" };\n\t\t}\n\t\treturn undefined;\n\t});\n}\n```\n\nInject messages from hooks with:\n\n```ts\nomp.sendMessage(message, { triggerTurn: true });\n```\n\n> See [Hooks Documentation](docs\u002Fhooks.md) and [examples\u002Fhooks\u002F](packages\u002Fcoding-agent\u002Fexamples\u002Fhooks\u002F).\n\n### Custom Tools\n\nCustom tools extend the built-in toolset and are callable by the model.\n\nAuto-discovered locations:\n\n- Global: `~\u002F.omp\u002Fagent\u002Ftools\u002F*\u002Findex.ts`\n- Project: `.omp\u002Ftools\u002F*\u002Findex.ts`\n\n```typescript\nimport { Type } from \"@sinclair\u002Ftypebox\";\nimport type { CustomToolFactory } from \"@oh-my-pi\u002Fpi-coding-agent\";\nconst factory: CustomToolFactory = () => ({\n\tname: \"greet\",\n\tlabel: \"Greeting\",\n\tdescription: \"Generate a greeting\",\n\tparameters: Type.Object({\n\t\tname: Type.String({ description: \"Name to greet\" }),\n\t}),\n\tasync execute(_toolCallId, params) {\n\t\tconst { name } = params as { name: string };\n\t\treturn { content: [{ type: \"text\", text: `Hello, ${name}!` }] };\n\t},\n});\nexport default factory;\n```\n\n> See [Custom Tools Documentation](docs\u002Fcustom-tools.md) and [examples\u002Fcustom-tools\u002F](packages\u002Fcoding-agent\u002Fexamples\u002Fcustom-tools\u002F).\n\n---\n\n## CLI Reference\n\n```bash\nomp [options] [@files...] [messages...]\nomp \u003Ccommand> [args] [flags]\n```\n\n### Options\n\n| Option                                | Description                                                        |\n| ------------------------------------- | ------------------------------------------------------------------ |\n| `--provider \u003Cname>`                   | Provider hint (legacy; prefer `--model`)                           |\n| `--model \u003Cid>`                        | Model ID (supports fuzzy match)                                    |\n| `--smol \u003Cid>`                         | Override the `smol` role model for this run                        |\n| `--slow \u003Cid>`                         | Override the `slow` role model for this run                        |\n| `--plan \u003Cid>`                         | Override the `plan` role model for this run                        |\n| `--models \u003Cpatterns>`                 | Comma-separated model patterns for role cycling                    |\n| `--list-models [pattern]`             | List available models (optional fuzzy filter)                      |\n| `--thinking \u003Clevel>`                  | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |\n| `--api-key \u003Ckey>`                     | API key (overrides environment\u002Fprovider lookup)                    |\n| `--system-prompt \u003Ctext\\|file>`        | Replace system prompt                                              |\n| `--append-system-prompt \u003Ctext\\|file>` | Append to system prompt                                            |\n| `--mode \u003Cmode>`                       | Output mode: `text`, `json`, `rpc`                                 |\n| `--print`, `-p`                       | Non-interactive: process prompt and exit                           |\n| `--continue`, `-c`                    | Continue most recent session                                       |\n| `--resume`, `-r [id\\|path]`           | Resume by ID prefix\u002Fpath (or open picker if omitted)               |\n| `--session \u003Cvalue>`                   | Alias of `--resume`                                                |\n| `--session-dir \u003Cdir>`                 | Directory for session storage and lookup                           |\n| `--no-session`                        | Don't save session                                                 |\n| `--tools \u003Ctools>`                     | Restrict to comma-separated built-in tool names                    |\n| `--no-tools`                          | Disable all built-in tools                                         |\n| `--no-lsp`                            | Disable LSP integration                                            |\n| `--no-pty`                            | Disable PTY-based interactive bash execution                       |\n| `--extension \u003Cpath>`, `-e`            | Load extension file (repeatable)                                   |\n| `--hook \u003Cpath>`                       | Load hook\u002Fextension file (repeatable)                              |\n| `--no-extensions`                     | Disable extension discovery (`-e` paths still load)                |\n| `--no-skills`                         | Disable skills discovery and loading                               |\n| `--skills \u003Cpatterns>`                 | Comma-separated glob patterns to filter skills                     |\n| `--no-rules`                          | Disable rules discovery and loading                                |\n| `--allow-home`                        | Allow starting from home dir without auto-chdir                    |\n| `--no-title`                          | Disable automatic session title generation                         |\n| `--export \u003Cfile> [output]`            | Export session to HTML                                             |\n| `--help`, `-h`                        | Show help                                                          |\n| `--version`, `-v`                     | Show version                                                       |\n\n### Subcommands\n\n`omp` also ships dedicated subcommands:\n\n- `commit`\n- `config`\n- `grep`\n- `jupyter`\n- `plugin`\n- `search` (alias: `q`)\n- `setup`\n- `shell`\n- `ssh`\n- `stats`\n- `update`\n\n### File Arguments\n\nInclude files with `@` prefix:\n\n```bash\nomp @prompt.md \"Answer this\"\nomp @screenshot.png \"What's in this image?\"\nomp @requirements.md @design.png \"Implement this\"\n```\n\nText files are wrapped in `\u003Cfile ...>` blocks. Images are attached.\n\n### Examples\n\n```bash\n# Interactive mode\nomp\n# Non-interactive\nomp -p \"List all .ts files in src\u002F\"\nomp -c \"What did we discuss?\"\n# Resume by ID prefix\nomp -r abc123\n\n# Model cycling with patterns\nomp --models \"sonnet:high,haiku:low\"\n\n# Restrict toolset for read-only review\nomp --tools read,grep,find -p \"Review the architecture\"\n# Export session\nomp --export session.jsonl output.html\n```\n\n### Environment Variables\n\n| Variable                                          | Description                                             |\n| ------------------------------------------------- | ------------------------------------------------------- |\n| `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc.       | Provider credentials                                    |\n| `PI_CODING_AGENT_DIR`                             | Override agent data directory (default: `~\u002F.omp\u002Fagent`) |\n| `PI_PACKAGE_DIR`                                  | Override package directory resolution                   |\n| `PI_SMOL_MODEL`, `PI_SLOW_MODEL`, `PI_PLAN_MODEL` | Role-model overrides                                    |\n| `PI_NO_PTY`                                       | Disable PTY-based bash execution                        |\n| `VISUAL`, `EDITOR`                                | External editor for Ctrl+G                              |\n\nSee [Environment Variables](docs\u002Fenvironment-variables.md) for the complete reference.\n\n---\n\n## Tools\n\nUse `--tools \u003Clist>` to restrict available built-in tools.\n\n### Built-in Tool Names (`--tools`)\n\n| Tool             | Description                                                    |\n| ---------------- | -------------------------------------------------------------- |\n| `ask`            | Ask the user structured follow-up questions (interactive mode) |\n| `bash`           | Execute shell commands                                         |\n| `python`         | Execute Python code in IPython kernel                          |\n| `calc`           | Deterministic calculator\u002Fevaluator                             |\n| `ssh`            | Execute commands on configured SSH hosts                       |\n| `edit`           | In-place file editing with LINE#ID anchors                     |\n| `find`           | Find files by glob pattern                                     |\n| `grep`           | Search file content                                            |\n| `ast_grep`       | Structural code search using AST matching (ast-grep)           |\n| `ast_edit`       | Structural AST-aware code rewrites (ast-grep)                  |\n| `lsp`            | Language server actions (11 operations)                        |\n| `notebook`       | Edit Jupyter notebooks                                         |\n| `read`           | Read files\u002Fdirectories (default text cap: 3000 lines)          |\n| `browser`        | Browser automation tool (model-facing name: `puppeteer`)       |\n| `task`           | Launch subagents for parallel execution                        |\n| `await`          | Block on async background jobs                                 |\n| `todo_write`     | Phased task tracking with progress management                  |\n| `fetch`          | Fetch and extract URL content                                  |\n| `web_search`     | Multi-provider web search                                      |\n| `write`          | Create\u002Foverwrite files                                         |\n| `generate_image` | Generate or edit images using Gemini image models              |\n\nNotes:\n\n- Some tools are setting-gated (`calc`, `browser`, etc.)\n- `ask` requires interactive UI\n- `ssh` requires configured SSH hosts\n\nExample:\n\n`omp --tools read,grep,find -p \"Review this codebase\"`\n\nFor adding new tools, see [Custom Tools](#custom-tools).\n\n---\n\n## Programmatic Usage\n\n### SDK\n\nFor embedding omp in Node.js\u002FTypeScript applications, use the SDK:\n\n```typescript\nimport { ModelRegistry, SessionManager, createAgentSession, discoverAuthStorage } from \"@oh-my-pi\u002Fpi-coding-agent\";\nconst authStorage = await discoverAuthStorage();\nconst modelRegistry = new ModelRegistry(authStorage);\nawait modelRegistry.refresh();\nconst { session } = await createAgentSession({\n\tsessionManager: SessionManager.inMemory(),\n\tauthStorage,\n\tmodelRegistry,\n});\nsession.subscribe((event) => {\n\tif (event.type === \"message_update\" && event.assistantMessageEvent.type === \"text_delta\") {\n\t\tprocess.stdout.write(event.assistantMessageEvent.delta);\n\t}\n});\nawait session.prompt(\"What files are in the current directory?\");\n```\n\nThe SDK provides control over:\n\n- Model selection and thinking level\n- System prompt (replace or append)\n- Built-in\u002Fcustom tools\n- Hooks, skills, context files, slash commands\n- Session persistence (`SessionManager`)\n- Settings (`Settings`)\n- API key and OAuth resolution\n\n> See [SDK Documentation](docs\u002Fsdk.md) and [examples\u002Fsdk\u002F](packages\u002Fcoding-agent\u002Fexamples\u002Fsdk\u002F).\n\n### RPC Mode\n\nFor embedding from other languages or process isolation:\n\n```bash\nomp --mode rpc --no-session\n```\n\nSend JSON commands on stdin:\n\n```json\n{\"id\":\"req-1\",\"type\":\"prompt\",\"message\":\"List all .ts files\"}\n{\"id\":\"req-2\",\"type\":\"abort\"}\n```\n\nResponses are emitted as `type: \"response\"`; session events stream on stdout as they occur.\n\n> See [RPC Documentation](docs\u002Frpc.md) for the full protocol.\n\n### HTML Export\n\n```bash\nomp --export session.jsonl              # Auto-generated filename\nomp --export session.jsonl output.html  # Custom filename\n```\n\nWorks with session files and JSON event logs from `--mode json`.\n\n---\n\n## Philosophy\n\nomp is a fork of [pi-mono](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono) by [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fmariozechner), extended with a batteries-included coding workflow.\n\nKey ideas:\n\n- Keep interactive terminal-first UX for real coding work\n- Include practical built-ins (tools, sessions, branching, subagents, extensibility)\n- Make advanced behavior configurable rather than hidden\n\n---\n\n## Development\n\n### Debug Command\n\n`\u002Fdebug` opens tools for debugging, reporting, and profiling.\n\nFor architecture and contribution guidelines, see [packages\u002Fcoding-agent\u002FDEVELOPMENT.md](packages\u002Fcoding-agent\u002FDEVELOPMENT.md).\n\n---\n\n## Monorepo Packages\n\n| Package                                                   | Description                                                                |\n| --------------------------------------------------------- | -------------------------------------------------------------------------- |\n| **[@oh-my-pi\u002Fpi-ai](packages\u002Fai)**                        | Multi-provider LLM client with streaming and model\u002Fprovider integration    |\n| **[@oh-my-pi\u002Fpi-agent-core](packages\u002Fagent)**             | Agent runtime with tool calling and state management                       |\n| **[@oh-my-pi\u002Fpi-coding-agent](packages\u002Fcoding-agent)**    | Interactive coding agent CLI and SDK                                       |\n| **[@oh-my-pi\u002Fpi-tui](packages\u002Ftui)**                      | Terminal UI library with differential rendering                            |\n| **[@oh-my-pi\u002Fpi-natives](packages\u002Fnatives)**              | N-API bindings for grep, shell, image, text, syntax highlighting, and more |\n| **[@oh-my-pi\u002Fomp-stats](packages\u002Fstats)**                 | Local observability dashboard for AI usage statistics                      |\n| **[@oh-my-pi\u002Fpi-utils](packages\u002Futils)**                  | Shared utilities (logging, streams, dirs\u002Fenv\u002Fprocess helpers)              |\n| **[@oh-my-pi\u002Fswarm-extension](packages\u002Fswarm-extension)** | Swarm orchestration extension package                                      |\n\n### Rust Crates\n\n| Crate                                                         | Description                                                                                  |\n| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| **[pi-natives](crates\u002Fpi-natives)**                           | Core Rust native addon used by `@oh-my-pi\u002Fpi-natives`                                        |\n| **[brush-core-vendored](crates\u002Fbrush-core-vendored)**         | Vendored fork of [brush-shell](https:\u002F\u002Fgithub.com\u002Freubeno\u002Fbrush) for embedded bash execution |\n| **[brush-builtins-vendored](crates\u002Fbrush-builtins-vendored)** | Vendored bash builtins (cd, echo, test, printf, read, export, etc.)                          |\n\n---\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\nCopyright (c) 2025 Mario Zechner  \nCopyright (c) 2025-2026 Can Bölük\n","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_9dbbf45dee4f.png\" alt=\"Pi 单仓库\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>终端中的 AI 编码代理\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@oh-my-pi\u002Fpi-coding-agent\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002F@oh-my-pi\u002Fpi-coding-agent?style=flat&colorA=222222&colorB=CB3837\" alt=\"npm 版本\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002Fpackages\u002Fcoding-agent\u002FCHANGELOG.md\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fchangelog-keep-E05735?style=flat&colorA=222222\" alt=\"变更日志\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Factions\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Factions\u002Fworkflow\u002Fstatus\u002Fcan1357\u002Foh-my-pi\u002Fci.yml?style=flat&colorA=222222&colorB=3FB950\" alt=\"持续集成\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fcan1357\u002Foh-my-pi?style=flat&colorA=222222&colorB=58A6FF\" alt=\"许可证\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.typescriptlang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTypeScript-3178C6?style=flat&colorA=222222&logo=typescript&logoColor=white\" alt=\"TypeScript\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fwww.rust-lang.org\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRust-DEA584?style=flat&colorA=222222&logo=rust&logoColor=white\" alt=\"Rust\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fbun.sh\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fruntime-Bun-f472b6?style=flat&colorA=222222\" alt=\"Bun\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002F4NMW9cdXZa\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-5865F2?style=flat&colorA=222222&logo=discord&logoColor=white\" alt=\"Discord\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  分支自 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono\">badlogic\u002Fpi-mono\u003C\u002Fa>, 由 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmariozechner\">@mariozechner\u003C\u002Fa> 创建\n\u003C\u002Fp>\n\n## 目录\n\n- [亮点](#highlights)\n- [安装](#installation)\n- [快速入门](#getting-started)\n  - [终端设置](#terminal-setup)\n  - [API 密钥与 OAuth](#api-keys--oauth)\n  - [推荐的前 15 分钟](#first-15-minutes-recommended)\n- [使用方法](#usage)\n  - [斜杠命令](#slash-commands)\n  - [编辑器功能](#editor-features)\n  - [快捷键](#keyboard-shortcuts)\n  - [Bash 模式](#bash-mode)\n  - [图像支持](#image-support)\n- [会话](#sessions)\n  - [会话管理](#session-management)\n  - [上下文压缩](#context-compaction)\n  - [分支](#branching)\n  - [自主记忆](#autonomous-memory)\n- [配置](#configuration)\n  - [项目上下文文件](#project-context-files)\n  - [自定义系统提示](#custom-system-prompt)\n  - [自定义模型和提供商](#custom-models-and-providers)\n  - [设置文件](#settings-file)\n- [扩展](#extensions)\n  - [主题](#themes)\n  - [自定义斜杠命令](#custom-slash-commands)\n  - [技能](#skills)\n  - [钩子](#hooks)\n  - [自定义工具](#custom-tools)\n- [CLI 参考](#cli-reference)\n- [工具](#tools)\n- [程序化使用](#programmatic-usage)\n  - [SDK](#sdk)\n  - [RPC 模式](#rpc-mode)\n  - [HTML 导出](#html-export)\n- [理念](#philosophy)\n- [开发](#development)\n- [单仓库包](#monorepo-packages)\n- [许可证](#license)\n\n---\n\n## 亮点\n\n### + 提交工具（AI 驱动的 Git 提交）\n\n基于 AI 的规范提交生成，结合智能变更分析：\n\n- **代理模式**：通过 `git-overview`、`git-file-diff`、`git-hunk` 等工具进行基于工具的 Git 检查，实现细粒度分析\n- **拆分提交**：自动将不相关的更改分离为原子提交，并按依赖关系排序\n- **块级暂存**：当更改涉及多个关注点时，可单独暂存各个代码块\n- **变更日志生成**：为 `CHANGELOG.md` 文件提出并应用变更日志条目\n- **提交验证**：检测填充词、元短语，并强制执行规范提交格式\n- **传统模式**：提供 `--legacy` 标志，在偏好时使用确定性流程\n- 通过 `omp commit` 运行，支持选项：`--push`、`--dry-run`、`--no-changelog`、`--context`\n\n### + Python 工具（IPython 内核）\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_e055f846b70d.webp\" alt=\"python\">\n\u003C\u002Fp>\n\n使用持久化的 IPython 内核和丰富的辅助预置来执行 Python 代码：\n\n- **流式输出**：实时 stdout\u002Fstderr，支持图像和 JSON 渲染\n- **预置助手**：内核中内置了文件 I\u002FO、搜索、查找\u002F替换、行操作、Shell 和文本实用工具\n- **行操作**：`lines()`、`insert_at()`、`delete_lines()`、`delete_matching()` 等助手可用于精确编辑\n- **共享网关**：通过 `python.sharedGateway` 设置，在不同会话中高效复用资源\n- **自定义模块**：可从 `.omp\u002Fmodules\u002F` 和 `~\u002F.omp\u002Fagent\u002Fmodules\u002F` 加载扩展\n- **丰富输出**：支持 `display()` 方法，用于 HTML、Markdown、图片以及交互式 JSON 树\n- **Markdown 渲染**：包含 Markdown 内容的 Python 单元格输出会内联渲染\n- **Mermaid 图表**：在 iTerm2\u002FKitty 终端中将 Mermaid 代码块渲染为内联图形\n- 使用 `omp setup python` 安装依赖项\n\n### + LSP 集成（语言服务器协议）\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_16f2f96c8ac4.webp\" alt=\"lsp\">\n\u003C\u002Fp>\n\n具备自动格式化和诊断功能的完整 IDE 式代码智能：\n\n- **11 种 LSP 操作**：`diagnostics`、`definition`、`type_definition`、`implementation`、`references`、`hover`、`symbols`、`rename`、`code_actions`、`status`、`reload`\n- **写入时格式化**：使用语言服务器的格式化工具（rustfmt、gofmt、prettier 等）自动格式化代码\n- **写入\u002F编辑时诊断**：每次文件更改后立即反馈语法错误和类型问题\n- **工作区诊断**：无需指定文件即可通过 `lsp` 操作 `diagnostics` 检查整个项目中的错误\n- **40 多种语言配置**：开箱即用支持 Rust、Go、Python、TypeScript、Java、Kotlin、Scala、Haskell、OCaml、Elixir、Ruby、PHP、C#、Lua、Nix 等多种语言\n- **本地二进制解析**：自动发现项目中的本地 LSP 服务器，如 `node_modules\u002F.bin\u002F`、`.venv\u002Fbin\u002F` 等\n- **符号消歧义**：通过 `occurrence` 参数解决同一行上重复出现的符号问题\n\n### + 时光旅行式流式规则 (TTSR)\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_3422a8aa4c1c.webp\" alt=\"ttsr\">\n\u003C\u002Fp>\n\n零上下文占用的规则，仅在需要时才会注入自身：\n\n- **模式触发注入**：规则定义正则表达式触发器，监控模型的输出流\n- **即时激活**：当模式匹配时，流会中断，规则作为系统提醒注入，并重新发起请求\n- **零前置成本**：TTSR 规则在真正相关之前不会消耗任何上下文\n- **每会话一次触发**：每个规则只触发一次，防止循环\n- 通过规则文件中的 `ttsrTrigger` 字段（正则模式）进行定义\n\n示例：一条“禁止使用已弃用 API”的规则，只有当模型开始编写已弃用代码时才会激活，从而为从未涉及该 API 的会话节省上下文。\n\n### + 交互式代码审查\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_6e9a073e3f80.webp\" alt=\"review\">\n\u003C\u002Fp>\n\n基于优先级的结构化代码审查：\n\n- **`\u002Freview` 命令**：交互式模式选择（分支对比、未提交更改、提交审查）\n- **结构化发现**：`report_finding` 工具，带有优先级等级（P0-P3：严重 → 细节）\n- **评审结果呈现**：将发现汇总为批准\u002F请求更改\u002F评论\n- 结合结果树显示评审结论和所有发现\n\n### + 任务工具（子代理系统）\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_709fd8e947b0.webp\" alt=\"task\">\n\u003C\u002Fp>\n\n具有专业代理和实时流式的并行执行框架：\n\n- **6 个内置代理**：探索、计划、设计、审查、任务、快速任务\n- **并行探索**：审查代理可为大型代码库分析启动探索代理\n- **实时工件流**：任务输出在生成时即开始流式传输，而非仅在完成时\n- **完整输出访问**：可通过 `agent:\u002F\u002F\u003Cid>` 资源读取完整的子代理输出，即使预览被截断\n- **隔离后端**：`isolated: true` 可在 Git 工作树、Unix FUSE 叠加文件系统或 Windows ProjFS（`fuse-projfs`）中运行任务，并支持补丁或分支合并策略\n- **异步后台作业**：可配置并发度的后台执行（最多 100 个作业），并使用 `await` 工具阻塞等待结果\n- **代理控制中心**：`\u002Fagents` 仪表板用于管理和创建自定义代理\n- **AI 驱动的代理创建**：利用架构师模型生成自定义代理定义\n- **针对单个代理的模型覆盖**：通过 swarm 扩展为各个代理分配特定模型\n- 用户级（`~\u002F.omp\u002Fagent\u002Fagents\u002F`）和项目级（`.omp\u002Fagents\u002F`）自定义代理\n\n### + 模型角色\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_068922da3e7b.webp\" alt=\"models\">\n\u003C\u002Fp>\n\n通过自动发现功能为不同用途配置不同模型：\n\n- **基于角色的路由**：`default`、`smol`、`slow`、`plan` 和 `commit` 角色\n- **可配置的自动发现**：角色默认值会自动解析，也可按角色覆盖\n- **基于角色的选择**：任务工具代理可使用 `model: pi\u002Fsmol` 进行经济高效的探索\n- CLI 参数（`--smol`、`--slow`、`--plan`）和环境变量（`PI_SMOL_MODEL`、`PI_SLOW_MODEL`、`PI_PLAN_MODEL`）\n- 通过 `\u002Fmodel` 选择器交互式配置角色，并将分配持久化到设置中\n\n### + 待办事项工具（任务跟踪）\n\n带有阶段性进度跟踪的结构化任务管理：\n\n- **分阶段任务列表**：将工作组织成命名阶段，包含有序任务\n- **5 种操作**：`replace`（设置）、`add_phase`、`add_task`、`update`（状态变更）、`remove_task`\n- **4 种任务状态**：`pending`、`in_progress`、`completed`、`abandoned`\n- **自动规范化**：确保任何时候都恰好有一项任务处于“进行中”状态\n- **持久化面板**：待办事项列表显示在编辑器上方，实时更新进度\n- **完成提醒**：当代理在未完成待办事项的情况下停止时会收到警告（`todo.reminders` 设置）\n- **切换可见性**：`Ctrl+T` 可展开\u002F收起待办事项面板\n\n### + 询问工具（交互式提问）\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_f917cdd84a22.webp\" alt=\"ask\">\n\u003C\u002Fp>\n\n带有类型化选项的结构化用户交互：\n\n- **多选题**：以描述形式呈现选项供用户选择\n- **支持多选**：当选项不互斥时允许选择多个答案\n- **多部分问题**：通过 `questions` 数组参数依次提出多个相关问题\n\n### + 自定义 TypeScript 斜杠命令\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_5cdfeede11d8.webp\" alt=\"slash\">\n\u003C\u002Fp>\n\n可编程命令，拥有完整的 API 访问权限：\n\n- 在 `~\u002F.omp\u002Fagent\u002Fcommands\u002F[name]\u002Findex.ts` 或 `.omp\u002Fcommands\u002F[name]\u002Findex.ts` 创建\n- 导出工厂函数，返回 `{ name, description, execute(args, ctx) }`\n- 完全访问 `HookCommandContext`，可用于 UI 对话框、会话控制、Shell 执行\n- 返回字符串作为 LLM 提示发送，或返回 void 以执行一次性操作\n- 同样可以从 Claude Code 目录加载（`~\u002F.claude\u002Fcommands\u002F`、`.claude\u002Fcommands\u002F`）\n\n### + 通用配置发现\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_d9ab9211d7bc.webp\" alt=\"discovery\">\n\u003C\u002Fp>\n\n统一的能力驱动型发现机制，可从 8 种 AI 编程工具中加载配置：\n\n- **多工具支持**：Claude Code、Cursor、Windsurf、Gemini、Codex、Cline、GitHub Copilot、VS Code\n- **发现一切**：MCP 服务器、规则、技能、钩子、工具、斜杠命令、提示词、上下文文件\n- **原生格式支持**：Cursor MDC 前言、Windsurf 规则、Cline `.clinerules`、Copilot `applyTo` 全局模式、Gemini `system.md`、Codex `AGENTS.md`\n- **来源归属**：查看每个配置项由哪个工具提供\n- **发现设置**：通过 `\u002Fextensions` 交互式仪表板启用或禁用各个提供商\n- **优先级排序**：跨 `.omp`、`.claude`、`.codex` 和 `.gemini` 目录进行多路径解析\n\n### + MCP 与插件系统\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_a0866820ff6c.webp\" alt=\"perplexity\">\n\u003C\u002Fp>\n\n完整模型上下文协议支持，并可集成外部工具：\n\n- 使用 Stdio 和 HTTP 传输连接到 MCP 服务器\n- **OAuth 支持**：在 MCP 服务器配置中明确指定 `clientId` 和 `callbackPort`，并通过斜杠命令手动处理 OAuth 回调\n- **浏览器服务器过滤**：自动过滤浏览器类型的 MCP 服务器，以避免与内置浏览器工具冲突\n- **自动 Exa 过滤**：提取 Exa API 密钥，并优先使用原生 Exa 集成\n- **配置模式 + 设置指南**：[`docs\u002Fmcp-config.md`](.\u002Fdocs\u002Fmcp-config.md) 和 [`packages\u002Fcoding-agent\u002Fsrc\u002Fconfig\u002Fmcp-schema.json`](.\u002Fpackages\u002Fcoding-agent\u002Fsrc\u002Fconfig\u002Fmcp-schema.json)\n- 插件 CLI（`omp plugin install\u002Fenable\u002Fconfigure\u002Fdoctor`）\n- 可热加载的插件，位于 `~\u002F.omp\u002Fplugins\u002F` 目录下，支持 npm\u002Fbun 集成\n- `disabledServers` 设置同时适用于项目级和用户级第三方服务器\n\n### + 网络搜索与抓取\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_readme_319fe98e082d.webp\" alt=\"arxiv\">\n\u003C\u002Fp>\n\n多提供商搜索及全页抓取，并配备专用处理器：\n\n- **多提供商搜索**：`auto`、`exa`、`brave`、`jina`、`kimi`、`zai`、`anthropic`、`perplexity`、`gemini`、`codex`、`synthetic`\n- **专用处理器**：针对代码托管平台、包注册表、科研资源、论坛和文档等特定站点进行内容提取\n- **包注册表**：npm、PyPI、crates.io、Hex、Hackage、NuGet、Maven、RubyGems、Packagist、pub.dev、Go packages\n- **安全数据库**：NVD、OSV、CISA KEV 漏洞数据\n- HTML 转 Markdown 并保留链接\n\n### + SSH 工具\n\n通过持久化连接执行远程命令：\n\n- **项目发现**：从项目中的 `ssh.json` 或 `.ssh.json` 文件读取 SSH 主机信息\n- **主机管理**：通过 `omp ssh` CLI 或 `\u002Fssh` 斜杠命令添加、删除和列出主机\n- **持久化连接**：跨命令复用 SSH 连接，以加快执行速度\n- **操作系统\u002FShell 检测**：自动检测远程操作系统和 Shell 类型\n- **SSHFS 挂载**：可选地自动挂载远程目录\n- **兼容模式**：支持 Windows 主机，并自动探测 Shell\n\n### + 浏览器工具（Puppeteer with Stealth）\n\n无头浏览器自动化，配备 14 种隐身脚本以规避机器人检测：\n\n- **自动化操作**：导航、点击、输入、填写、滚动、拖拽、截图、执行 JS 代码以及提取可读内容\n- **无障碍快照**：通过带有数字 ID 的无障碍树观察交互元素，实现可靠的目标定位\n- **14 种隐身插件**：自定义脚本覆盖 toString 操控、WebGL 指纹识别、音频上下文、屏幕尺寸、字体枚举、插件\u002FMIME 类型模拟、硬件并发数、编解码器可用性、iframe 检测、区域设置欺骗、Worker 检测等\n- **用户代理欺骗**：移除 `HeadlessChrome` 标识，生成正确的 Client Hints 品牌列表，并通过 CDP Network 和 Emulation 域进行覆盖\n- **选择器灵活性**：CSS、`aria\u002F`、`text\u002F`、`xpath\u002F`、`pierce\u002F` 查询处理器可用于穿透 Shadow DOM\n- **阅读模式**：`extract_readable` 动作使用 Mozilla Readability 清理并提取文章内容\n- **无头\u002F可见切换**：可通过 `\u002Fbrowser` 命令或 `browser.headless` 设置在运行时切换模式\n- **NixOS 支持**：自动检测 NixOS (`\u002Fetc\u002FNIXOS`)，并解析系统 Chromium（PATH 中的 `chromium`、`~\u002F.nix-profile\u002Fbin\u002Fchromium` 或 `\u002Frun\u002Fcurrent-system\u002Fsw\u002Fbin\u002Fchromium`），因为 Puppeteer 自带的二进制文件无法在非 FHS 系统上运行\n\n### + Cursor 提供者\n\n利用您的 Cursor Pro 订阅获取 AI 补全功能：\n\n- **基于浏览器的 OAuth**：通过 Cursor 的 OAuth 流程进行身份验证\n- **工具执行桥接**：将 Cursor 的原生工具映射到 omp 对应工具（读取、写入、Shell、诊断）\n- **会话缓存**：在同一会话中保持请求间的上下文一致性\n- **Shell 流式输出**：命令执行过程中实时显示 stdout\u002Fstderr\n\n### + 多凭证支持\n\n在多个 API 密钥之间分配负载：\n\n- **轮询分发**：每个会话自动循环使用不同凭证\n- **用量感知选择**：对于 OpenAI Codex，在选择凭证前会检查账户限额\n- **自动回退**：当达到速率限制时，会在会话中途切换凭证\n- **一致性哈希**：使用 FNV-1a 哈希算法确保每个会话的凭证分配稳定\n\n### + 图像生成\n\n直接从代理生成图像：\n\n- **Gemini 集成**：默认使用 `gemini-3-pro-image-preview`\n- **OpenRouter 回退**：当设置 `OPENROUTER_API_KEY` 时，自动使用 OpenRouter\n- **内联显示**：支持 Kitty\u002FiTerm2 图形的终端可以直接渲染图像\n- 保存为临时文件，并报告路径以便进一步操作\n\n### + TUI 全面升级\n\n现代化终端界面，具备智能会话管理：\n\n- **自动会话标题**：根据第一条消息自动为会话命名，使用提交模型；若无则使用 smol\n- **欢迎界面**：包含 logo、提示信息以及最近会话列表供选择\n- **Powerline 脚注**：显示模型、当前工作目录、Git 分支\u002F状态、令牌使用情况和上下文百分比\n- **LSP 状态**：显示哪些语言服务器已激活并就绪\n- **快捷键**：编辑器为空时按 `?` 键可显示快捷方式\n- **持久化提示历史**：基于 SQLite 存储，并可通过 `Ctrl+R` 在不同会话中搜索\n- **分组工具显示**：连续的 Read 调用以紧凑的树状视图呈现\n- **流式文本预览**：代理输出时实时更新增量内容\n- **叠加 UI**：自定义钩子可以将组件显示为底部居中的叠加层\n- **可配置制表符宽度**：通过 `display.tabWidth` 设置，并与 `.editorconfig` 集成\n- **回滚保留**：使用 home+erase-below 而不是 clear-screen\n- **紧急终端恢复**：崩溃处理程序可防止终端损坏\n\n### + Hashline 编辑\n\nHashline 为每一行赋予一个简短的内容哈希锚点。模型通过引用这些锚点来操作文本，而非重复复制文本——无需复制空格，不会出现“未找到字符串”的情况，也不会有歧义匹配。如果文件自上次读取以来发生更改，哈希值将不匹配，编辑操作会被拒绝，从而避免任何潜在的数据损坏。\n\n在 16 种模型、180 个任务上进行了三次基准测试：\n\n- **Grok Code Fast 1**：从 6.7% 提升至 68.3%，这一“十倍”提升隐藏在机械补丁失败的背后\n- **Gemini 3 Flash**：相比 `str_replace` 提升了 5 个百分点，超越了 Google 自己的最佳尝试\n- **Grok 4 Fast**：输出的 token 数减少了 61%，不再因重试循环而浪费上下文\n- **MiniMax**：成功率提高了一倍以上\n- 几乎在所有测试过的模型中，其表现都与 `str_replace` 相当或更好；其中表现最弱的模型受益最大\n\n### + 原生引擎（Rust N-API）\n\n约7,500行Rust代码被编译为带有平台标签的N-API插件，用于在不调用外部命令的情况下执行性能关键的操作：\n\n| 模块        | 行数 | 功能                                                                                                                                         | 依赖组件                                                        |\n| ------------- | -----: | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |\n| **grep**      | ~1,300 | 在文件和内存内容中进行正则表达式搜索，支持并行\u002F串行模式、glob\u002F类型过滤、上下文行显示以及用于自动补全的模糊查找            | `grep-regex`、`grep-searcher`、`grep-matcher`（ripgrep内部组件） |\n| **shell**     | ~1,025 | 内嵌bash执行，支持持久化会话、流式输出、超时\u002F中断、自定义内置命令                                                   | [brush-shell](https:\u002F\u002Fgithub.com\u002Freubeno\u002Fbrush)（已打包）        |\n| **text**      | ~1,280 | 支持ANSI的颜色编码以正确计算可见宽度、带省略号的截断、列分割、保留SGR代码的文本换行——所有功能均针对UTF-16优化 | `unicode-width`、`unicode-segmentation`                           |\n| **keys**      | ~1,300 | 解析Kitty键盘协议，并兼容旧版xterm\u002FVT100协议；支持修饰键及PHF完美哈希查找                                           | `phf`                                                             |\n| **highlight** |   ~475 | 语法高亮，提供11种语义颜色类别及30多种语言别名                                                                          | `syntect`                                                         |\n| **glob**      |   ~340 | 使用glob模式进行文件系统遍历，支持类型过滤、按修改时间排序以及对`.gitignore`规则的尊重                                                     | `ignore`、`globset`（ripgrep内部组件）                           |\n| **task**      |   ~350 | 基于libuv线程池的阻塞式任务调度器，支持协作式\u002F外部取消、超时及性能分析钩子                                                            | `tokio`、`napi`                                                   |\n| **ps**        |   ~290 | 跨平台进程树杀戮与子进程列表——Linux下使用`\u002Fproc`，macOS下使用`libproc`，Windows下使用`CreateToolhelp32Snapshot`                | `libc`                                                            |\n| **prof**      |   ~250 | 常驻循环缓冲区性能分析器，可折叠堆栈输出，并可选择生成SVG火焰图                                                                     | `inferno`                                                         |\n| **image**     |   ~150 | 解码\u002F编码PNG\u002FJPEG\u002FWebP\u002FGIF格式图像，并支持5种采样滤波器进行缩放                                                                      | `image`                                                           |\n| **clipboard** |    ~95 | 从系统剪贴板复制文本或读取图像——无需依赖`xclip`或`pbcopy`                                                                           | `arboard`                                                         |\n| **html**      |    ~50 | HTML转Markdown转换，可选内容清理                                                                                           | `html-to-markdown-rs`                                             |\n\n支持的平台：`linux-x64`、`linux-arm64`、`darwin-x64`、`darwin-arm64`、`win32-x64`。\n\n### …还有更多\n\n- **`omp config`子命令**：通过CLI管理配置（列出、获取、设置、重置、查看路径）\n- **`omp setup`子命令**：安装可选依赖项（例如，`omp setup python`用于Jupyter内核）\n- **`omp stats`子命令**：本地AI使用情况观测仪表盘（请求量、成本、缓存率、每秒令牌数）\n- **`xhigh`思考级别**：为Anthropic模型提供扩展推理能力，增加令牌预算\n- **后台模式**：`\u002Fbackground`可分离UI并继续代理执行\n- **完成通知**：代理完成任务时可触发自定义铃声、OSC99或OSC9提示\n- **65+内置主题**：Catppuccin、Dracula、Nord、Gruvbox、Tokyo Night、Poimandres以及Material变体\n- **自动深色\u002F浅色切换**：基于终端检测模式2031，通过CoreFoundation FFI实现原生macOS外观，并提供COLORFGBG回退方案\n- **自动环境检测**：在系统提示符中显示操作系统、发行版、内核、CPU、GPU、Shell、终端及桌面环境信息\n- **Git上下文**：系统提示符包含分支、状态及最近提交记录\n- **Bun运行时**：原生TypeScript执行，启动更快，所有包均已迁移\n- **集中式文件日志**：调试日志每日轮转至`~\u002F.omp\u002Flogs\u002F`\n- **Bash拦截器**：可选择性阻止已有专用工具处理的Shell命令\n- **每条命令的PTY控制**：Bash工具支持`pty: true`选项，适用于需要真实终端的命令（如sudo、ssh）\n- **@file自动读取**：在提示中输入`@path\u002Fto\u002Ffile`即可将文件内容直接插入\n- **AST工具**：`ast_grep`和`ast_edit`用于基于抽象语法树的代码搜索与代码改写\n- **采样控制**：`topP`、`topK`、`minP`、`presencePenalty`、`repetitionPenalty`等设置可用于精细化调整模型行为\n\n---\n\n## 安装\n\n### 通过Bun（推荐）\n\n需安装[Bun](https:\u002F\u002Fbun.sh) **≥ 1.3.7**：\n\n```bash\nbun install -g @oh-my-pi\u002Fpi-coding-agent\n```\n\n### 通过安装脚本\n\n**Linux \u002F macOS：**\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh\n```\n\n**Windows（PowerShell）：**\n\n```powershell\nirm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1 | iex\n```\n\n默认情况下，安装程序会在可用且兼容时使用Bun，否则会安装预编译的二进制文件。\n\n选项：\n\n- POSIX（`install.sh`）：`--source`、`--binary`、`--ref \u003Cref>`、`-r \u003Cref>`\n- PowerShell（`install.ps1`）：`-Source`、`-Binary`、`-Ref \u003Cref>`\n- 使用二进制模式时，`--ref`\u002F`-Ref`必须指向发布标签；若使用分支或提交引用，则需采用源码模式\n\n可通过设置`PI_INSTALL_DIR`来指定自定义安装目录。\n\n示例：\n\n```bash\n# 源码安装（Bun）\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --source\n\n# 通过二进制安装特定版本\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --binary --ref v3.20.1\n\n# 通过源码安装分支\u002F提交\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.sh | sh -s -- --source --ref main\n```\n\n```powershell\n# 通过二进制安装特定版本\n& ([scriptblock]::Create((irm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1))) -Binary -Ref v3.20.1\n\n# 通过源代码安装分支\u002F提交\n& ([scriptblock]::Create((irm https:\u002F\u002Fraw.githubusercontent.com\u002Fcan1357\u002Foh-my-pi\u002Fmain\u002Fscripts\u002Finstall.ps1))) -Source -Ref main\n```\n\n### 通过 [mise](https:\u002F\u002Fmise.jdx.dev)\n\n```bash\nmise use -g github:can1357\u002Foh-my-pi\n```\n\n### 手动下载\n\n直接从 [GitHub Releases](https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Freleases\u002Flatest) 下载二进制文件。\n\n---\n\n## 开始使用\n\n### 终端设置\n\nPi 使用 [Kitty 键盘协议](https:\u002F\u002Fsw.kovidgoyal.net\u002Fkitty\u002Fkeyboard-protocol\u002F) 来可靠地检测修饰键。大多数现代终端都支持该协议，但有些需要进行配置。\n\n**Kitty、iTerm2：** 无需额外配置即可正常工作。\n\n**Ghostty：** 在 Ghostty 配置文件（`~\u002F.config\u002Fghostty\u002Fconfig`）中添加以下内容：\n\n```\nkeybind = alt+backspace=text:\\x1b\\x7f\nkeybind = shift+enter=text:\\n\n```\n\n**wezterm：** 创建 `~\u002F.wezterm.lua` 文件：\n\n```lua\nlocal wezterm = require 'wezterm'\nlocal config = wezterm.config_builder()\nconfig.enable_kitty_keyboard = true\nreturn config\n```\n\n**Windows Terminal：** 不支持 Kitty 键盘协议。Shift+Enter 无法与 Enter 区分。请改用 Ctrl+Enter 进行多行输入。其他所有快捷键均可正常使用。\n\n### API 密钥与 OAuth\n\n**选项 1：环境变量**（常见示例）\n\n| 提供商                                        | 环境变量                         |\n|-------------------------------------------------| -------------------------------------------- |\n| Anthropic                                       | `ANTHROPIC_API_KEY`                          |\n| OpenAI                                          | `OPENAI_API_KEY`                             |\n| Google                                          | `GEMINI_API_KEY`                             |\n| Mistral                                         | `MISTRAL_API_KEY`                            |\n| Groq                                            | `GROQ_API_KEY`                               |\n| Cerebras                                        | `CEREBRAS_API_KEY`                           |\n| Hugging Face (`huggingface`)                    | `HUGGINGFACE_HUB_TOKEN` 或 `HF_TOKEN`        |\n| Synthetic                                       | `SYNTHETIC_API_KEY`                          |\n| NVIDIA (`nvidia`)                               | `NVIDIA_API_KEY`                             |\n| NanoGPT (`nanogpt`)                             | `NANO_GPT_API_KEY`                           |\n| Together (`together`)                           | `TOGETHER_API_KEY`                           |\n| Ollama (`ollama`)                               | `OLLAMA_API_KEY` _(可选)_                |\n| LiteLLM (`litellm`)                             | `LITELLM_API_KEY`                            |\n| LM Studio (`lm-studio`)                         | `LM_STUDIO_API_KEY` _(可选)_             |\n| llama.cpp (`llama.cpp`)                         | `LLAMA_CPP_API_KEY` _(可选)_             |\n| Xiaomi MiMo (`xiaomi`)                          | `XIAOMI_API_KEY`                             |\n| Moonshot (`moonshot`)                           | `MOONSHOT_API_KEY`                           |\n| Venice (`venice`)                               | `VENICE_API_KEY`                             |\n| Kilo Gateway (`kilo`)                           | `KILO_API_KEY`                               |\n| GitLab Duo (`gitlab-duo`)                       | _仅支持 OAuth_                                 |\n| Jina (`jina`, 网络搜索)                       | `JINA_API_KEY`                               |\n| Perplexity                                      | `PERPLEXITY_API_KEY` 或 `PERPLEXITY_COOKIES` |\n| xAI                                             | `XAI_API_KEY`                                |\n| OpenRouter                                      | `OPENROUTER_API_KEY`                         |\n| Z.AI                                            | `ZAI_API_KEY`                                |\n| Qwen Portal (`qwen-portal`)                     | `QWEN_OAUTH_TOKEN` 或 `QWEN_PORTAL_API_KEY`  |\n| vLLM (`vllm`)                                   | `VLLM_API_KEY`                               |\n| Cloudflare AI Gateway (`cloudflare-ai-gateway`) | `CLOUDFLARE_AI_GATEWAY_API_KEY`              |\n| Vercel AI Gateway (`vercel-ai-gateway`)         | `AI_GATEWAY_API_KEY`                         |\n| Qianfan (`qianfan`)                             | `QIANFAN_API_KEY`                            |\n\n完整列表请参阅 [环境变量](docs\u002Fenvironment-variables.md) 文档。\n\n**选项 2：`\u002Flogin`（交互式认证 \u002F API 密钥设置）**\n\n使用 `\u002Flogin` 功能可与以下支持的提供商进行交互：\n\n- Anthropic（Claude Pro\u002FMax）\n- ChatGPT Plus\u002FPro（Codex）\n- GitHub Copilot\n- Google Cloud Code Assist（Gemini CLI）\n- Antigravity（Gemini 3、Claude、GPT-OSS）\n- Cursor\n- Kimi Code\n- Perplexity\n- NVIDIA（`nvidia`）\n- NanoGPT（`nanogpt`）\n- Hugging Face Inference（`huggingface`）\n- OpenCode Zen\n- Kilo Gateway（`kilo`）\n- GitLab Duo（`gitlab-duo`）\n- Qianfan（`qianfan`）\n- Ollama（本地 \u002F 自托管，`ollama`）\n- LM Studio（本地 \u002F 自托管，`lm-studio`）\n- llama.cpp（本地 \u002F 自托管，`llama.cpp`）\n- vLLM（本地兼容 OpenAI 的模型，`vllm`）\n- Z.AI（GLM 编码计划）\n- Synthetic\n- Together（`together`）\n- LiteLLM（`litellm`）\n- Xiaomi MiMo（`xiaomi`）\n- Moonshot（Kimi API，`moonshot`）\n- Venice（`venice`）\n- MiniMax 编码计划（国际版 \u002F 中国版）\n- Qwen Portal（`qwen-portal`）\n- Cloudflare AI Gateway（`cloudflare-ai-gateway`）\n- Vercel AI Gateway（`vercel-ai-gateway`）\n\n对于 `ollama`，API 密钥是可选的。如果是在本地无认证的实例上使用，可以不设置；若连接到已认证的主机，则需设置 `OLLAMA_API_KEY`。  \n对于 `llama.cpp`，API 密钥也是可选的。在本地无认证的实例上可以不设置；若连接到已认证的主机，则需设置 `LLAMA_CPP_API_KEY`。  \n对于 `lm-studio`，API 密钥同样是可选的。在本地无认证的实例上可以不设置；若连接到已认证的主机，则需设置 `LM_STUDIO_API_KEY`。  \n对于 `vllm`，可在 `\u002Flogin` 中粘贴您的密钥（或设置 `VLLM_API_KEY`）。对于本地无认证的服务器，任何占位符值均可（例如 `vllm-local`）。  \n对于 `nanogpt`，运行 `\u002Flogin nanogpt` 将打开 `https:\u002F\u002Fnano-gpt.com\u002Fapi` 并提示您输入 `sk-...` 密钥（或设置 `NANO_GPT_API_KEY`）。登录过程会通过 NanoGPT 的模型端点验证密钥，而非固定的模型授权。  \n对于 `cloudflare-ai-gateway`，请将提供商标记的 URL 设置为：\n`https:\u002F\u002Fgateway.ai.cloudflare.com\u002Fv1\u002F\u003Caccount_id>\u002F\u003Cgateway_id>\u002Fanthropic`\n（例如，在 `~\u002F.omp\u002Fagent\u002Fmodels.yml` 中进行设置）。\n\n```bash\nomp\n\u002Flogin\n```\n\n**凭证行为说明：**\n\n- `\u002Flogin` 会追加当前提供商的凭证信息（不会清除已有记录）。\n- `\u002Flogout` 会清除所选提供商的已保存凭证。\n- 凭证信息存储在 `~\u002F.omp\u002Fagent\u002Fagent.db` 中。\n- 对于同一提供商，系统会优先选择已保存的 API 密钥凭证，而非 OAuth 凭证。\n\n### 前15分钟（推荐）\n\n这是新用户的实用入门流程。\n\n#### 1) 设置提供商\n\n- **API密钥**（最快）：导出 `ANTHROPIC_API_KEY`、`OPENAI_API_KEY`、`GEMINI_API_KEY` 等。\n- **OAuth 订阅**：运行 `\u002Flogin` 并使用您的提供商账户进行认证。\n\n#### 2) 通过 `\u002Fmodel` 配置模型角色\n\n在 TUI 中使用 `\u002Fmodel` 分配角色模型：\n\n- `default` → 普通的实现工作\n- `smol` → 快速\u002F廉价的探索和轻量级任务\n- `slow` → 用于复杂调试\u002F重构的深度推理\n- `plan` → 在计划模式激活时使用的模型（`\u002Fplan`）\n- `commit` → 用于提交\u002F变更日志工作流的模型\n\n此设置是交互式的，并会为您持久化保存。\n\n#### 3) 在进行重大更改前使用 `\u002Fplan`\n\n`\u002Fplan` 可切换计划模式。当您希望在编辑之前规划架构和执行顺序时，请使用它。\n\n典型流程：\n\n1. 运行 `\u002Fplan`\n2. 请求具体的实现计划\n3. 优化计划\n4. 批准并执行\n\n#### 4) 通过 `\u002Fextensions` 查看上下文\n\n如果上下文使用量意外偏高，可以检查已发现的外部提供商资源（规则\u002F提示\u002F上下文\u002F钩子\u002F扩展）。\n\n运行 `\u002Fextensions` 并：\n\n- 浏览提供商选项卡（`Tab` \u002F `Shift+Tab`）\n- 检查每个条目的来源（`via \u003Cprovider>` + 文件路径）\n- 禁用整个提供商或您不希望使用的特定条目（`Space`）\n\n---\n\n## 使用方法\n\n### 斜杠命令\n\n这些是**聊天中的斜杠命令**（而非 CLI 子命令）。\n| 命令 | 描述 |\n| ------- | ----------- |\n| `\u002Fsettings` | 打开设置菜单 |\n| `\u002Fplan` | 切换计划模式 |\n| `\u002Fmodel` (`\u002Fmodels`) | 打开模型选择器 |\n| `\u002Fexport [path]` | 将会话导出为 HTML |\n| `\u002Fdump` | 将会话记录复制到剪贴板 |\n| `\u002Fshare` | 将会话上传为私密 gist |\n| `\u002Fsession` | 显示会话信息及使用情况 |\n| `\u002Fusage` | 显示提供商使用情况及限额 |\n| `\u002Fhotkeys` | 显示键盘快捷键 |\n| `\u002Fextensions` (`\u002Fstatus`) | 打开扩展控制中心 |\n| `\u002Fchangelog` | 显示变更日志条目 |\n| `\u002Ftree` | 导航会话树 |\n| `\u002Fbranch` | 打开分支选择器（根据设置为树形或消息选择器）|\n| `\u002Ffork` | 从先前的消息分叉 |\n| `\u002Fresume` | 打开会话选择器 |\n| `\u002Fnew` | 开始新的会话 |\n| `\u002Fcompact [focus]` | 手动压缩上下文 |\n| `\u002Fhandoff [focus]` | 将上下文移交至新会话 |\n| `\u002Fbrowser [headless\\|visible]` | 切换浏览器模式 |\n| `\u002Fmcp ...` | 管理 MCP 服务器 |\n| `\u002Fmemory ...` | 检查\u002F清除\u002F重建内存状态 |\n| `\u002Fmove \u003Cpath>` | 将当前会话移动到不同的工作目录 |\n| `\u002Fbackground` (`\u002Fbg`) | 分离 UI 并在后台继续 |\n| `\u002Fdebug` | 打开调试工具 |\n| `\u002Fcopy` | 复制最后一条代理消息 |\n| `\u002Flogin` \u002F `\u002Flogout` | OAuth 登录\u002F登出 |\n| `\u002Fexit` (`\u002Fquit`) | 退出交互模式 |\n\n内置的自定义斜杠命令包括 `\u002Freview`（交互式代码审查启动器）。\n\n### 编辑器功能\n\n**文件引用（`@`）：** 输入 `@` 可模糊搜索项目文件。尊重 `.gitignore`。\n\n**路径补全（Tab）：** 补全相对路径、`..\u002F`、`~\u002F` 等。\n\n**拖放：** 可将文件从文件管理器拖放到终端中。\n\n**多行粘贴：** 粘贴的内容会在预览中折叠，但实际发送时会完整显示。\n\n**消息队列：** 当代理正在工作时仍可提交消息；队列行为可在 `\u002Fsettings` 中配置。\n\n### 键盘快捷键\n\n**导航：**\n\n| 键                      | 动作                                       |\n| ------------------------ | -------------------------------------------- |\n| 方向键               | 移动光标 \u002F 浏览历史记录（空时向上）        |\n| Option+左\u002F右        | 按单词移动                                 |\n| Ctrl+A \u002F Home \u002F Cmd+Left | 行首                                       |\n| Ctrl+E \u002F End \u002F Cmd+Right | 行尾                                       |\n\n**编辑：**\n\n| 键                       | 动作                  |\n| ------------------------- | ----------------------- |\n| Enter                     | 发送消息            |\n| Shift+Enter \u002F Alt+Enter   | 新行                |\n| Ctrl+W \u002F Option+Backspace | 向后删除一个单词   |\n| Ctrl+U                    | 删除到行首          |\n| Ctrl+K                    | 删除到行尾          |\n\n**其他：**\n\n| 键                   | 动作                                                    |\n| --------------------- | --------------------------------------------------------- |\n| Tab                   | 路径补全 \u002F 接受自动补全                     |\n| Escape                | 取消自动补全 \u002F 中断流式输出                     |\n| Ctrl+C                | 清除编辑器内容（第一次） \u002F 退出（第二次）      |\n| Ctrl+D                | 退出（当编辑器为空时）                       |\n| Ctrl+Z                | 暂停至后台（使用 shell 中的 `fg` 恢复）       |\n| Shift+Tab             | 循环切换思考层级                              |\n| Ctrl+P \u002F Shift+Ctrl+P | 循环切换角色模型（slow\u002Fdefault\u002Fsmol），临时轮换 |\n| Alt+P                 | 临时选择模型                                  |\n| Ctrl+L                | 打开模型选择器                                |\n| Alt+Shift+P           | 切换计划模式                                  |\n| Ctrl+R                | 搜索提示历史                                  |\n| Ctrl+O                | 切换工具输出展开                            |\n| Ctrl+T                | 切换待办事项列表展开                        |\n| Ctrl+G                | 在外部编辑器中编辑消息（`$VISUAL` 或 `$EDITOR`）  |\n| Alt+H                 | 切换语音转文字录音                            |\n\n### Bash 模式\n\n在命令前加上 `!` 可以执行该命令，并将输出纳入上下文中：\n\n```bash\n!git status\n!ls -la\n```\n\n使用 `!!` 可以执行命令，但**不将输出纳入 LLM 上下文**：\n\n```bash\n!!git status\n```\n\n输出会实时显示。按 Escape 可取消。\n\n### 图像支持\n\n**通过引用附加图像：**\n\n```text\n@\u002Fpath\u002Fto\u002Fimage.png 里有什么？\n```\n\n或者直接粘贴\u002F拖放图像（`Ctrl+V` 或拖放）。\n\n支持的格式：`.jpg`、`.jpeg`、`.png`、`.gif`、`.webp`\n\n可通过 `\u002Fsettings` 切换内联图像，或设置 `terminal.showImages: false`。\n\n---\n\n## 会话\n\n会话以 JSONL 格式存储，并具有树状结构，便于分支和回放。\n\n文件格式和 API 请参阅 [docs\u002Fsession.md](docs\u002Fsession.md)。\n\n### 会话管理\n\n会话会自动保存到 `~\u002F.omp\u002Fagent\u002Fsessions\u002F`（按工作目录分组）。\n\n```bash\nomp --continue             # 继续最近的会话\nomp -c\n\nomp --resume               # 打开会话选择器\nomp -r\n\nomp --resume \u003Cid-prefix>   # 按会话 ID 前缀恢复\nomp --resume \u003Cpath>        # 按明确的 .jsonl 路径恢复\nomp --session \u003Cvalue>      # --resume 的别名\nomp --no-session    # 临时模式（不保存）\n```\n\n会话 ID 是 Snowflake 风格的十六进制 ID（不是 UUID）。\n\n### 上下文压缩\n\n长时间的会话可能会耗尽上下文窗口。压缩功能会总结较旧的消息，同时保留最近的上下文。\n\n**手动操作：** `\u002Fcompact` 或 `\u002Fcompact 关注 API 变更`\n\n**自动操作：** 通过 `\u002Fsettings` 启用。\n\n- **溢出恢复：** 当模型返回上下文溢出时，进行压缩并重试。\n- **阈值维护：** 在一次成功的对话回合后，上下文会超过配置的预留空间。\n\n**配置** (`~\u002F.omp\u002Fagent\u002Fconfig.yml`)：\n\n```yaml\ncompaction:\n  enabled: true\n  reserveTokens: 16384\n  keepRecentTokens: 20000\n  autoContinue: true\n```\n\n有关内部机制和钩子集成，请参阅 [docs\u002Fcompaction.md](docs\u002Fcompaction.md)。\n\n### 分支\n\n**就地导航 (`\u002Ftree`)：** 在不创建新文件的情况下浏览会话树。\n\n- 通过输入搜索，使用 ←\u002F→ 键翻页\n- 过滤模式（`Ctrl+O`）：默认 → 无工具 → 仅用户 → 仅标记 → 全部\n- 按 `Shift+L` 可将条目标记为书签\n\n**创建新会话 (`\u002Fbranch` \u002F `\u002Ffork`)：** 从选定的前一条消息分支到一个新的会话文件。\n\n### 自主记忆\n\n启用后，代理会从过去的会话中提取持久知识，并在启动时注入这些知识。该流程在后台运行，不会阻塞当前会话。\n\n记忆按项目（工作目录）隔离，存储在 `~\u002F.omp\u002Fagent\u002Fmemories\u002F` 下。在会话开始时，系统提示中会注入一份精简摘要。代理可以通过 `memory:\u002F\u002Froot\u002FMEMORY.md` 和 `memory:\u002F\u002Froot\u002Fskills\u002F\u003Cname>\u002FSKILL.md` 读取更深入的上下文。\n\n可通过 `\u002Fmemory` 斜杠命令管理：\n\n- `\u002Fmemory view` — 显示当前注入的内容\n- `\u002Fmemory clear` — 删除所有记忆数据和产物\n- `\u002Fmemory enqueue` — 强制在下次启动时进行整合\n\n> 请参阅 [记忆文档](docs\u002Fmemory.md)。\n\n---\n\n## 配置\n\n### 项目上下文文件\n\nomp 会从支持的配置目录中发现项目上下文（例如 `.omp`, `.claude`, `.codex`, `.gemini`）。\n\n常见文件：\n\n- `AGENTS.md`\n- `CLAUDE.md`\n\n用于以下用途：\n\n- 项目说明和约束条件\n- 常用命令和工作流程\n- 架构文档\n- 编码\u002F测试规范\n\n### 自定义系统提示\n\n通过创建 `SYSTEM.md` 替换默认系统提示：\n\n1. **项目本地：** `.omp\u002FSYSTEM.md`（优先级更高）\n2. **全局：** `~\u002F.omp\u002Fagent\u002FSYSTEM.md`（备用）\n   使用 `--system-prompt` 可覆盖上述两个文件。若需追加额外说明，可使用 `--append-system-prompt`。\n\n### 自定义模型和提供商\n\n通过 `~\u002F.omp\u002Fagent\u002Fmodels.yml` 添加自定义提供商\u002F模型。\n\n`models.json` 仍可用于旧版配置，但 `models.yml` 是现代格式。\n\n> 有关模式和合并行为，请参阅 [models.yml 提供商集成指南](docs\u002Fmodels.md)。\n\n```yaml\nproviders:\n  ollama:\n    baseUrl: http:\u002F\u002Flocalhost:11434\u002Fv1\n    apiKey: OLLAMA_API_KEY\n    api: openai-completions\n    models:\n      - id: llama-3.1-8b\n        name: Llama 3.1 8B (本地)\n        reasoning: false\n        input: [text]\n        cost:\n          input: 0\n          output: 0\n          cacheRead: 0\n          cacheWrite: 0\n        contextWindow: 128000\n        maxTokens: 32000\n\n  llama.cpp:\n    baseUrl: http:\u002F\u002F127.0.0.1:8080\n    api: openai-responses\n    auth: none\n    discovery:\n      type: llama.cpp\n```\n\n**支持的 API：** `openai-completions`, `openai-responses`, `openai-codex-responses`, `azure-openai-responses`, `anthropic-messages`, `google-generative-ai`, `google-vertex`\n\n### 设置文件\n\n全局设置存储于：\n\n- `~\u002F.omp\u002Fagent\u002Fconfig.yml`\n\n项目覆盖设置则从发现的项目设置文件中加载（通常为 `.omp\u002Fsettings.json`）。\n\n全局 `config.yml` 示例：\n\n```yaml\ntheme:\n  dark: titanium\n  light: light\n\nenabledModels:\n  - \"anthropic\u002F*\"\n  - \"*gpt*\"\n  - \"gemini-2.5-pro:high\"\n\nmodelRoles:\n  default: anthropic\u002Fclaude-sonnet-4-20250514\n  plan: anthropic\u002Fclaude-opus-4-1:high\n  smol: anthropic\u002Fclaude-sonnet-4-20250514\ndefaultThinkingLevel: high\n\nretry:\n  enabled: true\n  # 在放弃速率限制\u002F服务器错误之前的最大重试次数\n  maxRetries: 3\n  # 默认等待时间（指数退避），除非 API 提供 retry-after-ms\n  baseDelayMs: 2000\n  # 配置角色特定的模型回退链\n  fallbackChains:\n    default:\n      - \"openai\u002Fgpt-4o-mini\"\n      - \"openai\u002Fgpt-4o\"\n    plan:\n      - \"anthropic\u002Fclaude-sonnet-4-6:high\"\n      - \"openai\u002Fo3:high\"\n  # 回退模型冷却期结束后是否恢复到主模型\n  fallbackRevertPolicy: cooldown-expiry\nsteeringMode: one-at-a-time\nfollowUpMode: one-at-a-time\ninterruptMode: immediate\n\nshellPath: C:\\\\path\\\\to\\\\bash.exe\nhideThinkingBlock: false\ncollapseChangelog: false\n\ndisabledProviders: []\ndisabledExtensions: []\n\ncompaction:\n  enabled: true\n  reserveTokens: 16384\n  keepRecentTokens: 20000\n\nskills:\n  enabled: true\n\n\nterminal:\n  showImages: true\n\ntopP: -1 # 核采样 (0-1, -1 = 提供商默认值)\ntopK: -1 # Top-K 令牌 (-1 = 提供商默认值)\nminP: -1 # 最小概率 (0-1, -1 = 提供商默认值)\n\ndisplay:\n  tabWidth: 4 # Tab 渲染宽度 (.editorconfig 集成)\n\nasync:\n  enabled: false\n  maxJobs: 100\n\ntask:\n  eager: false\n  isolation:\n    mode: none # none | worktree | fuse-overlay | fuse-projfs\n    merge: patch # patch | branch\n```\n\n旧版迁移注意事项：\n\n- `settings.json` → `config.yml`\n- `queueMode` → `steeringMode`\n- 平面的 `theme: \"...\"` → `theme.dark` \u002F `theme.light`\n\n---\n\n## 扩展\n\n### 主题\n\n内置主题包括 `dark`、`light` 以及许多捆绑变体。\n\n**自动深色\u002F浅色切换：** omp 通过 Mode 2031、原生 macOS CoreFoundation FFI 或 `COLORFGBG` 备用方案检测终端外观，并自动在 `theme.dark` 和 `theme.light` 之间切换。\n\n可通过 `\u002Fsettings` 选择主题，或在 `~\u002F.omp\u002Fagent\u002Fconfig.yml` 中设置：\n\n```yaml\ntheme:\n  dark: titanium\n  light: light\n```\n\n**自定义主题：** 创建 `~\u002F.omp\u002Fagent\u002Fthemes\u002F*.json`。\n\n> 请参阅 [主题文档](docs\u002Ftheme.md)。\n\n### 自定义斜杠命令\n\n将可重复使用的提示命令定义为 Markdown 文件：\n\n- 全局：`~\u002F.omp\u002Fagent\u002Fcommands\u002F*.md`\n- 项目：`.omp\u002Fcommands\u002F*.md`\n\n```markdown\n---\ndescription: 审查暂存的 Git 更改\n---\n\n审查暂存的更改（`git diff --cached`）。重点关注：\n\n- Bug 和逻辑错误\n- 安全问题\n- 错误处理的不足\n```\n\n文件名（不带 `.md`）即为命令名称。\n\n参数占位符：\n\n- `$1`, `$2`, ... 位置参数\n- `$@` 和 `$ARGUMENTS` 表示所有参数的拼接\n\n也支持 TypeScript 自定义命令：\n\n- `~\u002F.omp\u002Fagent\u002Fcommands\u002F\u003Cname>\u002Findex.ts`\n- `.omp\u002Fcommands\u002F\u003Cname>\u002Findex.ts`\n\n捆绑的 TypeScript 命令：`\u002Freview`。\n\n### 技能\n\n技能是按需加载的能力包。\n\n常见位置：\n\n- `~\u002F.omp\u002Fagent\u002Fskills\u002F*\u002FSKILL.md`\n- `.omp\u002Fskills\u002F*\u002FSKILL.md`\n- `~\u002F.claude\u002Fskills\u002F*\u002FSKILL.md`, `.claude\u002Fskills\u002F*\u002FSKILL.md`\n- `~\u002F.codex\u002Fskills\u002F*\u002FSKILL.md`, `.codex\u002Fskills\u002F*\u002FSKILL.md`\n\n```markdown\n---\nname: brave-search\ndescription: 通过 Brave Search API 进行网页搜索。\n---\n\n# 勇敢搜索\n```\n\n`description` 驱动匹配；`name` 在省略时默认为文件夹名称。\n\n使用 `omp --no-skills` 或 `skills.enabled: false` 来禁用技能。\n\n> 请参阅 [技能文档](docs\u002Fskills.md)。\n\n### 钩子\n\n钩子是订阅生命周期事件的 TypeScript 模块。\n\n钩子位置：\n\n- 全局：`~\u002F.omp\u002Fagent\u002Fhooks\u002Fpre\u002F*.ts`, `~\u002F.omp\u002Fagent\u002Fhooks\u002Fpost\u002F*.ts`\n- 项目：`.omp\u002Fhooks\u002Fpre\u002F*.ts`, `.omp\u002Fhooks\u002Fpost\u002F*.ts`\n- CLI：`--hook \u003Cpath>`\n\n```typescript\nimport type { HookAPI } from \"@oh-my-pi\u002Fpi-coding-agent\u002Fhooks\";\n\nexport default function (omp: HookAPI) {\n\tomp.on(\"tool_call\", async (event, ctx) => {\n\t\tif (event.toolName === \"bash\" && \u002Fsudo\u002F.test(event.input.command as string)) {\n\t\t\tconst ok = await ctx.ui.confirm(\"允许使用 sudo 吗？\", event.input.command as string);\n\t\t\tif (!ok) return { block: true, reason: \"被用户阻止\" };\n\t\t}\n\t\treturn undefined;\n\t});\n}\n```\n\n通过以下方式从钩子注入消息：\n\n```ts\nomp.sendMessage(message, { triggerTurn: true });\n```\n\n> 请参阅 [钩子文档](docs\u002Fhooks.md) 和 [示例钩子](packages\u002Fcoding-agent\u002Fexamples\u002Fhooks\u002F)。\n\n### 自定义工具\n\n自定义工具扩展了内置工具集，可供模型调用。\n\n自动发现的位置：\n\n- 全局：`~\u002F.omp\u002Fagent\u002Ftools\u002F*\u002Findex.ts`\n- 项目：`.omp\u002Ftools\u002F*\u002Findex.ts`\n\n```typescript\nimport { Type } from \"@sinclair\u002Ftypebox\";\nimport type { CustomToolFactory } from \"@oh-my-pi\u002Fpi-coding-agent\";\nconst factory: CustomToolFactory = () => ({\n\tname: \"greet\",\n\tlabel: \"问候\",\n\tdescription: \"生成问候语\",\n\tparameters: Type.Object({\n\t\tname: Type.String({ description: \"要问候的名字\" }),\n\t}),\n\tasync execute(_toolCallId, params) {\n\t\tconst { name } = params as { name: string };\n\t\treturn { content: [{ type: \"text\", text: `你好，${name}！` }] };\n\t},\n});\nexport default factory;\n```\n\n> 请参阅 [自定义工具文档](docs\u002Fcustom-tools.md) 和 [自定义工具示例](packages\u002Fcoding-agent\u002Fexamples\u002Fcustom-tools\u002F)。\n\n---\n\n## CLI 参考\n\n```bash\nomp [选项] [@文件...] [消息...]\nomp \u003C命令> [参数] [标志]\n```\n\n### 选项\n\n| 选项                                | 描述                                                        |\n| ------------------------------------- | ---------------------------------------------------------- |\n| `--provider \u003Cname>`                   | 提供商提示（旧版；建议使用 `--model`）                     |\n| `--model \u003Cid>`                        | 模型 ID（支持模糊匹配）                                    |\n| `--smol \u003Cid>`                         | 覆盖本次运行的 `smol` 角色模型                             |\n| `--slow \u003Cid>`                         | 覆盖本次运行的 `slow` 角色模型                             |\n| `--plan \u003Cid>`                         | 覆盖本次运行的 `plan` 角色模型                             |\n| `--models \u003Cpatterns>`                 | 用于角色轮换的逗号分隔的模型模式                           |\n| `--list-models [pattern]`             | 列出可用模型（可选模糊筛选）                               |\n| `--thinking \u003Clevel>`                  | 思考级别：`off`, `minimal`, `low`, `medium`, `high`, `xhigh` |\n| `--api-key \u003Ckey>`                     | API 密钥（覆盖环境\u002F提供商查找）                            |\n| `--system-prompt \u003Ctext\\|file>`        | 替换系统提示                                               |\n| `--append-system-prompt \u003Ctext\\|file>` | 追加到系统提示                                             |\n| `--mode \u003Cmode>`                       | 输出模式：`text`, `json`, `rpc`                             |\n| `--print`, `-p`                       | 非交互式：处理提示并退出                                   |\n| `--continue`, `-c`                    | 继续最近一次会话                                           |\n| `--resume`, `-r [id\\|path]`           | 根据 ID 前缀或路径恢复会话（若未指定则打开选择器）         |\n| `--session \u003Cvalue>`                   | `--resume` 的别名                                          |\n| `--session-dir \u003Cdir>`                 | 用于会话存储和查找的目录                                   |\n| `--no-session`                        | 不保存会话                                                 |\n| `--tools \u003Ctools>`                     | 限制为逗号分隔的内置工具名称                               |\n| `--no-tools`                          | 禁用所有内置工具                                           |\n| `--no-lsp`                            | 禁用 LSP 集成                                              |\n| `--no-pty`                            | 禁用基于 PTY 的交互式 bash 执行                             |\n| `--extension \u003Cpath>`, `-e`            | 加载扩展文件（可重复）                                     |\n| `--hook \u003Cpath>`                       | 加载钩子\u002F扩展文件（可重复）                                 |\n| `--no-extensions`                     | 禁用扩展发现（`-e` 路径仍会加载）                          |\n| `--no-skills`                         | 禁用技能发现和加载                                         |\n| `--skills \u003Cpatterns>`                 | 用于筛选技能的逗号分隔的 glob 模式                         |\n| `--no-rules`                          | 禁用规则发现和加载                                         |\n| `--allow-home`                        | 允许从主目录启动而不自动切换目录                           |\n| `--no-title`                          | 禁用自动会话标题生成                                       |\n| `--export \u003Cfile> [output]`            | 将会话导出为 HTML                                          |\n| `--help`, `-h`                        | 显示帮助                                                   |\n| `--version`, `-v`                     | 显示版本                                                   |\n\n### 子命令\n\n`omp` 还提供专用子命令：\n\n- `commit`\n- `config`\n- `grep`\n- `jupyter`\n- `plugin`\n- `search`（别名：`q`）\n- `setup`\n- `shell`\n- `ssh`\n- `stats`\n- `update`\n\n### 文件参数\n\n使用 `@` 前缀包含文件：\n\n```bash\nomp @prompt.md \"回答这个问题\"\nomp @screenshot.png \"这张图片里有什么？\"\nomp @requirements.md @design.png \"实现这个\"\n```\n\n文本文件会被包裹在 `\u003Cfile ...>` 块中。图像会被附加。\n\n### 示例\n\n```bash\n# 交互模式\nomp\n# 非交互模式\nomp -p \"列出 src 目录下的所有 .ts 文件\"\nomp -c \"我们刚才讨论了什么？\"\n# 根据 ID 前缀恢复会话\nomp -r abc123\n\n# 使用模式进行模型轮换\nomp --models \"sonnet:high,haiku:low\"\n\n# 限制工具集以进行只读审查\nomp --tools read,grep,find -p \"审查架构\"\n# 导出会话\nomp --export session.jsonl output.html\n```\n\n### 环境变量\n\n| 变量                                          | 描述                                             |\n| ------------------------------------------------- | ------------------------------------------------------- |\n| `ANTHROPIC_API_KEY`、`OPENAI_API_KEY` 等       | 提供商凭据                                    |\n| `PI_CODING_AGENT_DIR`                             | 覆盖代理数据目录（默认：`~\u002F.omp\u002Fagent`）        |\n| `PI_PACKAGE_DIR`                                  | 覆盖包目录解析                                |\n| `PI_SMOL_MODEL`、`PI_SLOW_MODEL`、`PI_PLAN_MODEL` | 角色模型覆盖                                    |\n| `PI_NO_PTY`                                       | 禁用基于 PTY 的 Bash 执行                        |\n| `VISUAL`、`EDITOR`                                | Ctrl+G 的外部编辑器                              |\n\n完整参考请参阅 [环境变量](docs\u002Fenvironment-variables.md)。\n\n---\n\n## 工具\n\n使用 `--tools \u003C列表>` 来限制可用的内置工具。\n\n### 内置工具名称 (`--tools`)\n\n| 工具             | 描述                                                    |\n| ---------------- | -------------------------------------------------------------- |\n| `ask`            | 向用户提出结构化的后续问题（交互模式）                     |\n| `bash`           | 执行 Shell 命令                                         |\n| `python`         | 在 IPython 内核中执行 Python 代码                          |\n| `calc`           | 确定性计算器\u002F求值器                                     |\n| `ssh`            | 在已配置的 SSH 主机上执行命令                            |\n| `edit`           | 使用 LINE#ID 锚点进行原地文件编辑                         |\n| `find`           | 按照 glob 模式查找文件                                   |\n| `grep`           | 搜索文件内容                                             |\n| `ast_grep`       | 使用 AST 匹配进行结构化代码搜索（ast-grep）               |\n| `ast_edit`       | 基于 AST 的结构化代码重写（ast-grep）                     |\n| `lsp`            | 语言服务器操作（11 种操作）                               |\n| `notebook`       | 编辑 Jupyter 笔记本                                      |\n| `read`           | 读取文件\u002F目录（默认文本上限：3000 行）                   |\n| `browser`        | 浏览器自动化工具（面向模型的名称：`puppeteer`）           |\n| `task`           | 启动子代理以并行执行                                     |\n| `await`          | 阻塞等待异步后台任务                                     |\n| `todo_write`     | 分阶段任务跟踪与进度管理                                 |\n| `fetch`          | 获取并提取 URL 内容                                      |\n| `web_search`     | 多提供商网络搜索                                         |\n| `write`          | 创建或覆盖文件                                           |\n| `generate_image` | 使用 Gemini 图像模型生成或编辑图像                       |\n\n注：\n\n- 部分工具受设置限制（如 `calc`、`browser` 等）\n- `ask` 需要交互式 UI\n- `ssh` 需要配置好的 SSH 主机\n\n示例：\n\n`omp --tools read,grep,find -p \"Review this codebase\"`\n\n如需添加新工具，请参阅 [自定义工具](#custom-tools)。\n\n---\n\n## 编程式使用\n\n### SDK\n\n若需将 omp 嵌入到 Node.js\u002FTypeScript 应用程序中，可使用 SDK：\n\n```typescript\nimport { ModelRegistry, SessionManager, createAgentSession, discoverAuthStorage } from \"@oh-my-pi\u002Fpi-coding-agent\";\nconst authStorage = await discoverAuthStorage();\nconst modelRegistry = new ModelRegistry(authStorage);\nawait modelRegistry.refresh();\nconst { session } = await createAgentSession({\n\tsessionManager: SessionManager.inMemory(),\n\tauthStorage,\n\tmodelRegistry,\n});\nsession.subscribe((event) => {\n\tif (event.type === \"message_update\" && event.assistantMessageEvent.type === \"text_delta\") {\n\t\tprocess.stdout.write(event.assistantMessageEvent.delta);\n\t}\n});\nawait session.prompt(\"What files are in the current directory?\");\n```\n\nSDK 提供以下控制功能：\n\n- 模型选择和思考层级\n- 系统提示（替换或追加）\n- 内置\u002F自定义工具\n- 钩子、技能、上下文文件、斜杠命令\n- 会话持久化（`SessionManager`）\n- 设置（`Settings`）\n- API 密钥和 OAuth 解析\n\n> 请参阅 [SDK 文档](docs\u002Fsdk.md) 和 [examples\u002Fsdk\u002F](packages\u002Fcoding-agent\u002Fexamples\u002Fsdk\u002F)。\n\n### RPC 模式\n\n若需从其他语言嵌入或实现进程隔离：\n\n```bash\nomp --mode rpc --no-session\n```\n\n在标准输入上发送 JSON 命令：\n\n```json\n{\"id\":\"req-1\",\"type\":\"prompt\",\"message\":\"List all .ts files\"}\n{\"id\":\"req-2\",\"type\":\"abort\"}\n```\n\n响应以 `type: \"response\"` 的形式发出；会话事件则实时流式输出到标准输出。\n\n> 完整协议请参阅 [RPC 文档](docs\u002Frpc.md)。\n\n### HTML 导出\n\n```bash\nomp --export session.jsonl              # 自动生成文件名\nomp --export session.jsonl output.html  # 自定义文件名\n```\n\n适用于会话文件以及 `--mode json` 生成的 JSON 事件日志。\n\n---\n\n## 哲学\n\nomp 是 [pi-mono](https:\u002F\u002Fgithub.com\u002Fbadlogic\u002Fpi-mono) 的一个分支，由 [Mario Zechner](https:\u002F\u002Fgithub.com\u002Fmariozechner) 开发，并扩展为包含电池式的编码工作流。\n\n核心理念：\n\n- 保持交互式终端优先的用户体验，以适应实际编码工作\n- 包含实用的内置功能（工具、会话、分支、子代理、可扩展性）\n- 将高级行为设计为可配置，而非隐藏起来\n\n---\n\n## 开发\n\n### 调试命令\n\n`\u002Fdebug` 打开用于调试、报告和性能分析的工具。\n\n有关架构和贡献指南，请参阅 [packages\u002Fcoding-agent\u002FDEVELOPMENT.md](packages\u002Fcoding-agent\u002FDEVELOPMENT.md)。\n\n---\n\n## 单仓库包\n\n| 包                                                   | 描述                                                                |\n| --------------------------------------------------------- | -------------------------------------------------------------------------- |\n| **[@oh-my-pi\u002Fpi-ai](packages\u002Fai)**                        | 支持流式传输和模型\u002F提供商集成的多提供商 LLM 客户端                    |\n| **[@oh-my-pi\u002Fpi-agent-core](packages\u002Fagent)**             | 带工具调用和状态管理的代理运行时                                     |\n| **[@oh-my-pi\u002Fpi-coding-agent](packages\u002Fcoding-agent)**    | 交互式编码代理 CLI 和 SDK                                            |\n| **[@oh-my-pi\u002Fpi-tui](packages\u002Ftui)**                      | 带差异渲染的终端 UI 库                                               |\n| **[@oh-my-pi\u002Fpi-natives](packages\u002Fnatives)**              | 用于 grep、shell、图像、文本、语法高亮等功能的 N-API 绑定            |\n| **[@oh-my-pi\u002Fomp-stats](packages\u002Fstats)**                 | 用于 AI 使用统计信息的本地可观测性仪表板                             |\n| **[@oh-my-pi\u002Fpi-utils](packages\u002Futils)**                  | 共享工具（日志记录、流、目录\u002F环境\u002F进程助手）                         |\n| **[@oh-my-pi\u002Fswarm-extension](packages\u002Fswarm-extension)** | Swarm 编排扩展包                                                     |\n\n### Rust 库\n\n| 库                                                         | 描述                                                                                  |\n| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |\n| **[pi-natives](crates\u002Fpi-natives)**                           | `@oh-my-pi\u002Fpi-natives` 使用的核心 Rust 原生插件                                        |\n| **[brush-core-vendored](crates\u002Fbrush-core-vendored)**         | 为嵌入式 Bash 执行而分叉并 vendored 的 [brush-shell](https:\u002F\u002Fgithub.com\u002Freubeno\u002Fbrush) |\n| **[brush-builtins-vendored](crates\u002Fbrush-builtins-vendored)** | Vendored 的 Bash 内置命令（cd、echo、test、printf、read、export 等）                          |\n\n---\n\n## 许可证\n\nMIT。参见 [LICENSE](LICENSE)。\n\n版权所有 © 2025 马里奥·泽克纳  \n版权所有 © 2025–2026 坎·博吕克","# oh-my-pi 快速上手指南\n\n**oh-my-pi** 是一款运行在终端中的 AI 编程助手（Coding Agent）。它基于 Rust 和 TypeScript 构建，使用 Bun 运行时，提供类似 IDE 的代码智能、多代理协作系统以及强大的 Git 提交辅助功能。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows (WSL2 推荐)。\n*   **运行时**：必须安装 [Bun](https:\u002F\u002Fbun.sh\u002F) (oh-my-pi 的核心运行时)。\n    *   安装命令 (macOS\u002FLinux): `curl -fsSL https:\u002F\u002Fbun.sh\u002Finstall | bash`\n    *   安装命令 (Windows): `powershell -c \"irm bun.sh\u002Finstall.ps1 | iex\"`\n*   **Node.js** (可选)：部分插件或项目依赖可能需要，但核心功能由 Bun 处理。\n*   **Git**：用于版本控制及 `omp commit` 等功能。\n*   **Python** (可选)：如需使用内置的 IPython 内核执行 Python 代码，需安装 Python 3.8+。\n\n> **提示**：国内用户若下载 Bun 速度慢，可尝试使用镜像源或代理配置。\n\n## 安装步骤\n\noh-my-pi 通过 npm 发布，但由于其底层使用 Bun 运行，建议直接使用 `bun` 命令进行全局安装以获得最佳性能。\n\n### 1. 全局安装\n\n打开终端，运行以下命令：\n\n```bash\nbun install -g @oh-my-pi\u002Fpi-coding-agent\n```\n\n如果习惯使用 npm，也可以使用：\n\n```bash\nnpm install -g @oh-my-pi\u002Fpi-coding-agent\n```\n\n### 2. 验证安装\n\n安装完成后，检查版本号以确认安装成功：\n\n```bash\nomp --version\n```\n\n### 3. 初始化配置 (可选)\n\n首次运行时，工具会自动创建配置文件目录 (`~\u002F.omp`)。如需手动设置 Python 环境或其他依赖，可运行：\n\n```bash\nomp setup python\n```\n\n## 基本使用\n\n### 1. 启动助手\n\n进入任意项目目录，直接输入以下命令启动交互界面：\n\n```bash\nomp\n```\n\n启动后，您将进入一个类似聊天室的终端界面，可以在此输入自然语言指令让 AI 协助编写代码、解释逻辑或重构文件。\n\n### 2. 常用斜杠命令 (Slash Commands)\n\n在交互界面中，可以使用 `\u002F` 开头的命令调用特定功能：\n\n*   **代码审查**：\n    ```text\n    \u002Freview\n    ```\n    交互式选择审查模式（如对比分支、未提交变更等），AI 将生成结构化报告。\n\n*   **任务管理**：\n    ```text\n    \u002Ftodo\n    ```\n    创建和管理分阶段的任务列表，实时追踪进度。\n\n*   **模型切换**：\n    ```text\n    \u002Fmodel\n    ```\n    根据不同任务需求（如规划、快速回答、复杂编码）切换不同的 AI 模型角色。\n\n*   **自定义命令**：\n    支持加载 TypeScript 编写的自定义命令，放置在 `~\u002F.omp\u002Fagent\u002Fcommands\u002F` 或 `.omp\u002Fcommands\u002F` 目录下即可自动识别。\n\n### 3. 核心功能示例\n\n#### 智能 Git 提交\n无需手动编写 Commit Message，oh-my-pi 可以分析代码变更并生成符合规范的提交信息：\n\n```bash\nomp commit\n```\n*   支持 `--dry-run` 预览，`--push` 直接推送。\n*   自动检测不相关的变更并建议拆分为原子提交。\n\n#### 内置 Python 执行\n在对话中直接请求运行 Python 代码，oh-my-pi 会启动持久的 IPython 内核：\n\n```text\n请帮我分析当前目录下的 data.csv 文件，并绘制销售趋势图。\n```\n*   支持流式输出结果、渲染图片及 Markdown。\n*   内置文件操作、Shell 调用等辅助函数。\n\n#### 多代理协作 (Task Tool)\n处理复杂任务时，可以调用子代理系统并行工作：\n\n```text\n\u002Ftask 请分析整个项目的架构，找出潜在的循环依赖，并由评审员代理给出优化建议。\n```\n*   系统会自动调度 `explore` (探索), `plan` (规划), `reviewer` (评审) 等专用代理。\n*   支持后台异步执行和实时流式查看结果。\n\n### 4. 键盘快捷键\n\n在交互界面中，常用的快捷键包括：\n\n*   `Ctrl + T`：展开\u002F折叠待办事项 (Todo) 面板。\n*   `Ctrl + C`：中断当前生成的回复或取消操作。\n*   `Esc`：清除输入行或退出当前模态框。\n\n---\n\n现在您已经完成了 oh-my-pi 的安装并掌握了基础用法。您可以尝试在项目中输入第一个指令，例如：“帮我重构这个文件夹下的所有 TypeScript 文件，使其符合最新的 ESLint 规范”。","资深后端工程师正在处理一个包含多个微服务模块的紧急需求，需要在短时间内完成代码重构、修复若干 Bug 并提交符合规范的版本记录。\n\n### 没有 oh-my-pi 时\n- **提交粒度混乱**：手动执行 `git add` 时难以精准分离不同逻辑的修改，常将无关的样式调整与核心逻辑改动混在一个提交中。\n- **规范执行困难**：编写 Commit Message 全靠记忆，容易遗漏类型前缀或包含“修复了一些问题”等无效描述，导致后续 Changelog 生成失败。\n- **上下文切换频繁**：需要在编辑器、终端和浏览器文档间反复跳转以确认 API 用法或查找错误原因，打断心流。\n- **人工审查耗时**：提交前需肉眼逐行检查 Diff，极易漏掉因复制粘贴产生的冗余代码或潜在冲突。\n\n### 使用 oh-my-pi 后\n- **原子化自动拆分**：oh-my-pi 的 Agentic 模式自动分析代码变更，利用 `git-hunk` 将混合修改智能拆分为多个独立的原子提交，并按依赖顺序排列。\n- **智能合规生成**：自动检测并过滤填充词，生成严格遵循 Conventional Commits 标准的提交信息，同时自动更新 `CHANGELOG.md`。\n- **终端一站式闭环**：直接在终端内调用 LSP 进行代码补全、通过子代理（subagents）查询文档或运行测试，无需离开命令行界面。\n- **精准变更验证**：在提交前自动执行深度差异分析，识别并拦截非预期的元数据变动，确保每次提交都纯净且可追溯。\n\noh-my-pi 将繁琐的 Git 工作流转化为智能化的自主代理操作，让开发者从机械的提交规范中解放，专注于核心逻辑构建。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcan1357_oh-my-pi_9dbbf45d.png","can1357","Can Bölük","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fcan1357_fde7126c.jpg","Security researcher and reverse engineer. \r\n\r\nInterested in Windows kernel development, low-level programming, static program analysis and cryptography.",null,"The Netherlands","_can1357","https:\u002F\u002Fcan.ac\u002F","https:\u002F\u002Fgithub.com\u002Fcan1357",[82,86,90,94,98,102,106,109,112],{"name":83,"color":84,"percentage":85},"TypeScript","#3178c6",85.9,{"name":87,"color":88,"percentage":89},"Rust","#dea584",12.3,{"name":91,"color":92,"percentage":93},"Python","#3572A5",0.7,{"name":95,"color":96,"percentage":97},"JavaScript","#f1e05a",0.6,{"name":99,"color":100,"percentage":101},"CSS","#663399",0.2,{"name":103,"color":104,"percentage":105},"HTML","#e34c26",0.1,{"name":107,"color":108,"percentage":105},"Shell","#89e051",{"name":110,"color":111,"percentage":105},"PowerShell","#012456",{"name":113,"color":114,"percentage":115},"Dockerfile","#384d54",0,2715,247,"2026-04-07T05:12:09","MIT","Linux, macOS, Windows","未说明",{"notes":123,"python":124,"dependencies":125},"该工具是一个终端 AI 编程代理，主要依赖 Bun 运行时和 Rust\u002FTypeScript 构建。支持 Windows 时需额外依赖 ProjFS 或 fuse-overlayfs 以实现任务隔离。LSP 功能会自动发现项目本地的语言服务器（如 node_modules\u002F.bin\u002F 或 .venv\u002Fbin\u002F 中）。无本地大模型运行需求，主要消耗云端 API。","未说明 (需安装 IPython 内核，通过 `omp setup python` 配置)",[126,127,87,83,128],"Bun (运行时)","Node.js\u002Fnpm","IPython",[35,14,52,13],[131,132,133,134,135,136,137,138,139,140,141,142,143,144,145],"bun","cli","typescript","ai-agent","coding-assistant","llm","ai-coding-agent","anthropic","claude","mcp","multi-provider","openai","rust","terminal","tui","2026-03-27T02:49:30.150509","2026-04-11T18:33:32.836305",[149,154,159,164,169,173],{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},22725,"在 WSL (Windows Subsystem for Linux) 中启动 omp 时界面卡住或不显示 TUI 视图怎么办？","这通常是因为终端缺少 Nerd Font 字体支持。请搜索\"Nerd Font + 你的终端名称 + 如何设置\"（例如：google nerdfont + your terminal name + how to setup）来安装并配置合适的字体。安装完成后，omp 的 TUI 界面通常就能正常显示了。","https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fissues\u002F129",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},22726,"GPT-4o\u002FCodex 模型在宣布意图后突然停止响应或不再执行操作怎么办？","这可能是早期版本系统提示词（system prompt）的问题，或者是特定工具（如 TODO tool）导致的冲突。维护者建议尝试禁用 TODO 工具看是否解决问题。如果问题持续，可能是模型提供商侧的临时故障，通常会在后续版本迭代或通过调整系统提示词解决。如果遇到此情况，可以尝试重启会话或切换模型测试。","https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fissues\u002F108",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},22727,"oh-my-pi 是否支持异步任务工具或多代理并行工作？","原生的 oh-my-pi 任务工具默认可能不是异步的。如果你需要多工作树（worktrees）并行或多个代理同时工作，可以查看名为 'oh-my-singularity' 的相关项目，或者使用最近合并的 'swarm' 功能，这是一种基于文件的并行任务解决方案，可以作为替代方案实现类似的多代理并行处理能力。","https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fissues\u002F56",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},22728,"使用编辑工具时遇到\"JSON Parse error: Expected ']'\"错误导致执行停止怎么办？","如果确认模型生成的 JSON 格式正确，这通常是模型提供商侧（如 Claude API）的临时故障或网络波动引起的。维护者已在代码中增加了重试机制。如果遇到此问题，通常无需更改本地配置，稍后重试即可；如果频繁发生，请检查提供商的状态页面（如 status.claude.com）确认是否有服务中断。","https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fissues\u002F182",{"id":170,"question_zh":171,"answer_zh":172,"source_url":163},22729,"如何在 oh-my-pi 中实现并行开发或多工作树复制功能？","你可以使用最近合并的 'swarm' 功能，它是一个基于文件的并行任务求解器。此外，也可以关注或试用 'oh-my-singularity' 项目，该项目计划增加工作树复制（work tree replicas）功能以支持并行特性开发。",{"id":174,"question_zh":175,"answer_zh":176,"source_url":177},22730,"Read 工具返回的图片在终端中显示时未按预期比例缩放（忽略 maxHeight 限制）怎么办？","这是一个已知的显示逻辑缺失问题。当同时设置 maxWidthCells 和 maxHeightCells 且高度为限制因素时，图片可能会拉伸。该问题在较新版本（如 v13.2.1 之后）的修复中已加入按比例缩放的逻辑。如果遇到此问题，请确保升级到最新版本的 oh-my-pi。","https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fissues\u002F170",[179,184,189,194,199,204,209,214,219,224,229,234,239,244,249,254,259,264,269,274],{"id":180,"version":181,"summary_zh":182,"released_at":183},136422,"v13.19.0","## 变更内容\n* 修复(coding-agent)：直接提交计划细化，无需二次确认，由 @kamafozilov 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F612 中实现\n* 功能(ai)：将 gemini-3.1-flash-lite-preview 添加到 google-gemini-cli 目录中，由 @kamafozilov 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F611 中实现\n* 功能(coding-agent)：在涉及 Unicode 字符时截断网页搜索结果的源代码行，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F615 中实现\n* 功能(ai)：添加 OpenAI Codex 的环境认证回退机制，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F619 中实现\n* 功能(coding-agent)：在隔离合并失败时保留结果，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F616 中实现\n* 功能(coding-agent)：添加空闲压缩流程，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F617 中实现\n* 修复(plan-mode)：在进入或退出计划模式时传播思考层级，由 @loftiskg 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F610 中实现\n* 功能(coding-agent)：将秘密占位符替换为哈希令牌，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F614 中实现\n* 功能(coding-agent)：添加自动恢复设置，并确保新会话使用磁盘存储，由 @DeprecatedLuke 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F618 中实现\n* 修复：在 exit_plan_mode 工具上设置独占并发控制，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F621 中实现\n\n## 新贡献者\n* @kamafozilov 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F612 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.18.0...v13.19.0","2026-04-05T16:26:09",{"id":185,"version":186,"summary_zh":187,"released_at":188},136423,"v13.18.0","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.17.6...v13.18.0","2026-04-02T04:31:29",{"id":190,"version":191,"summary_zh":192,"released_at":193},136424,"v13.17.6","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.17.5...v13.17.6","2026-04-01T23:28:01",{"id":195,"version":196,"summary_zh":197,"released_at":198},136425,"v13.17.5","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.17.4...v13.17.5","2026-04-01T22:45:27",{"id":200,"version":201,"summary_zh":202,"released_at":203},136426,"v13.17.1","## 变更内容\n* 修复(ai)：当推理功能启用时，omp 提交在与 OpenAI 兼容的端点上会返回 HTTP 400 错误，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F577 中修复。\n* 新增(ai)：将 vercel-ai-gateway 添加到 \u002Flogin 提供者中，由 @matchai 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F580 中实现。\n* 新增：为 ast_grep 和 ast_edit 添加 Clojure 支持。由 @sundbp 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F579 中实现。\n* 修复(git)：在 joinPatch 中保留空的上下文行，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F583 中修复。\n* 新增(coding-agent)：为标题优先使用 commit 模型（回退至 smol），由 @BayLee4 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F573 中实现。\n* 修复(ai)：将伪造的 Gemini CLI User-Agent 更新为 v0.35.3 格式，由 @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F574 中修复。\n\n## 新贡献者\n* @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F577 中做出了首次贡献。\n* @matchai 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F580 中做出了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.17.0...v13.17.1\n\n## 变更内容\n* 修复(ai)：当推理功能启用时，omp 提交在与 OpenAI 兼容的端点上会返回 HTTP 400 错误，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F577 中修复。\n* 新增(ai)：将 vercel-ai-gateway 添加到 \u002Flogin 提供者中，由 @matchai 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F580 中实现。\n* 新增：为 ast_grep 和 ast_edit 添加 Clojure 支持。由 @sundbp 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F579 中实现。\n* 修复(git)：在 joinPatch 中保留空的上下文行，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F583 中修复。\n* 新增(coding-agent)：为标题优先使用 commit 模型（回退至 smol），由 @BayLee4 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F573 中实现。\n* 修复(ai)：将伪造的 Gemini CLI User-Agent 更新为 v0.35.3 格式，由 @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F574 中修复。\n\n## 新贡献者\n* @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F577 中做出了首次贡献。\n* @matchai 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F580 中做出了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.17.0...v13.17.1\n\n## 变更内容\n* 修复(ai)：当推理功能启用时，omp 提交在与 OpenAI 兼容的端点上会返回 HTTP 400 错误，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F577 中修复。\n* 新增(ai)：将 vercel-ai-gateway 添加到 \u002Flogin 提供者中，由 @matchai 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F580 中实现。\n* 新增：为 ast_grep 和 ast_edit 添加 Clojure 支持。由 @sundbp 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F579 中实现。\n* 修复(git)：在 joinPatch 中保留空的上下文行，由 @djdembeck 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F583 中修复。\n* 新增(coding-agent)：为标题优先使用 commit 模型（回退至 smol），由 @BayLee4 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F573 中实现。\n* 修复(ai)：将伪造的 Gemini CLI User-Agent 更新为 v0.35.3 格式，由 @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F574 中修复。\n\n## 新贡献者\n* @djdembeck 做出了他们的首次贡","2026-04-01T03:41:37",{"id":205,"version":206,"summary_zh":207,"released_at":208},136427,"v13.17.0","## 变更内容\n* 功能（AI）：将 Zai 提供商的默认模型从 glm-4.6 升级到 glm-5.1，由 @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F567 中完成\n* 修复（MCP）：在执行 `\u002Fmcp add` 后立即激活新的服务器工具，由 @apoc 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F557 中完成\n* 修复（光标）：解决 shell 流在 `turnEnded` 信号上挂起的问题，由 @willzhqiang 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F555 中完成\n\n## 新贡献者\n* @willzhqiang 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F555 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.5...v13.17.0","2026-03-30T12:21:34",{"id":210,"version":211,"summary_zh":212,"released_at":213},136428,"v13.16.5","## 变更内容\n* 修复(coding-agent)：如果 @BayLee4 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F566 中禁用了 grep 和 find 工具，则不再提示使用这些工具。\n* 修复(natives)：@zamorakpds 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F565 中跳过了 grep 的特殊文件处理。\n* 修复：解决技能 baseDir 正则表达式在 Windows 反斜杠路径下失效的问题，由 @art-wiedzmin 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F554 中完成。\n* 修复：当模型提供者\u002FID 存在歧义时，将 --model provider\u002Fid 解析为正确的提供者，由 @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F563 中完成。\n* 修复(ai)：规范化 Anthropic 消息的基础 URL，由 @zakhar-kogan 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F561 中完成。\n* 功能(core)：添加了一流的重试回退链，用于模型\u002F提供者的故障转移，由 @enieuwy 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F541 中实现。\n\n## 新贡献者\n* @BayLee4 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F566 中完成了首次贡献。\n* @art-wiedzmin 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F554 中完成了首次贡献。\n* @smileynet 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F563 中完成了首次贡献。\n* @enieuwy 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F541 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.4...v13.16.5","2026-03-29T16:35:06",{"id":215,"version":216,"summary_zh":217,"released_at":218},136429,"v13.16.4","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.3...v13.16.4","2026-03-28T14:28:59",{"id":220,"version":221,"summary_zh":222,"released_at":223},136430,"v13.16.3","## 变更内容\n* 修复：仅在 npm 版本严格更新时显示更新横幅，由 @elikoga 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F552 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.2...v13.16.3","2026-03-28T05:55:00",{"id":225,"version":226,"summary_zh":227,"released_at":228},136431,"v13.16.2","## 变更内容\n* 功能（tui）：通过 `tui.maxInlineImageColumns` 使内联图片的最大宽度可配置，由 @elikoga 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F551 中实现。\n* 功能（browser）：自动检测 NixOS 并使用系统自带的 Chromium 浏览器，由 @elikoga 在 https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F550 中实现。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.1...v13.16.2","2026-03-27T11:35:14",{"id":230,"version":231,"summary_zh":232,"released_at":233},136432,"v13.16.1","## What's Changed\n* fix(coding-agent): fixed python kernel startup hangs by @zamorakpds in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F548\n\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.16.0...v13.16.1","2026-03-27T11:22:36",{"id":235,"version":236,"summary_zh":237,"released_at":238},136433,"v13.16.0","## What's Changed\n* Customizable model roles and selection carousel by @slact in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F477\n* Fix hardcoded model policies overriding explicit custom model definitions by @zakhar-kogan in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F508\n* feat(browser): implement screenshot path saving with ~ expansion and TUI settings support by @RensTillmann in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F379\n* feat(rules): implemented alwaysApply auto-injection into system prompt by @deadcode-walker in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F464\n* fix(tui): enforce strict line budget for collapsed tool output by @fanson in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F515\n\n## New Contributors\n* @deadcode-walker made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F464\n* @fanson made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F515\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.15.3...v13.16.0","2026-03-27T03:56:14",{"id":240,"version":241,"summary_zh":242,"released_at":243},136434,"v13.15.3","## What's Changed\n* Fix stale OpenAI Responses replay across session boundaries by @daandden in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F534\n* Normalize pasted image formats before attach by @itertea in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F543\n* Allow overriding the Codex web search model by @choru-k in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F516\n* feat(ai): add gemini-3.1-pro models to google-vertex provider by @muness in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F521\n* Make temporary model selector keybinding configurable by @daandden in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F539\n\n## New Contributors\n* @itertea made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F543\n* @choru-k made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F516\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.15.2...v13.15.3","2026-03-26T15:37:13",{"id":245,"version":246,"summary_zh":247,"released_at":248},136435,"v13.15.2","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.15.1...v13.15.2","2026-03-26T14:13:27",{"id":250,"version":251,"summary_zh":252,"released_at":253},136436,"v13.14.2","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.14.1...v13.14.2","2026-03-21T16:52:41",{"id":255,"version":256,"summary_zh":257,"released_at":258},136437,"v13.14.0","## What's Changed\n* fix(coding-agent): respect user model overrides in hardcoded policies by @MikeeI in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F483\n* feat: add GPT-5.4 mini and nano models by @maximhar in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F476\n* fix(upstream): allow to using extension dir in `pi.extension` by @Parsifa1 in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F480\n* fix(ai): guard resumed OpenAI Responses replay by @daandden in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F489\n* feat: auto-reconnect MCP servers on connection loss by @apoc in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F482\n* fix(ai): restore xhigh thinking level for Bedrock Opus 4.6 by @RzNmKX in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F481\n\n## New Contributors\n* @MikeeI made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F483\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.13.2...v13.14.0","2026-03-20T23:20:19",{"id":260,"version":261,"summary_zh":262,"released_at":263},136438,"v13.13.2","## What's Changed\n* feat(mcp): implement roots\u002Flist and server-to-client request handling by @apoc in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F474\n\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.13.1...v13.13.2","2026-03-19T06:06:27",{"id":265,"version":266,"summary_zh":267,"released_at":268},136439,"v13.13.0","## What's Changed\n* feat(settings): add startup.checkUpdate for disable update check by @Parsifa1 in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F469\n\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.12.10...v13.13.0","2026-03-18T10:21:13",{"id":270,"version":271,"summary_zh":272,"released_at":273},136440,"v13.12.10","**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.12.9...v13.12.10","2026-03-17T19:04:55",{"id":275,"version":276,"summary_zh":277,"released_at":278},136441,"v13.12.9","## What's Changed\n* fix(packages\u002Fai): strip replay-only responses history ids by @daandden in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F458\n* fix: MCP OAuth exact redirect URIs for Slack-style providers by @maximhar in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F454\n* fix: enable xhigh thinking level for OpenAI-compatible APIs by @Xeron2000 in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F447\n* fix: persist MCP discovery tool selections across session lifecycle by @maximhar in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F453\n* fix(storage): support SQLite 3.37 without unixepoch by @Dragoy in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F451\n* feat: session deletion by @slact in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F448\n\n## New Contributors\n* @Xeron2000 made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F447\n* @Dragoy made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F451\n* @slact made their first contribution in https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fpull\u002F448\n\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fcan1357\u002Foh-my-pi\u002Fcompare\u002Fv13.12.8...v13.12.9","2026-03-17T16:08:02"]