Use RTK automatically inside OpenCode by installing a local openrtk plugin.
This package installs a user-level OpenCode plugin in ~/.config/opencode/plugins/openrtk. It does not modify your application repositories.
After you publish this repo, users can install it with one command:
curl -fsSL https://raw.githubusercontent.com/DongHyunnn/openrtk-opencode-plugin/main/install.sh | bash -s -- --install-rtkIf rtk is already installed:
curl -fsSL https://raw.githubusercontent.com/DongHyunnn/openrtk-opencode-plugin/main/install.sh | bashClone the repo and run the installer:
git clone https://github.com/DongHyunnn/openrtk-opencode-plugin.git
cd openrtk-opencode-plugin
./install.sh --install-rtkIf rtk is already installed, you can skip the RTK bootstrap step:
./install.shWhat the installer does:
- optionally installs
rtkinto~/.local/bin - installs the
openrtkplugin into~/.config/opencode/plugins/openrtk - patches
~/.config/opencode/opencode.json - creates a timestamped backup before editing config
Restart OpenCode, then run:
git status
rtk gain --historySuccess looks like this:
git statusprints RTK-style compact outputrtk gain --historyshows a freshrtk git statusentry
Common wrappers included by default:
git,ghcat,rg,grep,ls,tree,find,diffnpm,pnpm,vitest,tsc,vue-tsc,eslint,prettier,playwright,prismadocker,kubectl,curl,wgetpytest,ruff,pip,uv,go,golangci-lint,cargo,mix,iex
Behavior depends on which underlying tools are installed on the machine.
Remove the plugin directory and the plugin entry from ~/.config/opencode/opencode.json, then restart OpenCode:
rm -rf ~/.config/opencode/plugins/openrtkplugin/- the OpenCode plugin filesinstall.sh- installer for end users