You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5d90fe3
Browse filesBrowse the repository at this point in the historyBrowse files
A button in the OpenCode desktop session header that shows what is installed and lets you turn plugins on and off. Skills are listed too — clicking one inserts `@skill-id` into the prompt.

6
+
**Turn plugins on and off from the conversation, without editing `opencode.jsonc`.** Click the puzzle icon in the session header and every plugin gets a switch.
6
7
7
-
## What it does
8
+
The app's own switch only manages a plugin's desktop UI. Server-side plugins — sandboxes, memory, notification hooks — have no UI, so they get no switch at all, and the only way to disable one is to add a `"-name"` entry to the config by hand. This gives them all a real switch, applied globally and hot-reloaded in about two seconds.
8
9
9
-
-**Plugins** — one row per plugin in your global config, with a one-line description taken from the OpenDock catalog, and a switch. Turning one off appends `"-<plugin-id>"` to the `plugins` array; turning it back on removes that line. No restart: the server reloads in about a second.
10
-
- Off plugins stay in the list, greyed out, so you can turn them back on without hunting for the package name.
11
-
- A plugin that failed to load shows its error rather than disappearing.
12
-
-**Skills** — click a row to insert `@<skill-id>` into the prompt. Skills are loaded by the agent, so the insert is a mention, not a call.
10
+

13
11
14
12
## Install
15
13
16
14
```sh
17
15
opencode plugin add opencode-plugin-toggle
18
16
```
19
17
20
-
Then click the puzzle icon at the right end of the session header.
18
+
Click the puzzle icon at the right end of the session header.
19
+
20
+
## What you can do
21
21
22
-
## How the toggling works
22
+
-**Enable / disable any plugin**, including ones with no UI of their own. Disabled plugins stay in the list, greyed out, ready to switch back on.
23
+
-**See why a plugin failed** — the runtime error is shown under the name instead of a bare "failed" badge.
24
+
-**Insert a skill** into the prompt box: click a skill and `@skill-id` is appended and focused, so you never mistype an id.
25
+
- Each plugin shows its one-line description, taken from the OpenDock catalog.
23
26
24
-
OpenCode disables a package plugin when the global `plugins` array contains `"-<plugin-id>"`**after** the package entry. This plugin appends the line at the end for that reason, and removes it cleanly when re-enabled. The config file is parsed before and after every write and the change is rejected unless it matches exactly, with the previous file kept as `opencode.json*.toggle-backup`.
27
+
## Requirements
25
28
26
-
## Limitations
29
+
- OpenCode desktop 2.2 or newer.
27
30
28
-
- Global config only. The desktop app has no per-project plugin toggle.
29
-
- Plugin-contributed skills cannot be switched off one by one; turn off the whole plugin instead.
31
+
## How it works
32
+
33
+
- Disabling writes `"-<plugin-id>"` to the `plugins` array in your **global** config, at the end of the array — the order matters, a disabled entry placed before the package entry does not take effect. Re-enabling removes that line, leaving the rest of the file untouched, formatting and comments included.
34
+
-**The switch is global, not per-session.** Plugins load once per server process, and one process serves every session, so there is no per-conversation isolation to toggle.
35
+
- Disabling a plugin does not rewind what it already did in the current conversation; it stops participating from that moment. Start a new session for a clean slate.
36
+
- Skills are not toggled. Clicking one inserts its id into the message; the model loads the skill when it sees `@skill-id`.
37
+
- Config writes are validated before they land: the file is re-parsed and compared, and nothing is written if the result is not exactly the intended change.
30
38
31
39
## Development
32
40
@@ -35,6 +43,8 @@ npm install
35
43
npm run build # bundles the GUI into dist/gui-experimental.cjs
36
44
```
37
45
46
+
Point `plugins` in `~/.config/opencode/opencode.jsonc` at this directory to load it from source.
0 commit comments