@takara-ai/miru-code 0.1.0 → 0.1.1

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 CHANGED
@@ -8,15 +8,14 @@ Indexes a local directory, combines semantic search with BM25, RRF fusion, and c
8
8
 
9
9
  ## Install
10
10
 
11
- Miru ships **Bun as a dependency** so `miru` uses a compatible runtime after install. You still need [Node.js](https://nodejs.org) on your PATH for the install step (Bun’s `postinstall`); do not use `--ignore-scripts`.
11
+ Requires [Bun](https://bun.sh) 1.1+ on your PATH (`curl -fsSL https://bun.sh/install | bash`).
12
12
 
13
13
  ```bash
14
14
  # Run once without installing
15
- bunx @takara-ai/miru-code search "auth middleware" ./src
15
+ bun x @takara-ai/miru-code search "auth middleware" ./src
16
16
 
17
- # Global CLI (npm or bun)
17
+ # Global CLI
18
18
  bun add -g @takara-ai/miru-code
19
- # or: npm install -g @takara-ai/miru-code
20
19
  miru search "auth middleware" ./src
21
20
 
22
21
  # Library
@@ -78,19 +77,21 @@ Run with **no arguments** to start the stdio MCP server. It indexes the **curren
78
77
  ```bash
79
78
  bun /path/to/miru/src/cli.ts
80
79
  # or after bun add -g @takara-ai/miru-code: miru
81
- # or without installing: bunx @takara-ai/miru-code
80
+ # or without installing: bun x @takara-ai/miru-code
82
81
  ```
83
82
 
84
83
  **Tools:** `search`, `find_related` — pass `repo` only when querying a different path or git URL.
85
84
 
86
85
  Cursor `~/.cursor/mcp.json` (or project `.cursor/mcp.json`):
87
86
 
87
+ Use **`bun x`** (not `bunx` as the command) so Cursor does not pull the `bun` npm package postinstall, which breaks in MCP sandboxes:
88
+
88
89
  ```json
89
90
  {
90
91
  "mcpServers": {
91
92
  "miru": {
92
- "command": "bunx",
93
- "args": ["@takara-ai/miru-code"],
93
+ "command": "bun",
94
+ "args": ["x", "@takara-ai/miru-code"],
94
95
  "env": {
95
96
  "TAKARA_API_KEY": "your-takara-bearer-token",
96
97
  "MIRU_OPENAI_BASE_URL": "https://infer.dev.takara.ai/v1",
@@ -133,7 +134,7 @@ Local development (path to this repo):
133
134
  }
134
135
  ```
135
136
 
136
- No project path in `args` for `bunx` / global install — Cursor runs the server with `cwd` set to the open workspace, which becomes the default index. Put the bearer token in `env`; MCP will not read `.env.local` unless those vars are unset.
137
+ No project path in `args` for `bun x` / global install — Cursor runs the server with `cwd` set to the open workspace, which becomes the default index. Put the bearer token in `env`; MCP will not read `.env.local` unless those vars are unset.
137
138
 
138
139
  ## Library
139
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takara-ai/miru-code",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Miru (見る) — hybrid code search for agents. Bun, TypeScript, Takara embeddings.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -26,11 +26,8 @@
26
26
  "engines": {
27
27
  "bun": ">=1.1.0"
28
28
  },
29
- "trustedDependencies": [
30
- "bun"
31
- ],
32
29
  "bin": {
33
- "miru": "bin/miru.cjs"
30
+ "miru": "./src/cli.ts"
34
31
  },
35
32
  "main": "./src/index.ts",
36
33
  "types": "./src/index.ts",
@@ -38,7 +35,6 @@
38
35
  ".": "./src/index.ts"
39
36
  },
40
37
  "files": [
41
- "bin",
42
38
  "src",
43
39
  "README.md",
44
40
  "LICENSE"
@@ -60,7 +56,6 @@
60
56
  },
61
57
  "dependencies": {
62
58
  "@modelcontextprotocol/sdk": "^1.29.0",
63
- "bun": "^1.1.0",
64
59
  "ignore": "^7.0.5",
65
60
  "zod": "^4.4.3"
66
61
  },
package/bin/miru.cjs DELETED
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- const { spawnSync } = require("node:child_process");
5
- const fs = require("node:fs");
6
- const path = require("node:path");
7
-
8
- const packageRoot = path.join(__dirname, "..");
9
-
10
- function resolveBunExecutable() {
11
- const binName = process.platform === "win32" ? "bun.cmd" : "bun";
12
- const candidates = [
13
- path.join(packageRoot, "node_modules", ".bin", binName),
14
- path.join(packageRoot, "node_modules", "bun", "bin", process.platform === "win32" ? "bun.exe" : "bun"),
15
- ];
16
- for (const candidate of candidates) {
17
- if (fs.existsSync(candidate)) {
18
- return candidate;
19
- }
20
- }
21
- return binName;
22
- }
23
-
24
- const cli = path.join(packageRoot, "src", "cli.ts");
25
- const bun = resolveBunExecutable();
26
- const result = spawnSync(bun, [cli, ...process.argv.slice(2)], {
27
- stdio: "inherit",
28
- cwd: process.cwd(),
29
- env: process.env,
30
- shell: process.platform === "win32",
31
- });
32
-
33
- if (result.error) {
34
- console.error(
35
- "miru: failed to run Bun. Reinstall with lifecycle scripts enabled (do not use --ignore-scripts).",
36
- );
37
- console.error(result.error.message);
38
- process.exit(1);
39
- }
40
-
41
- process.exit(result.status ?? 1);