Skip to content

Commit c0d8db5

Browse files
griffinmartinfeisuzhu
authored andcommitted
docs: add @latest tag and cache clearing instructions (griffinmartin#180)
## Summary - Updates all plugin references in README.md and installation.md from `opencode-claude-auth` to `opencode-claude-auth@latest` so OpenCode always pulls the newest version on startup - Adds a troubleshooting row for "Plugin not updating to latest version" with the targeted cache delete command (`rm -rf ~/.cache/opencode/packages/opencode-claude-auth@latest/`) - Adds an "Upgrading" section to installation.md for users migrating from a pinned version These changes address recurring reports from griffinmartin#145 where users were stuck on cached v1.4.7 after v1.4.9 was released.
1 parent 236dcd4 commit c0d8db5

2 files changed

Lines changed: 20 additions & 9 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ Install the opencode-claude-auth plugin and configure it by following: https://r
3737

3838
```json
3939
{
40-
"plugin": ["opencode-claude-auth"]
40+
"plugin": ["opencode-claude-auth@latest"]
4141
}
4242
```
4343

44-
> No manual `npm install` is needed — OpenCode [automatically installs npm plugins using Bun at startup](https://opencode.ai/docs/plugins/#how-plugins-are-installed).
44+
> The `@latest` tag ensures OpenCode always pulls the newest version on startup. No manual `npm install` is needed — OpenCode [automatically installs npm plugins using Bun at startup](https://opencode.ai/docs/plugins/#how-plugins-are-installed).
4545
4646
2. **Use it** — just run OpenCode. The plugin handles auth automatically using your Claude Code credentials.
4747

@@ -111,6 +111,7 @@ If only one account is found, the switcher is hidden and the plugin uses it dire
111111
| Keychain read timed out | Restart Keychain Access (can happen on macOS Tahoe) |
112112
| "Credentials are unavailable or expired" | Run `claude` to refresh your Claude Code credentials |
113113
| "Extra usage is required for long context requests" | Your conversation exceeded 200k tokens. See [Long context (1M)](#long-context-1m) below |
114+
| Plugin not updating to latest version | Delete the cached package: `rm -rf ~/.cache/opencode/packages/opencode-claude-auth@latest/` then restart OpenCode |
114115

115116
### Diagnostic logging
116117

@@ -146,7 +147,7 @@ Add `enable1mContext` to any agent in your `opencode.json` (project-level or `~/
146147

147148
```json
148149
{
149-
"plugin": ["opencode-claude-auth"],
150+
"plugin": ["opencode-claude-auth@latest"],
150151
"agent": {
151152
"build": {
152153
"enable1mContext": true

installation.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ This will prompt you to log in and store credentials in Keychain (macOS) or `~/.
4646

4747
Edit the OpenCode configuration file at `~/.config/opencode/opencode.json`.
4848

49-
Add `opencode-claude-auth` to the `plugin` array:
49+
Add `opencode-claude-auth@latest` to the `plugin` array:
5050

5151
```json
5252
{
53-
"plugin": ["opencode-claude-auth"]
53+
"plugin": ["opencode-claude-auth@latest"]
5454
}
5555
```
5656

@@ -60,14 +60,14 @@ Or run this command to do it automatically:
6060
node -e "
6161
const fs = require('fs'), p = require('path').join(require('os').homedir(), '.config/opencode/opencode.json');
6262
const c = fs.existsSync(p) ? JSON.parse(fs.readFileSync(p,'utf8')) : {};
63-
c.plugin = [...new Set([...(Array.isArray(c.plugin) ? c.plugin : []), 'opencode-claude-auth'])];
63+
c.plugin = [...new Set([...(Array.isArray(c.plugin) ? c.plugin : []), 'opencode-claude-auth@latest'])];
6464
fs.mkdirSync(require('path').dirname(p), {recursive:true});
6565
fs.writeFileSync(p, JSON.stringify(c, null, 2));
66-
console.log('Added opencode-claude-auth to', p);
66+
console.log('Added opencode-claude-auth@latest to', p);
6767
"
6868
```
6969

70-
No manual `npm install` is needed — OpenCode [automatically installs npm plugins using Bun at startup](https://opencode.ai/docs/plugins/#how-plugins-are-installed).
70+
The `@latest` tag ensures OpenCode always pulls the newest version on startup. No manual `npm install` is needed — OpenCode [automatically installs npm plugins using Bun at startup](https://opencode.ai/docs/plugins/#how-plugins-are-installed).
7171

7272
### Step 2: Verification
7373

@@ -77,7 +77,17 @@ Verify the plugin was added:
7777
cat ~/.config/opencode/opencode.json
7878
```
7979

80-
You should see `opencode-claude-auth` in the `plugin` array.
80+
You should see `opencode-claude-auth@latest` in the `plugin` array.
81+
82+
## Upgrading
83+
84+
If you previously installed `opencode-claude-auth` without the `@latest` tag, update your config to use `opencode-claude-auth@latest` as shown above.
85+
86+
If the plugin isn't picking up a new version, clear the cached package and restart OpenCode:
87+
88+
```bash
89+
rm -rf ~/.cache/opencode/packages/opencode-claude-auth@latest/
90+
```
8191

8292
## Done
8393

0 commit comments

Comments
 (0)