@ast-index/cli 3.32.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.
package/bin/ast-index ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env node
2
+
3
+ "use strict";
4
+
5
+ const { execFileSync } = require("child_process");
6
+ const path = require("path");
7
+
8
+ const PLATFORMS = {
9
+ "darwin arm64": "@ast-index/cli-darwin-arm64",
10
+ "darwin x64": "@ast-index/cli-darwin-x64",
11
+ "linux x64": "@ast-index/cli-linux-x64",
12
+ "linux arm64": "@ast-index/cli-linux-arm64",
13
+ "win32 x64": "@ast-index/cli-win32-x64",
14
+ };
15
+
16
+ const key = `${process.platform} ${process.arch}`;
17
+ const pkg = PLATFORMS[key];
18
+
19
+ if (!pkg) {
20
+ console.error(
21
+ `Error: Unsupported platform ${process.platform} ${process.arch}.\n` +
22
+ `ast-index currently supports: darwin arm64, darwin x64, linux x64, linux arm64, win32 x64.\n` +
23
+ `Install manually from https://github.com/defendend/Claude-ast-index-search`
24
+ );
25
+ process.exit(1);
26
+ }
27
+
28
+ const bin = process.platform === "win32" ? "ast-index.exe" : "ast-index";
29
+
30
+ let binPath;
31
+ try {
32
+ binPath = path.resolve(
33
+ path.dirname(require.resolve(`${pkg}/package.json`)),
34
+ "bin",
35
+ bin
36
+ );
37
+ } catch {
38
+ console.error(
39
+ `Error: The platform package ${pkg} is not installed.\n` +
40
+ `Try reinstalling @ast-index/cli, or install the binary manually from\n` +
41
+ `https://github.com/defendend/Claude-ast-index-search`
42
+ );
43
+ process.exit(1);
44
+ }
45
+
46
+ try {
47
+ execFileSync(binPath, process.argv.slice(2), { stdio: "inherit" });
48
+ } catch (e) {
49
+ if (e.status !== null) {
50
+ process.exit(e.status);
51
+ }
52
+ throw e;
53
+ }
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@ast-index/cli",
3
+ "version": "3.32.2",
4
+ "description": "Fast AST-based symbol indexer for AI coding agents",
5
+ "bin": {
6
+ "ast-index": "./bin/ast-index"
7
+ },
8
+ "optionalDependencies": {
9
+ "@ast-index/cli-darwin-arm64": "3.32.2",
10
+ "@ast-index/cli-darwin-x64": "3.32.2",
11
+ "@ast-index/cli-linux-x64": "3.32.2",
12
+ "@ast-index/cli-linux-arm64": "3.32.2",
13
+ "@ast-index/cli-win32-x64": "3.32.2"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/defendend/Claude-ast-index-search"
18
+ },
19
+ "license": "MIT",
20
+ "engines": {
21
+ "node": ">=14"
22
+ }
23
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@ast-index/cli-darwin-arm64",
3
+ "version": "3.32.2",
4
+ "description": "darwin arm64 binary for @ast-index/cli",
5
+ "os": ["darwin"],
6
+ "cpu": ["arm64"],
7
+ "bin": {
8
+ "ast-index": "./bin/ast-index"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/defendend/Claude-ast-index-search"
13
+ },
14
+ "license": "MIT"
15
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@ast-index/cli-darwin-x64",
3
+ "version": "3.32.2",
4
+ "description": "darwin x64 binary for @ast-index/cli",
5
+ "os": ["darwin"],
6
+ "cpu": ["x64"],
7
+ "bin": {
8
+ "ast-index": "./bin/ast-index"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/defendend/Claude-ast-index-search"
13
+ },
14
+ "license": "MIT"
15
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@ast-index/cli-linux-arm64",
3
+ "version": "3.32.2",
4
+ "description": "linux arm64 binary for @ast-index/cli",
5
+ "os": ["linux"],
6
+ "cpu": ["arm64"],
7
+ "bin": {
8
+ "ast-index": "./bin/ast-index"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/defendend/Claude-ast-index-search"
13
+ },
14
+ "license": "MIT"
15
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@ast-index/cli-linux-x64",
3
+ "version": "3.32.2",
4
+ "description": "linux x64 binary for @ast-index/cli",
5
+ "os": ["linux"],
6
+ "cpu": ["x64"],
7
+ "bin": {
8
+ "ast-index": "./bin/ast-index"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/defendend/Claude-ast-index-search"
13
+ },
14
+ "license": "MIT"
15
+ }
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "@ast-index/cli-win32-x64",
3
+ "version": "3.32.2",
4
+ "description": "win32 x64 binary for @ast-index/cli",
5
+ "os": ["win32"],
6
+ "cpu": ["x64"],
7
+ "bin": {
8
+ "ast-index": "./bin/ast-index.exe"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/defendend/Claude-ast-index-search"
13
+ },
14
+ "license": "MIT"
15
+ }