indexio 0.1.2 → 0.1.4
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 +21 -3
- package/install.js +33 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
# indexio
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/indexio)
|
|
4
|
+
[](https://github.com/IOServicesLabs/indexio/blob/main/LICENSE)
|
|
5
|
+
|
|
3
6
|
Code search, impact analysis and MCP server for AI coding agents, as one binary.
|
|
7
|
+
It indexes your repositories once and answers a query in milliseconds, over the Model
|
|
8
|
+
Context Protocol (MCP) and an HTTP API. No database and no external service.
|
|
4
9
|
|
|
5
10
|
```bash
|
|
6
11
|
npm install -g indexio # or: npx indexio --help
|
|
7
12
|
indexio add ~/code # index every git repository under a folder
|
|
13
|
+
indexio search parse_config # search it
|
|
8
14
|
indexio setup claude # register the MCP server with Claude Code
|
|
9
15
|
indexio hook install # route reads and greps through the index
|
|
10
16
|
```
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
Agents get `code_search`, `code_grep`, `find_symbol`, `who_calls`, `file_outline`,
|
|
19
|
+
`read_span`, `impact_of_symbol`, `impact_of_diff` and `recall` as tools. On real traffic
|
|
20
|
+
that cuts what the tools return by 50 to 90 percent against the built-in Read, Grep and
|
|
21
|
+
Glob, and a lookup takes single-digit milliseconds instead of tens.
|
|
22
|
+
|
|
23
|
+
This package downloads the prebuilt binary for your platform from the matching GitHub
|
|
24
|
+
release at install time and verifies its SHA-256. Nothing is sent anywhere: the index is a
|
|
25
|
+
set of files in `~/.indexio`. Supported: Linux and macOS (x86_64, arm64), Windows (x86_64).
|
|
26
|
+
`git` must be on the PATH.
|
|
27
|
+
|
|
28
|
+
If the download is blocked, install the binary another way and the shim will use it:
|
|
29
|
+
https://github.com/IOServicesLabs/indexio#install
|
|
30
|
+
|
|
31
|
+
Documentation and source: https://github.com/IOServicesLabs/indexio
|
|
32
|
+
Licence: Apache-2.0
|
package/install.js
CHANGED
|
@@ -36,6 +36,38 @@ function fetch(url, redirects = 5) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
/// Unpack `file` into `dir`. On Windows the `tar` first on PATH is often
|
|
40
|
+
/// Git's GNU tar, which reads `C:\...` as a remote host ("Cannot connect
|
|
41
|
+
/// to C"), so the system bsdtar is called by its full path and PowerShell's
|
|
42
|
+
/// Expand-Archive is the fallback. Elsewhere plain `tar` handles both.
|
|
43
|
+
function extract(file, dir) {
|
|
44
|
+
const attempts = [];
|
|
45
|
+
if (process.platform === "win32") {
|
|
46
|
+
const sysTar = path.join(process.env.SystemRoot || "C:\Windows", "System32", "tar.exe");
|
|
47
|
+
if (fs.existsSync(sysTar)) {
|
|
48
|
+
attempts.push(() => execFileSync(sysTar, ["-xf", file, "-C", dir], { stdio: "inherit" }));
|
|
49
|
+
}
|
|
50
|
+
attempts.push(() =>
|
|
51
|
+
execFileSync(
|
|
52
|
+
"powershell",
|
|
53
|
+
["-NoProfile", "-NonInteractive", "-Command", `Expand-Archive -LiteralPath '${file}' -DestinationPath '${dir}' -Force`],
|
|
54
|
+
{ stdio: "inherit" }
|
|
55
|
+
)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
attempts.push(() => execFileSync("tar", ["-xf", file, "-C", dir], { stdio: "inherit" }));
|
|
59
|
+
let last;
|
|
60
|
+
for (const run of attempts) {
|
|
61
|
+
try {
|
|
62
|
+
run();
|
|
63
|
+
return;
|
|
64
|
+
} catch (e) {
|
|
65
|
+
last = e;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
throw last;
|
|
69
|
+
}
|
|
70
|
+
|
|
39
71
|
async function main() {
|
|
40
72
|
if (process.env.INDEXIO_SKIP_DOWNLOAD) return;
|
|
41
73
|
if (!platform || !arch) {
|
|
@@ -53,8 +85,7 @@ async function main() {
|
|
|
53
85
|
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "indexio-"));
|
|
54
86
|
const file = path.join(tmp, `${name}.${ext}`);
|
|
55
87
|
fs.writeFileSync(file, archive);
|
|
56
|
-
|
|
57
|
-
execFileSync("tar", ["-xf", file, "-C", tmp], { stdio: "inherit" });
|
|
88
|
+
extract(file, tmp);
|
|
58
89
|
fs.mkdirSync(vendor, { recursive: true });
|
|
59
90
|
fs.copyFileSync(path.join(tmp, name, path.basename(exe)), exe);
|
|
60
91
|
fs.chmodSync(exe, 0o755);
|