Skip to content

Commit b02b91d

Browse files
numman-aliclaude
andcommitted
docs: add plugin versioning guide, recommend pinned versions
- Add "Plugin Versioning & Updates" section early in README - Explain why pinning is required (Bun lockfile pins "latest") - Show upgrade workflow: change version in config, restart - Provide cache-clearing command for stuck users - Update all config examples to use @4.0.0 - Remove redundant "Updating the Plugin" section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 40ac6d5 commit b02b91d

File tree

2 files changed

+45
-20
lines changed

2 files changed

+45
-20
lines changed

README.md

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,46 @@ Follow me on [X @nummanthinks](https://x.com/nummanthinks) for future updates an
5353

5454
**No npm install needed!** opencode automatically installs plugins when you add them to your config.
5555

56+
### Plugin Versioning & Updates
57+
58+
**⚠️ Important**: OpenCode does NOT auto-update plugins. You must pin versions for reliable updates.
59+
60+
#### Recommended: Pin the Version
61+
62+
```json
63+
"plugin": ["[email protected]"]
64+
```
65+
66+
**Why pin versions?** OpenCode uses Bun's lockfile which pins resolved versions. If you use `"opencode-openai-codex-auth"` without a version, it resolves to "latest" once and **never updates** even when new versions are published.
67+
68+
#### Upgrading to a New Version
69+
70+
Simply change the version in your config and restart OpenCode:
71+
72+
```json
73+
// Change from:
74+
"plugin": ["[email protected]"]
75+
76+
// To:
77+
"plugin": ["[email protected]"]
78+
```
79+
80+
OpenCode will detect the version mismatch and install the new version automatically.
81+
82+
#### If You're Stuck on an Old Version
83+
84+
If you previously used an unpinned version, clear the cache:
85+
86+
```bash
87+
rm -rf ~/.cache/opencode/node_modules ~/.cache/opencode/bun.lock
88+
```
89+
90+
Then restart OpenCode with a pinned version in your config.
91+
92+
Check [releases](https://github.com/numman-ali/opencode-openai-codex-auth/releases) for version history.
93+
94+
---
95+
5696
#### ⚠️ REQUIRED: Full Configuration (Only Supported Setup)
5797

5898
**IMPORTANT**: You MUST use the full configuration from [`config/full-opencode.json`](./config/full-opencode.json). Other configurations are not officially supported and may not work reliably.
@@ -68,7 +108,7 @@ Follow me on [X @nummanthinks](https://x.com/nummanthinks) for future updates an
68108
{
69109
"$schema": "https://opencode.ai/config.json",
70110
"plugin": [
71-
"opencode-openai-codex-auth"
111+
"opencode-openai-codex-auth@4.0.0"
72112
],
73113
"provider": {
74114
"openai": {
@@ -329,6 +369,7 @@ Codex backend caching is enabled automatically. When OpenCode supplies a `prompt
329369
```
330370

331371
**Why this doesn't work:**
372+
- Unpinned plugin version won't receive updates (see [Plugin Versioning](#plugin-versioning--updates))
332373
- GPT 5 models are temperamental and need proper configuration
333374
- Missing model metadata breaks OpenCode features
334375
- No support for usage limits or context compaction
@@ -350,22 +391,6 @@ Select "OpenAI" → "ChatGPT Plus/Pro (Codex Subscription)"
350391
351392
---
352393

353-
## Updating the Plugin
354-
355-
**⚠️ Important**: OpenCode does NOT auto-update plugins.
356-
357-
To install the latest version:
358-
359-
```bash
360-
# Clear plugin cache
361-
(cd ~ && sed -i.bak '/"opencode-openai-codex-auth"/d' .cache/opencode/package.json && rm -rf .cache/opencode/node_modules/opencode-openai-codex-auth)
362-
363-
# Restart OpenCode - it will reinstall latest version
364-
opencode
365-
```
366-
367-
Check [releases](https://github.com/numman-ali/opencode-openai-codex-auth/releases) for version history.
368-
369394
## Usage
370395

371396
If using the full configuration, select from the model picker in opencode, or specify via command line:
@@ -492,7 +517,7 @@ Apply settings to all models:
492517
```json
493518
{
494519
"$schema": "https://opencode.ai/config.json",
495-
"plugin": ["opencode-openai-codex-auth"],
520+
"plugin": ["opencode-openai-codex-auth@4.0.0"],
496521
"model": "openai/gpt-5-codex",
497522
"provider": {
498523
"openai": {
@@ -512,7 +537,7 @@ Create your own named variants in the model selector:
512537
```json
513538
{
514539
"$schema": "https://opencode.ai/config.json",
515-
"plugin": ["opencode-openai-codex-auth"],
540+
"plugin": ["opencode-openai-codex-auth@4.0.0"],
516541
"provider": {
517542
"openai": {
518543
"models": {

config/full-opencode.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://opencode.ai/config.json",
33
"plugin": [
4-
"opencode-openai-codex-auth"
4+
"opencode-openai-codex-auth@4.0.0"
55
],
66
"provider": {
77
"openai": {

0 commit comments

Comments
 (0)