Turn OpenCode plugins and skills on and off.
One terminal screen, no files deleted, nothing to remember.
Built by DeSynkro with assistance from Opencode.
I made this script to switch my OpenCode plugins and skills off without moving things around by hand. I keep my plugins as symlinks inside OpenCode's config directory, so turning one off is just moving the link out and back. This script finds everything in plugins/ and skills/, shows it in one screen, and toggles it for you. Anything you turn off is moved to a .disabled folder in the same config directory.
OpenCode loads every plugin and skill in its config directory. Most of the time that is exactly what I want. Sometimes I want a quieter session: no reverse engineering tools, no extra skills in the model's list. Deleting them felt wrong, and remembering what I had removed felt worse, so I wrote a switch instead. Turn things off, turn them back on, nothing is lost.
A personal project. It does what I need and keeps improving.
- Node.js 18 or newer. It uses
node:prefixed modules. - A terminal. The switch draws an interactive screen, so it needs a real TTY.
No dependencies, no build step, no npm install. The whole tool is one Node script.
cd ~/Projects/Code/opencode-plugin-switch
./opsTo run it from anywhere, install the symlink once:
./ops --install
opsThat links ~/.local/bin/ops to this folder. Edit the file and the command picks it up. Remove the symlink to uninstall it.
| Key | Action |
|---|---|
up down, j k |
move |
space |
toggle the highlighted item |
a |
turn all on |
n |
turn all off |
enter |
apply the pending changes |
q, esc |
quit without changing anything |
Nothing moves until you press enter. Quitting drops the pending toggles.
After applying, ops prints what moved and asks whether to reload OpenCode. The default is no, so it never restarts a running session by surprise. Say yes, or run /reload inside OpenCode yourself.
~/.config/opencode/
├── plugins/ live plugins
├── skills/ live skills
└── .disabled/
├── plugins/ turned-off plugins
└── skills/ turned-off skills
Turning something off is one rename() into .disabled/. Turning it back on is the same rename() in reverse. The folder layout is the record, so there is no manifest to lose.
.disabled/ sits beside plugins/, never inside it, so a disabled plugin can not be picked up as a plugin OpenCode should load.
On a new machine there is nothing to set up. The first run creates plugins/, skills/ and both .disabled folders with mkdir -p semantics.
- Detects what you have: plugins as directories, symlinks or
.js/.tsfiles, and skills as folders with aSKILL.mdor flat.mdfiles. - One screen: Plugins and Skills in separate sections, with live on/off counts.
- Bulk switches:
aturns everything on,nturns everything off. - Safe moves: one rename per item, refused if the source is missing or the destination exists, and every refusal is printed.
- Symlink aware: links are moved as links, their targets are never touched.
- Fresh machine friendly: creates the config folders it needs.
- Script friendly:
ops --listprints a plain on/off list. - Optional reload: asks before running
opencode service restart.
./ops # interactive switch
./ops --list # plain on/off list
./ops --install # symlink into ~/.local/bin/ops
./ops --version
./ops --helpXDG_CONFIG_HOME is respected. If it is set, opencode/ is read from there instead of ~/.config/.
- Skills that a plugin injects at runtime. They are not files, so they appear and disappear with their plugin.
- Plugins installed with
opencode plugin add. Those live inopencode.jsonc, not inplugins/. - Project level folders. This tool only touches the global config directory.
Only immediate entries in ~/.config/opencode/plugins are managed. Plugins added with opencode plugin add live in opencode.jsonc.
It needs a folder with a SKILL.md inside, or to be a flat .md file directly in skills/.
Run /reload inside OpenCode, or opencode service restart. Plugin code changes always need a restart.
Use --list when piping or running from a script.
If you find this useful, you can support me on Ko-fi. You can find more of my work at desynkro.com.
MIT. See LICENSE.
- Built by DeSynkro
- Assisted by Opencode
- Made for my own setup and shared for anyone who finds it useful
Made with
