opencode-codebase-index 0.13.1 → 0.13.2

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.
@@ -10,7 +10,7 @@
10
10
  "name": "codebase-index",
11
11
  "description": "Semantic code search and codebase graph tools for Claude Code",
12
12
  "source": "./",
13
- "version": "0.13.1"
13
+ "version": "0.13.2"
14
14
  }
15
15
  ]
16
16
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-index",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Semantic code search and codebase graph tools for Claude Code",
5
5
  "displayName": "Codebase Index",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-index",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Semantic code search and codebase graph tools for Codex",
5
5
  "author": {
6
6
  "name": "Kenneth",
package/README.md CHANGED
@@ -99,6 +99,15 @@ The plugin includes:
99
99
  - `.mcp.json` running the published `opencode-codebase-index` CLI via `npx … --host codex`, so a git marketplace install works without a local build
100
100
  - `.agents/plugins/marketplace.json` so this repo can act as a Codex marketplace source
101
101
 
102
+ For local plugin development from this checkout, build and link the local MCP bin once:
103
+
104
+ ```bash
105
+ npm run build:ts
106
+ npm run dev:link-mcp
107
+ ```
108
+
109
+ After that, the normal `.mcp.json` command also works when Codex starts the plugin from this repository.
110
+
102
111
  ## 🧩 Claude Code Plugin
103
112
  Install once for Claude Code sessions and get skill guidance plus MCP tools in one manifest.
104
113
 
@@ -155,7 +164,7 @@ Use the same semantic search from any MCP-compatible client. Index once, search
155
164
  "mcpServers": {
156
165
  "codebase-index": {
157
166
  "command": "npx",
158
- "args": ["opencode-codebase-index-mcp", "--project", "/path/to/your/project"]
167
+ "args": ["-y", "--package", "opencode-codebase-index", "opencode-codebase-index-mcp", "--project", "/path/to/your/project"]
159
168
  }
160
169
  }
161
170
  }
@@ -167,7 +176,7 @@ Use the same semantic search from any MCP-compatible client. Index once, search
167
176
  "mcpServers": {
168
177
  "codebase-index": {
169
178
  "command": "npx",
170
- "args": ["opencode-codebase-index-mcp", "--project", "/path/to/your/project"]
179
+ "args": ["-y", "--package", "opencode-codebase-index", "opencode-codebase-index-mcp", "--project", "/path/to/your/project"]
171
180
  }
172
181
  }
173
182
  }
@@ -175,14 +184,16 @@ Use the same semantic search from any MCP-compatible client. Index once, search
175
184
 
176
185
  3. **CLI options**
177
186
  ```bash
178
- npx opencode-codebase-index-mcp --project /path/to/repo # specify project root
179
- npx opencode-codebase-index-mcp --config /path/to/config # custom config file
180
- npx opencode-codebase-index-mcp # uses current directory
187
+ npx -y --package opencode-codebase-index opencode-codebase-index-mcp --project /path/to/repo
188
+ npx -y --package opencode-codebase-index opencode-codebase-index-mcp --config /path/to/config
189
+ npx -y --package opencode-codebase-index opencode-codebase-index-mcp
181
190
  ```
182
191
 
183
192
  The MCP server exposes all 12 tools (`codebase_search`, `codebase_peek`, `find_similar`, `implementation_lookup`, `call_graph`, `call_graph_path`, `pr_impact`, `index_codebase`, `index_status`, `index_health_check`, `index_metrics`, `index_logs`) and 5 prompts (`search`, `find`, `definition`, `index`, `status`).
184
193
 
185
- The MCP dependencies (`@modelcontextprotocol/sdk`, `zod`) are optional peer dependencies they're only needed if you use the MCP server.
194
+ The MCP dependencies (`@modelcontextprotocol/sdk`, `zod`) ship with the package so published `npx --package opencode-codebase-index` launches work in clean MCP clients.
195
+
196
+ If you are testing the MCP command from inside this repository checkout and see `opencode-codebase-index-mcp: command not found`, run `npm run build:ts && npm run dev:link-mcp`. That adds the local bin shim expected by `npx` without changing the published MCP config.
186
197
 
187
198
  ## 🔍 See It In Action
188
199
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codebase-index",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
4
4
  "description": "Semantic codebase indexing and search for OpenCode - find code by meaning, not just keywords",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -47,6 +47,7 @@
47
47
  "eval:ci": "npx tsx src/cli.ts eval run --reindex --ci --budget benchmarks/budgets/default.json --against benchmarks/baselines/eval-baseline-summary.json",
48
48
  "eval:ci:ollama": "npx tsx src/cli.ts eval run --config .github/eval-ollama-config.json --reindex --ci --budget benchmarks/budgets/default.json --against benchmarks/baselines/eval-baseline-summary.json",
49
49
  "eval:compare": "npx tsx src/cli.ts eval compare",
50
+ "dev:link-mcp": "node scripts/link-local-mcp-bin.mjs",
50
51
  "test": "vitest",
51
52
  "pretest:run": "node scripts/run-build-native-with-rustflags.mjs",
52
53
  "test:run": "vitest run",
@@ -61,6 +62,7 @@
61
62
  "native/*.node",
62
63
  "skill",
63
64
  "commands",
65
+ "scripts/link-local-mcp-bin.mjs",
64
66
  ".codex-plugin",
65
67
  ".claude-plugin",
66
68
  ".mcp.json",
@@ -0,0 +1,25 @@
1
+ import { existsSync, mkdirSync, rmSync, symlinkSync, writeFileSync } from "fs";
2
+ import { dirname, relative, resolve } from "path";
3
+ import { fileURLToPath } from "url";
4
+
5
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
6
+ const cliPath = resolve(root, "dist/cli.js");
7
+ const binDir = resolve(root, "node_modules/.bin");
8
+ const binPath = resolve(binDir, "opencode-codebase-index-mcp");
9
+
10
+ if (!existsSync(cliPath)) {
11
+ console.error("dist/cli.js is missing. Run `npm run build:ts` first.");
12
+ process.exit(1);
13
+ }
14
+
15
+ mkdirSync(binDir, { recursive: true });
16
+ rmSync(binPath, { force: true });
17
+ rmSync(`${binPath}.cmd`, { force: true });
18
+
19
+ if (process.platform === "win32") {
20
+ writeFileSync(`${binPath}.cmd`, `@echo off\r\nnode "%~dp0\\..\\..\\dist\\cli.js" %*\r\n`, "utf-8");
21
+ } else {
22
+ symlinkSync(relative(dirname(binPath), cliPath), binPath);
23
+ }
24
+
25
+ console.log(`Linked ${binPath} -> ${cliPath}`);