@herbertgao/pi-cc-extensions

A Pi productivity suite with Claude Code-style UI, context inspection, and agent/session references

Packages

Package details

extensiontheme

Install @herbertgao/pi-cc-extensions from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@herbertgao/pi-cc-extensions
Package
@herbertgao/pi-cc-extensions
Version
0.11.1
Published
Oct 9, 2026
Downloads
8,678/mo · 2,517/wk
Author
herbertgao
License
MIT
Types
extension, theme
Size
772.1 KB
Dependencies
3 dependencies · 3 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/HerbertGao/pi-extensions/master/packages/pi-cc-extensions/assets/readme/preview.webp",
  "video": "https://github.com/minuque/pi-cc-extensions/releases/download/v0.9.4/demo.mp4",
  "themes": [
    "./themes/cc-dark.json",
    "./themes/cc-light.json"
  ],
  "extensions": [
    "./extensions/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-cc-extensions

类 Claude Code TUI 输出风格,并融入了一些个人喜好,和一些实用小功能。

界面预览

点击封面播放演示视频

快速开始

pi install npm:@herbertgao/pi-cc-extensions

# GitHub(本 monorepo)
pi install git:github.com/HerbertGao/pi-extensions

安装后执行 /reload

功能

功能 说明 入口
Claude Code UI 工具摘要、折叠展开、rich edit/write diff,以及on / compact / off 三种模式 /ccstyle
Markdown 增强 Mermaid 图、提示框、URL 链接化等 自动生效
Fullscreen mode 工具卡/group 单击展开与收起、预览、hover 高亮、回到底部按钮 TUIMODE=fullscreen 或 --tui-mode fullscreen
配置面板 Style / Features / UI / Diff / Thinking / Footer 六页签 /ccstyle
上下文检查 查看上下文占用,并预览 System prompt、Memory、Skills、Tools definition 和消息内容 /context
Session/Subagent 引用 搜索并注入历史 Session 或现有 SubAgent 的有效上下文 @
状态栏 显示:模型、上下文、缓存、费用、git并适配 @narumitw/pi-usage 实时显示额度;git/缓存图标可关 Nerd Font /ccstyle
主题 随包提供内置 CC Dark、CC Light 主题 /theme

on / compact 两种模式的渲染样例:默认模式 · 紧凑模式

配置

/ccstyle 的行为由 ~/.pi/agent/pi-cc-extensions.json 配置:

{
  // style
  "mode": "on",                            // on / compact / off
  "excludeRenderers": [],                  // 走原生渲染的工具名;Agent 始终保留专用渲染器

  // features
  "enableSessionReference": true,          // @ session 引用
  "enableSubagentAutocomplete": true,      // @subagent:[name] 补全与委派提示
  "enableContextCommand": true,            // /context 上下文检查
  "enableAgentSummary": true,              // 每回合工具摘要
  "enableWorkingMessage": true,            // Working... 底部 token/耗时
  "enableAliases": true,                   // /clear、/exit 别名

  // ui
  "expandedInputMaxLines": 5,              // 展开工具卡 Input 可见行数,超出在末行显示展开提示
  "expandedOutputMaxLines": 10,            // 展开工具卡 Output 可见行数,超出在末行显示展开提示
  "expandedPreviewMaxLines": 40,           // 展开 TaskList 正文最大行数(展开 diff 始终全量)
  "expandedCardBackground": "userMessageBg", // 展开卡背景槽位;userMessageBg 与用户消息同色,toolPendingBg 为中性灰
  "inputClip": 0,                          // 工具摘要 path/command 折叠字符数;0 = 按可用宽度
  "showStartupHeader": true,               // 启动头(logo + tips)开关
  "scrollStepLines": 3,                    // fullscreen 滚轮步进

  // diff
  "diffViewMode": "auto",                  // 布局:auto / split / unified
  "diffIndicatorMode": "bars",             // 变更指示:bars / classic / none
  "diffSplitMinWidth": 120,                // 左右分栏的最小终端宽度
  "editDiffCollapsedLines": 24,            // Edit 折叠行数,超出显示展开提示
  "writeDiffCollapsedLines": 0,            // write 折叠行数,0 仅显示创建摘要
  "diffWordWrap": true,                    // 长 diff 行换行

  // thinking
  "useSummaryTitlesAsThinkingTitle": true, // 用最新摘要作思考标题
  "previewLines": 3,                       // 预览行数,0 隐藏
  "animationIntervalMs": 90,               // 标题动画间隔(毫秒)
  "dimThinkingText": false,                // thinking 正文用 dim 色

  // footer
  "enableCustomFooter": true,              // 自定义状态栏
  "footerNerdIcons": true,                 // git/缓存用 Nerd Font 图标;false 为纯文本
  "footerHiddenKeys": [],                  // 隐藏的插件芯片 key
  "footerLine1Keys": ["pi-usage"],         // line1 插件芯片顺序;pi-usage 默认显示,数据来自 @narumitw/pi-usage
  "footerLine2Keys": [],                   // line2 插件芯片顺序(接在 cwd/git 后)
  "footerLine3Keys": []                    // line3 备用槽,有可见芯片才占行
}

[!TIP] 全屏模式:单击 click to show more 展开工具卡、思考、Skill 和 compact 摘要;工具卡展开态 diff 全量显示,Input/Output 超行时末行 … +N more lines · click to show more 打开全量预览,单击收起(卡内拖动为选中文本)。

[!NOTE] Mermaid 渲染:建议把 markdown.mermaid 设为 final(~/.pi/agent/settings.json 或 /settings 面板的 Mermaid diagrams 选项)。默认 streaming 逐帧重绘,final 渲染最终版更稳定。

本地开发

npm test
npm run typecheck
./test.sh # macOS/Linux:临时加载本地检出,退出后还原
test.bat  # Windows:同上(调用 test.ps1)
# 只想跑一次、不改配置:pi -e .

兼容性

  • Node.js >=24;monorepo 使用 Pi 1.0.4,发布包的 Pi peer 版本保持 *。

推荐搭配

扩展 用途
npm:@ff-labs/pi-fff 模糊文件与内容检索(fffind / ffgrep)
npm:pi-web-access 网页搜索、URL 抓取、GitHub 克隆、PDF/视频解析
npm:@narumitw/pi-usage 查看当前账号用量(Codex / Copilot / OpenRouter)

致谢

许可证

MIT © 2026 minuque;衍生维护:HerbertGao/pi-extensions