pi-parrot-translate0.1.0
Translate Pi replies and thinking, and rewrite outgoing prompts into English.
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
parrot-agent-extensions
面向 Claude Code 和 Pi 的语言辅助扩展。parrot-translate 将外文提示词翻成英文,回复和思考内容按需译回你的语言。

Pi
一条命令安装:
pi install git:github.com/jhao0413/parrot-agent-extensions
重启 Pi,或在已有会话中运行 /reload。默认使用微软翻译接口,无需 API key,目标语言为简体中文,无需额外配置。
- 外文提示词在提交前翻成英文,用户消息显示原文与英文的对照。
- 回复、工具调用前的说明和思考块在后台翻译,译文跟在对应原文段落后面。
- 按
Ctrl+Y或运行/translate切换回复译文显示。 - 回复译文只影响显示,不写入模型上下文;代码和识别出的技术内容原样保留。翻译失败时保留原文。
可选配置
创建 ~/.pi/agent/parrot-translate.json,只填写需要修改的选项。例如,只翻译回复,不改写提示词:
{
"outbound": false,
"lang": "zh-Hans"
}
修改后运行 /reload。其他语言、模型服务和快捷键配置见 Pi 使用说明。
更新与卸载
# 更新
pi update git:github.com/jhao0413/parrot-agent-extensions
# 卸载
pi remove git:github.com/jhao0413/parrot-agent-extensions
执行后重启 Pi,或运行 /reload。诊断日志位于 /tmp/parrot-pi.log。
npm 安装
包名为 pi-parrot-translate。发布到 npm 后,用户也可以执行:
pi install npm:pi-parrot-translate
目前尚未发布到 npm,请使用上面的 GitHub 安装命令。
Claude Code
claude plugin marketplace add jhao0413/parrot-agent-extensions
claude plugin install parrot-translate@parrot-agent-extensions
需要 Claude Code v2.1.287+(mods API)。配置和使用说明见 Claude Code 使用说明。
致谢
感谢 Linux.do 社区 的支持与帮助。