semantiq-mcp 0.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/bin/semantiq +3 -0
- package/package.json +43 -0
- package/scripts/install.js +100 -0
package/bin/semantiq
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "semantiq-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Semantic code understanding for AI tools - One MCP Server for all AI coding assistants",
|
|
5
|
+
"bin": {
|
|
6
|
+
"semantiq": "bin/semantiq"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node scripts/install.js"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mcp",
|
|
13
|
+
"ai",
|
|
14
|
+
"code-search",
|
|
15
|
+
"semantic-search",
|
|
16
|
+
"tree-sitter",
|
|
17
|
+
"claude",
|
|
18
|
+
"cursor",
|
|
19
|
+
"copilot"
|
|
20
|
+
],
|
|
21
|
+
"author": "Nicolas <nicolas@adswizard.ai>",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "git+https://github.com/so-keyldzn/semantiq.git"
|
|
26
|
+
},
|
|
27
|
+
"homepage": "https://github.com/so-keyldzn/semantiq",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/so-keyldzn/semantiq/issues"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=16"
|
|
33
|
+
},
|
|
34
|
+
"os": [
|
|
35
|
+
"darwin",
|
|
36
|
+
"linux",
|
|
37
|
+
"win32"
|
|
38
|
+
],
|
|
39
|
+
"cpu": [
|
|
40
|
+
"x64",
|
|
41
|
+
"arm64"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const https = require('https');
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
const { execSync } = require('child_process');
|
|
7
|
+
|
|
8
|
+
const VERSION = require('../package.json').version;
|
|
9
|
+
const REPO = 'so-keyldzn/semantiq';
|
|
10
|
+
|
|
11
|
+
function getPlatform() {
|
|
12
|
+
const platform = process.platform;
|
|
13
|
+
const arch = process.arch;
|
|
14
|
+
|
|
15
|
+
const platforms = {
|
|
16
|
+
'darwin-x64': 'x86_64-apple-darwin',
|
|
17
|
+
'darwin-arm64': 'aarch64-apple-darwin',
|
|
18
|
+
'linux-x64': 'x86_64-unknown-linux-gnu',
|
|
19
|
+
'linux-arm64': 'aarch64-unknown-linux-gnu',
|
|
20
|
+
'win32-x64': 'x86_64-pc-windows-msvc',
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const key = `${platform}-${arch}`;
|
|
24
|
+
const target = platforms[key];
|
|
25
|
+
|
|
26
|
+
if (!target) {
|
|
27
|
+
console.error(`Unsupported platform: ${key}`);
|
|
28
|
+
console.error('Supported platforms:', Object.keys(platforms).join(', '));
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return { target, isWindows: platform === 'win32' };
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function downloadFile(url, dest) {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
const file = fs.createWriteStream(dest);
|
|
38
|
+
|
|
39
|
+
const request = (url) => {
|
|
40
|
+
https.get(url, (response) => {
|
|
41
|
+
if (response.statusCode === 302 || response.statusCode === 301) {
|
|
42
|
+
request(response.headers.location);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (response.statusCode !== 200) {
|
|
47
|
+
reject(new Error(`Failed to download: ${response.statusCode}`));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
response.pipe(file);
|
|
52
|
+
file.on('finish', () => {
|
|
53
|
+
file.close();
|
|
54
|
+
resolve();
|
|
55
|
+
});
|
|
56
|
+
}).on('error', reject);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
request(url);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function install() {
|
|
64
|
+
const { target, isWindows } = getPlatform();
|
|
65
|
+
const binName = isWindows ? 'semantiq.exe' : 'semantiq';
|
|
66
|
+
const archiveName = `semantiq-v${VERSION}-${target}.tar.gz`;
|
|
67
|
+
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${archiveName}`;
|
|
68
|
+
|
|
69
|
+
const binDir = path.join(__dirname, '..', 'bin');
|
|
70
|
+
const binPath = path.join(binDir, binName);
|
|
71
|
+
const archivePath = path.join(binDir, archiveName);
|
|
72
|
+
|
|
73
|
+
console.log(`Downloading Semantiq v${VERSION} for ${target}...`);
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
await downloadFile(url, archivePath);
|
|
77
|
+
|
|
78
|
+
// Extract
|
|
79
|
+
if (isWindows) {
|
|
80
|
+
execSync(`tar -xzf "${archivePath}" -C "${binDir}"`, { stdio: 'inherit' });
|
|
81
|
+
} else {
|
|
82
|
+
execSync(`tar -xzf "${archivePath}" -C "${binDir}"`, { stdio: 'inherit' });
|
|
83
|
+
fs.chmodSync(binPath, 0o755);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Cleanup
|
|
87
|
+
fs.unlinkSync(archivePath);
|
|
88
|
+
|
|
89
|
+
console.log('Semantiq installed successfully!');
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error('Failed to install Semantiq:', error.message);
|
|
92
|
+
console.error('');
|
|
93
|
+
console.error('Alternative installation methods:');
|
|
94
|
+
console.error(' brew install so-keyldzn/tap/semantiq');
|
|
95
|
+
console.error(' cargo install semantiq');
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
install();
|