@gapi/gcli 1.8.194 → 1.8.195
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 +33 -1
- package/package.json +2 -2
- package/release/index.js +3 -2
package/README.md
CHANGED
|
@@ -1,13 +1,45 @@
|
|
|
1
1
|
### Installation
|
|
2
2
|
|
|
3
3
|
```bash
|
|
4
|
-
curl -L "https://github.com/Stradivario/gapi/
|
|
4
|
+
curl -L "https://github.com/Stradivario/gapi/releases/download/v1.8.194/gcli-linux" -o ~/.local/bin/gcli
|
|
5
5
|
```
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
chmod +x ~/.local/bin/gcli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Use MCP tool in Claude or any other tool that accepts mcp servers config
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"mcpServers": {
|
|
16
|
+
"lambforge": {
|
|
17
|
+
"command": "gcli",
|
|
18
|
+
"args": ["mcp:start", "--url", "http://localhost:8000/mcp"]
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Using regular npm package installed globally `npm install @gapi/gcli -g`
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"lambforge": {
|
|
30
|
+
"command": "/home/user/.nvm/versions/node/v24.11.1/bin/node",
|
|
31
|
+
"args": [
|
|
32
|
+
"/home/user/.nvm/versions/node/v24.11.1/bin/npx",
|
|
33
|
+
"gcli",
|
|
34
|
+
"mcp:start",
|
|
35
|
+
"--url",
|
|
36
|
+
"http://localhost:8000/mcp"
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
11
43
|
#### Using NPM
|
|
12
44
|
|
|
13
45
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gapi/gcli",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.195",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Stradivario/gapi.git"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"copy:nodejs": "cp $(command -v node) ./release/gcli-linux",
|
|
20
20
|
"chmod": "chmod +x ./release/gcli-linux",
|
|
21
21
|
"postject": "npx postject ./release/gcli-linux NODE_SEA_BLOB ./release/gcli.blob --sentinel-fuse NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2",
|
|
22
|
-
"build": "
|
|
22
|
+
"build": "npm run esbuild",
|
|
23
23
|
"esbuild": "node build.js",
|
|
24
24
|
"introspect": "gapi schema introspect --collect-documents --collect-types"
|
|
25
25
|
},
|
package/release/index.js
CHANGED
|
@@ -316795,13 +316795,14 @@ __export(start_exports, {
|
|
|
316795
316795
|
default: () => startProxy
|
|
316796
316796
|
});
|
|
316797
316797
|
async function startProxy(cmd) {
|
|
316798
|
-
const
|
|
316798
|
+
const config2 = await GraphqlClienAPI.getConfig().pipe((0, import_operators23.take)(1)).toPromise();
|
|
316799
|
+
const apiUrl = config2.url.replace(/\/graphql$/, "");
|
|
316800
|
+
const baseUrl = cmd.url || [apiUrl, "/mcp"].join("") || "http://127.0.0.1:8000/mcp";
|
|
316799
316801
|
const mcpUrl = new URL(baseUrl);
|
|
316800
316802
|
mcpUrl.searchParams.set("transportType", "streamable-http");
|
|
316801
316803
|
process.stderr.write(`Starting MCP proxy \u2192 ${mcpUrl}
|
|
316802
316804
|
`);
|
|
316803
316805
|
process.stderr.write("Retrieving config for auth...\n");
|
|
316804
|
-
const config2 = await GraphqlClienAPI.getConfig().pipe((0, import_operators23.take)(1)).toPromise();
|
|
316805
316806
|
if (!config2?.token) {
|
|
316806
316807
|
throw new Error("User is not authenticated (no token in config)");
|
|
316807
316808
|
}
|