@insforge/install 0.0.20 → 0.0.21
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 +18 -1
- package/dist/index.js +12 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,6 +14,9 @@ npx @insforge/install --client roocode --env API_KEY=YOUR_API_KEY --env API_BASE
|
|
|
14
14
|
npx @insforge/install --client codex --env API_KEY=YOUR_API_KEY --env API_BASE_URL=http://localhost:7130
|
|
15
15
|
npx @insforge/install --client trae --env API_KEY=YOUR_API_KEY --env API_BASE_URL=http://localhost:7130
|
|
16
16
|
|
|
17
|
+
# Install dev version for testing (uses @insforge/mcp@dev)
|
|
18
|
+
npx @insforge/install --client cursor --env API_KEY=YOUR_API_KEY --env API_BASE_URL=http://localhost:7130 --dev
|
|
19
|
+
|
|
17
20
|
# With custom base URL (e.g., production server)
|
|
18
21
|
npx @insforge/install --client cursor --env API_KEY=YOUR_API_KEY --env API_BASE_URL=https://api.insforge.com
|
|
19
22
|
```
|
|
@@ -38,6 +41,7 @@ npx @insforge/install --client cursor --env API_KEY=YOUR_API_KEY --env API_BASE_
|
|
|
38
41
|
--env KEY=VALUE Environment variables (can be used multiple times)
|
|
39
42
|
API_KEY is required
|
|
40
43
|
API_BASE_URL is optional (default: http://localhost:7130)
|
|
44
|
+
--dev Install dev version (@insforge/mcp@dev) instead of latest
|
|
41
45
|
```
|
|
42
46
|
|
|
43
47
|
## Examples
|
|
@@ -49,6 +53,9 @@ npx @insforge/install --client claude-code --env API_KEY=your-api-key-here --env
|
|
|
49
53
|
|
|
50
54
|
# Install for Windsurf with production server
|
|
51
55
|
npx @insforge/install --client windsurf --env API_KEY=your-api-key --env API_BASE_URL=https://api.insforge.com
|
|
56
|
+
|
|
57
|
+
# Install dev version for internal testing
|
|
58
|
+
npx @insforge/install --client cursor --env API_KEY=your-api-key --env API_BASE_URL=http://localhost:7130 --dev
|
|
52
59
|
```
|
|
53
60
|
|
|
54
61
|
### What This Does
|
|
@@ -56,10 +63,20 @@ npx @insforge/install --client windsurf --env API_KEY=your-api-key --env API_BAS
|
|
|
56
63
|
The installer will:
|
|
57
64
|
1. Create or update the MCP configuration file for your chosen client
|
|
58
65
|
2. Add the Insforge MCP server with your API credentials
|
|
59
|
-
3. Configure it to run via `npx @insforge/mcp@latest`
|
|
66
|
+
3. Configure it to run via `npx @insforge/mcp@latest` (or `@insforge/mcp@dev` with `--dev` flag)
|
|
60
67
|
|
|
61
68
|
After installation, restart your AI client to load the Insforge MCP server.
|
|
62
69
|
|
|
70
|
+
### Dev vs Production Versions
|
|
71
|
+
|
|
72
|
+
- **Production** (default): `npx @insforge/install --client <client> ...`
|
|
73
|
+
- Installs `@insforge/mcp@latest` - stable, tested version
|
|
74
|
+
- Recommended for general use
|
|
75
|
+
|
|
76
|
+
- **Development** (`--dev` flag): `npx @insforge/install --client <client> ... --dev`
|
|
77
|
+
- Installs `@insforge/mcp@dev` - latest features, may be unstable
|
|
78
|
+
- For team testing and early access to new features
|
|
79
|
+
|
|
63
80
|
## License
|
|
64
81
|
|
|
65
82
|
MIT
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
type: "string",
|
|
25
25
|
description: "Environment variables as key=value pairs (can be used multiple times). API_KEY is required.",
|
|
26
26
|
array: true
|
|
27
|
+
}).option("dev", {
|
|
28
|
+
type: "boolean",
|
|
29
|
+
description: "Install dev version (@insforge/mcp@dev) instead of latest",
|
|
30
|
+
default: false
|
|
27
31
|
});
|
|
28
32
|
}
|
|
29
33
|
async function handler(argv) {
|
|
@@ -51,6 +55,7 @@ import {
|
|
|
51
55
|
envVars.API_BASE_URL = "http://localhost:7130";
|
|
52
56
|
}
|
|
53
57
|
const name = "insforge";
|
|
58
|
+
const mcpVersion = argv.dev ? "@insforge/mcp@dev" : "@insforge/mcp@latest";
|
|
54
59
|
const ready = true; // Auto-confirm for simplified installation
|
|
55
60
|
if (ready) {
|
|
56
61
|
try {
|
|
@@ -84,8 +89,8 @@ import {
|
|
|
84
89
|
}
|
|
85
90
|
|
|
86
91
|
// Now add the MCP server
|
|
87
|
-
const command = `"${claudePath}" mcp add ${name} ${envArgs} -- npx -y
|
|
88
|
-
logger.info(
|
|
92
|
+
const command = `"${claudePath}" mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`;
|
|
93
|
+
logger.info(`Adding insforge MCP server (${mcpVersion})...`);
|
|
89
94
|
execSync(command, {
|
|
90
95
|
stdio: 'inherit',
|
|
91
96
|
shell: true
|
|
@@ -117,8 +122,8 @@ import {
|
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
// Now add the MCP server using codex CLI with --env flags
|
|
120
|
-
const command = `codex mcp add ${name} ${envArgs} -- npx -y
|
|
121
|
-
logger.info(
|
|
125
|
+
const command = `codex mcp add ${name} ${envArgs} -- npx -y ${mcpVersion}`;
|
|
126
|
+
logger.info(`Adding insforge MCP server (${mcpVersion})...`);
|
|
122
127
|
execSync(command, {
|
|
123
128
|
stdio: 'inherit',
|
|
124
129
|
shell: true
|
|
@@ -131,7 +136,7 @@ import {
|
|
|
131
136
|
if (!config.mcpServers) config.mcpServers = {};
|
|
132
137
|
config.mcpServers[name] = {
|
|
133
138
|
command: "npx",
|
|
134
|
-
args: ["-y",
|
|
139
|
+
args: ["-y", mcpVersion],
|
|
135
140
|
env: {
|
|
136
141
|
API_KEY: envVars.API_KEY,
|
|
137
142
|
API_BASE_URL: envVars.API_BASE_URL
|
|
@@ -142,7 +147,7 @@ import {
|
|
|
142
147
|
if (!config.mcpServers) config.mcpServers = {};
|
|
143
148
|
config.mcpServers[name] = {
|
|
144
149
|
command: "npx",
|
|
145
|
-
args: ["-y",
|
|
150
|
+
args: ["-y", mcpVersion],
|
|
146
151
|
env: {
|
|
147
152
|
API_KEY: envVars.API_KEY,
|
|
148
153
|
API_BASE_URL: envVars.API_BASE_URL
|
|
@@ -153,7 +158,7 @@ import {
|
|
|
153
158
|
if (!config.mcpServers) config.mcpServers = {};
|
|
154
159
|
config.mcpServers[name] = {
|
|
155
160
|
command: "npx",
|
|
156
|
-
args: ["-y",
|
|
161
|
+
args: ["-y", mcpVersion],
|
|
157
162
|
env: {
|
|
158
163
|
API_KEY: envVars.API_KEY,
|
|
159
164
|
API_BASE_URL: envVars.API_BASE_URL
|