Cachebell
Native sound and desktop reminders before an OpenCode prompt cache window ends
2
811
近 7 天 14
41.4
生态多维模型
12 天前
2026-10-08
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-cachebell@0.6.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-cachebell@0.6.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D opencode-cachebellOpenCode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
Get a reminder before your OpenCode prompt cache expires. Continuing the conversation while the cache is available means paying less for repeated input.
CacheBell plays a short sound and shows a desktop notification about two minutes beforehand, while the agent is idle.
Install
For OpenCode 2, add to plugins in ~/.config/opencode/opencode.json, keeping your other entries:
{
"plugins": ["opencode-cachebell@0.6.0"]
}
Restart OpenCode. It installs the package automatically. On OpenCode 1, use
"plugin" instead of "plugins".
Works with OpenCode 1 and OpenCode 2 from the same package. Supports macOS and WSL, with best-effort native Windows and Linux desktop support.
Sounds
Nine sounds are included:
| Sound | Style |
|---|---|
| Pulse (default) | Short, rising electronic signal |
| Chime | Two warm bell notes |
| Knock | Soft, woody double-tap |
| Sheep Field | Quiet, 2.5-second field bleat |
| Sheep Close | Quiet, 1.36-second close-up bleat |
| Cat Meow | Short, soft meow |
| Rooster Crow | Short farmyard crow |
| Horse Neigh | Soft, short whinny |
| Cow Moo | Soft, short moo |
To choose a sound, replace the plugin entry with:
{
"plugins": [{ "package": "opencode-cachebell@0.6.0", "options": { "sound": "sheep-close" } }]
}
Use "pulse", "chime", "knock", "sheep-field", "sheep-close",
"cat-meow", "rooster-crow", "horse-neigh", "cow-moo", or false for silence.
"sheep" remains an alias for "sheep-field". Restart after changes.
On OpenCode 1, use the tuple form:
"plugin": [["opencode-cachebell@0.6.0", { "sound": "sheep-close" }]].
Sheep Field is an excerpt of a public-domain recording by earthcalling. Sheep Close is a CC0 recording by TheKingOfGeeks360, converted from its publicly available high-quality MP3 preview. Both are mono PCM WAVs for desktop playback. Cat Meow is an excerpt of a public-domain recording by Heismark. Rooster Crow is an excerpt of a public-domain recording by alys. Horse Neigh comes from a CC0 recording by Joseph Sardin. Cow Moo is excerpted from a CC0 recording by Joseph Sardin.
Timing
Defaults: 5 minutes for Claude, 30 minutes for GPT-5.6+. The clock starts with the model request, not when its answer finishes. Other models and custom cache durations need an override. These are estimates, not guaranteed cache hits.
Open sessions
On OpenCode 2, reminders now default to open session tabs only. Switching to another tab keeps the reminder; closing the tab or terminal stops it. With tabs disabled, only the currently viewed session is eligible. The persistent server does not play sounds on its own. The included TUI component loads automatically.
Set "sessionScope": "all" in the plugin's options to retain server-side
reminders for all tracked sessions, even after closing their tabs or clients.
The default is "sessionScope": "open". This setting applies to OpenCode 2;
OpenCode 1 retains its existing process-bound behavior.
Configuration and troubleshooting | npm | MIT
同类生态推荐
Smart Notify
opencode-smart-notify
Desktop notifications for OpenCode that stay quiet when auto-approve handles the request
Telegram Notify
@hamzaabili/opencode-telegram-notify
OpenCode plugin (v1 and v2): Telegram notifications for permissions, questions, idle and errors, with tap-only inline buttons (never auto-approve).
Notification
opencode-notification
OpenCode plugin for simple system notifications when permissions are needed, generation completes, or errors occur