opencode-rag-plugin 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReadMe.md +19 -18
- package/package.json +1 -1
package/ReadMe.md
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
Local-first RAG plugin for OpenCode — semantic code search powered by
|
|
4
4
|
embeddings and vector similarity.
|
|
5
5
|
|
|
6
|
-
**
|
|
7
|
-
If you find bugs, please create an issue.**
|
|
6
|
+
**Published on npm as [`opencode-rag-plugin`](https://www.npmjs.com/package/opencode-rag-plugin).**
|
|
8
7
|
|
|
9
8
|
## Features
|
|
10
9
|
|
|
@@ -69,9 +68,11 @@ Workspace Files
|
|
|
69
68
|
## Installation
|
|
70
69
|
|
|
71
70
|
```bash
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
# Install globally
|
|
72
|
+
npm install -g opencode-rag-plugin
|
|
73
|
+
|
|
74
|
+
# Or in your project
|
|
75
|
+
npm install --save-dev opencode-rag-plugin
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
### Dependencies
|
|
@@ -112,22 +113,22 @@ This extension consists of two main interfaces:
|
|
|
112
113
|
|
|
113
114
|
```bash
|
|
114
115
|
# Index the workspace incrementally
|
|
115
|
-
|
|
116
|
+
opencode-rag index
|
|
116
117
|
|
|
117
118
|
# Force full re-index (clears existing data first)
|
|
118
|
-
|
|
119
|
+
opencode-rag index --force
|
|
119
120
|
|
|
120
121
|
# Watch workspace and incrementally re-index on changes
|
|
121
|
-
|
|
122
|
+
opencode-rag index --watch
|
|
122
123
|
|
|
123
124
|
# Semantic search
|
|
124
|
-
|
|
125
|
+
opencode-rag query "How is authentication handled?"
|
|
125
126
|
|
|
126
127
|
# Limit results
|
|
127
|
-
|
|
128
|
+
opencode-rag query "error handling" --top-k 5
|
|
128
129
|
|
|
129
130
|
# Show indexing stats
|
|
130
|
-
|
|
131
|
+
opencode-rag status
|
|
131
132
|
|
|
132
133
|
# Example output:
|
|
133
134
|
# Indexed chunks: 1247
|
|
@@ -142,10 +143,10 @@ npx tsx src/cli.ts status
|
|
|
142
143
|
# Watch mode: off
|
|
143
144
|
|
|
144
145
|
# Clear all indexed data
|
|
145
|
-
|
|
146
|
+
opencode-rag clear
|
|
146
147
|
|
|
147
148
|
# Use custom config
|
|
148
|
-
|
|
149
|
+
opencode-rag index --config ./my-config.json
|
|
149
150
|
```
|
|
150
151
|
|
|
151
152
|
`index` is incremental by default. A sidecar manifest is stored at
|
|
@@ -159,7 +160,7 @@ store to avoid duplicates.
|
|
|
159
160
|
Start a watch session:
|
|
160
161
|
|
|
161
162
|
```bash
|
|
162
|
-
|
|
163
|
+
opencode-rag index --watch
|
|
163
164
|
```
|
|
164
165
|
|
|
165
166
|
The initial pass indexes the workspace, then watches for file changes. On each
|
|
@@ -215,8 +216,8 @@ npm run build
|
|
|
215
216
|
npm pack
|
|
216
217
|
opencode plugin .\opencode-rag-0.1.0.tgz
|
|
217
218
|
|
|
218
|
-
# Option 3: Install from npm
|
|
219
|
-
opencode plugin opencode-rag
|
|
219
|
+
# Option 3: Install from npm
|
|
220
|
+
opencode plugin opencode-rag-plugin
|
|
220
221
|
```
|
|
221
222
|
|
|
222
223
|
The plugin auto-detects configuration from `opencode-rag.json` or
|
|
@@ -274,7 +275,7 @@ suggestions to the message. Look for lines like
|
|
|
274
275
|
### Indexing
|
|
275
276
|
- The plugin auto-indexes changed files in the background (debounced 5s)
|
|
276
277
|
- If no results come back, the workspace may not be indexed yet —
|
|
277
|
-
run `opencode-rag index` from the terminal
|
|
278
|
+
run `opencode-rag index` from the terminal (or `npx opencode-rag-plugin`)
|
|
278
279
|
- Tiny files (under 1 KB), excluded extensions, and excluded directories
|
|
279
280
|
(`node_modules`, `.git`, `.opencode`, `dist`, etc.) are silently skipped
|
|
280
281
|
```
|
|
@@ -360,7 +361,7 @@ interface Chunker {
|
|
|
360
361
|
### Programmatic
|
|
361
362
|
|
|
362
363
|
```typescript
|
|
363
|
-
import { registerChunker } from "opencode-rag/library";
|
|
364
|
+
import { registerChunker } from "opencode-rag-plugin/library";
|
|
364
365
|
registerChunker(myChunker, [".rs"]);
|
|
365
366
|
```
|
|
366
367
|
|