@insforge/install 0.0.49 → 0.0.50
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/dist/index.js +48 -7
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -11,8 +11,9 @@ import {
|
|
|
11
11
|
|
|
12
12
|
import yargs from "yargs";
|
|
13
13
|
import { hideBin } from "yargs/helpers";
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
import pc from "picocolors";
|
|
16
|
+
import select from "@inquirer/select";
|
|
16
17
|
var { green, red, yellow, cyan } = pc;
|
|
17
18
|
|
|
18
19
|
// Section header helper
|
|
@@ -35,9 +36,25 @@ import {
|
|
|
35
36
|
╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
36
37
|
`;
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
// Map client names to display names for better UX
|
|
40
|
+
const clientDisplayNames = {
|
|
41
|
+
"claude-code": "Claude Code",
|
|
42
|
+
"cursor": "Cursor",
|
|
43
|
+
"windsurf": "Windsurf",
|
|
44
|
+
"cline": "Cline",
|
|
45
|
+
"roocode": "Roo Code",
|
|
46
|
+
"trae": "Trae",
|
|
47
|
+
"codex": "Codex",
|
|
48
|
+
"copilot": "GitHub Copilot",
|
|
49
|
+
"qoder": "Qoder",
|
|
50
|
+
"antigravity": "Antigravity",
|
|
51
|
+
"kiro": "Kiro"
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
function printPostInstallMessage(clientName) {
|
|
55
|
+
const displayName = clientDisplayNames[clientName] || clientName;
|
|
39
56
|
console.log(INSFORGE_LOGO);
|
|
40
|
-
console.log(green(
|
|
57
|
+
console.log(green(`✓ InsForge MCP is now configured for ${cyan(displayName)}!`));
|
|
41
58
|
console.log();
|
|
42
59
|
console.log('Next steps:');
|
|
43
60
|
console.log(' 1. Restart your coding agent to load InsForge');
|
|
@@ -59,7 +76,7 @@ import {
|
|
|
59
76
|
return yargs2.option("client", {
|
|
60
77
|
type: "string",
|
|
61
78
|
description: "Client to use for installation",
|
|
62
|
-
demandOption:
|
|
79
|
+
demandOption: false,
|
|
63
80
|
choices: clientNames
|
|
64
81
|
}).option("env", {
|
|
65
82
|
type: "string",
|
|
@@ -71,11 +88,35 @@ import {
|
|
|
71
88
|
default: false
|
|
72
89
|
});
|
|
73
90
|
}
|
|
91
|
+
|
|
74
92
|
async function handler(argv) {
|
|
75
|
-
|
|
76
|
-
|
|
93
|
+
let selectedClient = argv.client;
|
|
94
|
+
|
|
95
|
+
// If no client specified, show interactive selection
|
|
96
|
+
if (!selectedClient) {
|
|
97
|
+
console.log();
|
|
98
|
+
console.log(LINE);
|
|
99
|
+
console.log(` ${cyan('InsForge MCP Installer')}`);
|
|
100
|
+
console.log(LINE);
|
|
101
|
+
console.log();
|
|
102
|
+
|
|
103
|
+
selectedClient = await select({
|
|
104
|
+
message: 'Select your AI coding client:',
|
|
105
|
+
choices: clientNames.map(name => ({
|
|
106
|
+
name: clientDisplayNames[name] || name,
|
|
107
|
+
value: name
|
|
108
|
+
}))
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Validate client
|
|
113
|
+
if (!clientNames.includes(selectedClient)) {
|
|
114
|
+
logger.error(`Invalid client: ${selectedClient}. Available clients: ${clientNames.join(", ")}`);
|
|
77
115
|
return;
|
|
78
116
|
}
|
|
117
|
+
|
|
118
|
+
// Update argv.client with selected value for downstream use
|
|
119
|
+
argv.client = selectedClient;
|
|
79
120
|
const envVars = {};
|
|
80
121
|
if (argv.env && argv.env.length > 0) {
|
|
81
122
|
for (const envVar of argv.env) {
|
|
@@ -319,7 +360,7 @@ alwaysApply: true
|
|
|
319
360
|
}
|
|
320
361
|
|
|
321
362
|
printHeader('Setup Complete!');
|
|
322
|
-
printPostInstallMessage();
|
|
363
|
+
printPostInstallMessage(argv.client);
|
|
323
364
|
} catch (e) {
|
|
324
365
|
logger.error(red(e.message));
|
|
325
366
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@insforge/install",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.50",
|
|
4
4
|
"description": "CLI tool for installing Insforge MCP servers across different AI clients",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"start": "node dist/index.js"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
+
"@inquirer/select": "^4.4.2",
|
|
14
15
|
"consola": "^3.2.3",
|
|
15
16
|
"node-fetch": "^3.3.2",
|
|
16
17
|
"picocolors": "^1.0.0",
|