Prompt 是一款 macOS 普通话拼音输入法(IME),使用 Swift/SwiftUI 构建,以 SQLite 数据库存储词库。
- 直接内置完整的100万+的词条,无须在再额外安装词库
- 支持使用whisper模型进行本地无缝的语音输入
- 延迟低
- 无隐私风险
- 模型大小可以任意选择
- 支持使用llama.cpp的模型进行语音识别的后处理
- ChineseErrorCorrector3-4B
| 快捷键 | 功能 |
|---|---|
| 左/右方向键 | 逐个移动高亮候选词(到头/尾时自动翻页) |
| 上/下方向键 | 翻页 |
| Space | 选择当前高亮的候选词 |
| Shift+Space | 从用户造词库中删除第一个候选词 |
双击打开下载的 PKG 文件,按提示步骤安装。安装过程中系统设置可能会弹出,请求添加 Prompt 输入法。
最后一步安装程序会请求注销电脑——注销并重新登录后,输入法才会正常生效。
安装后如果看不到 Prompt 输入法,请前往「系统设置 → 键盘 → 输入来源」手动添加。
直接执行 rebuild.sh,重启电脑
首先,前往「系统设置 → 键盘 → 输入来源」移除 Prompt。
然后删除以下文件/文件夹:
sudo rm -rf /Library/Input\ Methods/Prompt.app
rm -rf ~/Library/Input\ Methods/Prompt.app
rm -rf ~/Library/Application\ Scripts/hk.eduhk.inputmethod.Prompt
rm -rf ~/Library/userlexicon.sqlite3
- macOS 15.0+,Xcode 16.0+
- Python 3(仅用于词典扩展脚本)
- Prompt/ — 主 macOS 输入法应用(Swift/SwiftUI),注册为 IMKInputController
- CoreIME/ — 核心引擎 Swift Package,由 Prompt 导入
- Preparing/ — 独立 Swift Package,用于从
pinyin.txt生成imedb.sqlite3
cd Preparing && swift run -c release && cd .../rebuild.shlog stream --predicate 'subsystem == "hk.eduhk.inputmethod.Prompt"' --level debug --style compactsqlite3 ~/Library/userlexicon.sqlite3 \
"SELECT * FROM userlexicontable ORDER BY frequency DESC LIMIT 20;"rm -rf ~/Library/Input\ Methods/Prompt.app
osascript -e 'tell application id "hk.eduhk.inputmethod.Prompt" to quit'
killall -9 TextInputMenuAgent 2>/dev/null || true
osascript -e 'tell application id "hk.eduhk.inputmethod.Prompt" to quit'
sudo /usr/libexec/PlistBuddy -c "Print :AppleEnabledInputSources" ~/Library/Preferences/com.apple.HIToolbox.plist
在 System Settings → Keyboard → Input Sources 里手动删除重复项是最安全的方式。如果删不掉(灰色或删了又回来),说明还有 /Library/Input Methods/Prompt.app 的注册在系统级生效,需要:
ls /Library/Input\ Methods/
sudo rm -rf /Library/Input\ Methods/Prompt.app
killall -9 cfprefsd killall -9 TextInputMenuAgent
Bundle Identifier:hk.eduhk.inputmethod.Prompt