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
Copy file name to clipboardExpand all lines: README_EN.md
+42-6Lines changed: 42 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,45 @@ Interested in sub-agent monitoring? Check out [opencode-subagent-magazine](https
60
60
61
61
## 3. Installation
62
62
63
-
### 3.1 Option 1: OpenCode Command (recommended)
63
+
This plugin supports both opencode 1.x and 2.x.
64
+
65
+
### 3.1 opencode 2.x
66
+
67
+
opencode 2.x manages TUI plugins through the `plugins` array in `cli.json`; after adding an entry, it is installed and loaded automatically on the next start.
68
+
69
+
Create or edit `~/.config/opencode/cli.json` and append the following entry to the `plugins` array:
70
+
71
+
```json
72
+
{
73
+
"plugins": [
74
+
{
75
+
"package": "opencode-visual-cache@latest",
76
+
"options": {
77
+
"enabled": true
78
+
}
79
+
}
80
+
]
81
+
}
82
+
```
83
+
84
+
If the file already contains other plugins or settings, just append this object entry to the existing `plugins` array.
85
+
86
+
> **Note**: Do not install this plugin with `opencode plugin add`. That command writes the entry to `opencode.jsonc` (used for server plugins), which makes the server fail to load it:
87
+
>
88
+
> ```
89
+
> Plugin must export a default definition with an id and an effect or setup function.
90
+
> ```
91
+
>
92
+
> If you already installed it that way:
93
+
> 1. Open `~/.config/opencode/opencode.jsonc` and remove this plugin from the `plugins` array
94
+
> 2. Declare it in the `plugins` array of `cli.json` as described above
95
+
> 3. Restart opencode
96
+
97
+
> **Troubleshooting**: If the plugin does not take effect, clear the plugin cache and restart. The V2 cache lives in `~/.cache/opencode/npm`, and the V1 cache in `~/.cache/opencode/packages`.
98
+
99
+
### 3.2 opencode 1.x
100
+
101
+
**Option 1: Command (recommended)**
64
102
65
103
Press **`Ctrl + P`** in OpenCode to open the command palette, search **`install plugin`**, then type:
66
104
@@ -70,17 +108,15 @@ opencode-visual-cache@latest
70
108
71
109
Press Enter to install and configure automatically.
72
110
73
-
### 3.2 Option 2: Manual
111
+
**Option 2: Manual**
74
112
75
-
**1. Install the plugin**
113
+
1. Install the plugin
76
114
77
115
```bash
78
116
npm install -g opencode-visual-cache@latest
79
117
```
80
118
81
-
**2. Configure TUI plugin**
82
-
83
-
Create or edit `~/.config/opencode/tui.jsonc`:
119
+
2. Configure the TUI plugin — create or edit `~/.config/opencode/tui.jsonc`:
0 commit comments