v2.0.5
Installation
Fresh install
npm install -g https://github.com/Khip01/opencode-rich-presence/releases/download/v2.0.5/opencode-rich-presence-v2.0.5.tgz
opencode-rpc installThe installer creates a symlink at ~/.config/opencode/plugins/opencode-rich-presence.js so OpenCode loads the plugin as a local file (the package is distributed only via GitHub Releases, not the npm registry). It also adds @xhayper/discord-rpc to your local package.json and runs npm install so the worker can resolve its dependency.
The installer offers to register the plugin in opencode.jsonc automatically. You only need to add it manually if you decline the prompt:
{
"plugin": ["opencode-rich-presence"]
}Update from v2.0.x
opencode-rpc updateOr reinstall manually:
npm install -g https://github.com/Khip01/opencode-rich-presence/releases/download/v2.0.5/opencode-rich-presence-v2.0.5.tgzMigrating from v1.0.0
v1.0.0 used bash scripts (install, uninstall, restart-discord.sh) and was Linux-only.
- Back up your old
~/.config/opencode/discord-config.jsonif you have one. - Run the fresh install command above.
- Run
opencode-rpc installto set up the new config file. - Restore your settings into the new config (App ID, presence templates).
- Manually remove old v1.0.0 leftovers from
~/.config/opencode/:rm -rf ~/.config/opencode/plugins/opencode-dc-too-rich-presence.js rm -f ~/.config/opencode/discord-worker.mjs rm -f ~/.config/opencode/restart-discord.sh rm -f ~/.config/opencode/package.json ~/.config/opencode/package-lock.json rm -f ~/.config/opencode/CUSTOMIZATION.md ~/.config/opencode/README.md ~/.config/opencode/SETUP.md
- Restart OpenCode.
The plugin name changed from opencode-dc-too-rich-presence to opencode-rich-presence.
What's in v2.0.5
Fix: worker path
- Correct worker path in
src/shared/paths.js(../../worker/to../worker/) - Plugin no longer gets stuck with lock held but worker unable to spawn
Fix: install flow
- Install symlinks plugin entry to
~/.config/opencode/plugins/opencode-rich-presence.js - Install adds
@xhayper/discord-rpcto localpackage.jsonand runsnpm install - Install auto-registers plugin entry in
opencode.jsoncwith JSONC-tolerant parsing - Install skips "edit config" suggestion when Discord App ID is already set
Fix: uninstall flow
- Uninstall removes the local symlink
- Uninstall prunes
@xhayper/discord-rpcfrompackage.jsonvianpm install - Uninstall asks Y/N before deleting
discord-config.json, with timestamp backup if yes - Uninstall prints a code snippet for removing the plugin entry from
opencode.jsonc
Fix: CLI stability
prompt.jsuses a single long-lived readline interface (no more install hang, supports piped stdin)bin/opencode-rpc.jscallsprocess.exit(0)after command completes (no more post-Done hang)
Fix: JSONC parser
://in URLs no longer treated as a line comment (negative lookbehind on:)
Chore: docs
docs/TROUBLESHOOTING.mdadds root causes section and diagnostic checklistdocs/CLI-REFERENCE.mdrewritten to match real v2.0.5 CLI outputdocs/INSTALL.mdrewritten for symlink-based install flowdocs/ARCHITECTURE.mdadds plugin loading section and corrects subcommands tabledocs/PLATFORM-NOTES.mdremoves Discord Desktop process management sections
See CHANGELOG.md for full details.