Skip to content

Commit 62fa968

Browse files
feat(install): detect and reuse opencode.jsonc, pin plugin to @latest (#24)
Reuse an existing opencode.jsonc or opencode.json if present (comments preserved via a comment-aware node editor), else create opencode.json. Pin the plugin spec to the @latest dist-tag and upgrade older/pinned entries in place. jq remains a fallback for plain .json. Document .jsonc support and the @latest suffix in the README.
1 parent 2754e9d commit 62fa968

2 files changed

Lines changed: 292 additions & 95 deletions

File tree

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,19 @@ for Node.js 22+, and offers to set `CURSOR_API_KEY`. Flags:
4141
npm install @stablekernel/opencode-cursor
4242
```
4343

44-
Add to your `opencode.json`:
44+
Add to your `opencode.json` (or `opencode.jsonc` — both are supported):
4545

4646
```json
4747
{
4848
"$schema": "https://opencode.ai/config.json",
49-
"plugin": ["@stablekernel/opencode-cursor"]
49+
"plugin": ["@stablekernel/opencode-cursor@latest"]
5050
}
5151
```
5252

53+
The `@latest` suffix makes opencode re-resolve to the newest release on each
54+
startup. Drop it (`"@stablekernel/opencode-cursor"`) or pin a version
55+
(`"@stablekernel/opencode-cursor@1.2.3"`) if you prefer.
56+
5357
The plugin injects the `provider` block automatically. If you need explicit control:
5458

5559
```json

0 commit comments

Comments
 (0)