@nokai/cli 1.2.1 → 1.2.3
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/cli.d.ts.map +1 -1
- package/dist/cli.js +69 -90
- package/dist/cli.js.map +1 -1
- package/package.json +2 -1
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAoOA,wBAAsB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAS5C"}
|
package/dist/cli.js
CHANGED
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.runCli = runCli;
|
|
4
|
-
const node_readline_1 = require("node:readline");
|
|
5
4
|
const node_fs_1 = require("node:fs");
|
|
6
5
|
const node_path_1 = require("node:path");
|
|
7
6
|
const profile_js_1 = require("./profile.js");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return
|
|
11
|
-
rl.question(question, (answer) => resolve(answer.trim()));
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
function choose(question, options) {
|
|
15
|
-
return new Promise((resolve) => {
|
|
16
|
-
console.log(`\n ${question}\n`);
|
|
17
|
-
options.forEach((opt, i) => {
|
|
18
|
-
console.log(` ${i + 1}) ${opt}`);
|
|
19
|
-
});
|
|
20
|
-
console.log();
|
|
21
|
-
rl.question(" Enter number: ", (answer) => {
|
|
22
|
-
const idx = parseInt(answer.trim(), 10) - 1;
|
|
23
|
-
if (idx >= 0 && idx < options.length) {
|
|
24
|
-
resolve(options[idx]);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
resolve(options[0]);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
});
|
|
7
|
+
async function getPrompts() {
|
|
8
|
+
const mod = await import("@inquirer/prompts");
|
|
9
|
+
return { input: mod.input, select: mod.select, confirm: mod.confirm };
|
|
31
10
|
}
|
|
32
11
|
function getPlatforms() {
|
|
33
12
|
const home = process.env.HOME || process.env.USERPROFILE || "~";
|
|
@@ -35,7 +14,7 @@ function getPlatforms() {
|
|
|
35
14
|
{
|
|
36
15
|
name: "Claude Code",
|
|
37
16
|
configPath: (0, node_path_1.join)(home, ".claude.json"),
|
|
38
|
-
configDir:
|
|
17
|
+
configDir: home,
|
|
39
18
|
},
|
|
40
19
|
{
|
|
41
20
|
name: "Cursor",
|
|
@@ -59,15 +38,14 @@ function getPlatforms() {
|
|
|
59
38
|
},
|
|
60
39
|
];
|
|
61
40
|
}
|
|
41
|
+
const SIGNALING_URL = "wss://nokai-signaling.ajaykkumar-rajen.workers.dev";
|
|
62
42
|
function writeMcpConfig(platform, agentName, signalingUrl) {
|
|
63
43
|
if (!platform.configPath)
|
|
64
44
|
return false;
|
|
65
45
|
try {
|
|
66
|
-
// Ensure directory exists
|
|
67
46
|
if (platform.configDir && !(0, node_fs_1.existsSync)(platform.configDir)) {
|
|
68
47
|
(0, node_fs_1.mkdirSync)(platform.configDir, { recursive: true });
|
|
69
48
|
}
|
|
70
|
-
// Read existing config or create new
|
|
71
49
|
let config = {};
|
|
72
50
|
if ((0, node_fs_1.existsSync)(platform.configPath)) {
|
|
73
51
|
try {
|
|
@@ -77,7 +55,6 @@ function writeMcpConfig(platform, agentName, signalingUrl) {
|
|
|
77
55
|
config = {};
|
|
78
56
|
}
|
|
79
57
|
}
|
|
80
|
-
// Add/update mcpServers.nokai
|
|
81
58
|
if (!config.mcpServers || typeof config.mcpServers !== "object") {
|
|
82
59
|
config.mcpServers = {};
|
|
83
60
|
}
|
|
@@ -96,41 +73,58 @@ function writeMcpConfig(platform, agentName, signalingUrl) {
|
|
|
96
73
|
return false;
|
|
97
74
|
}
|
|
98
75
|
}
|
|
99
|
-
|
|
76
|
+
function showManualConfig(agentName) {
|
|
77
|
+
console.log(`\n Add this to your MCP configuration:\n`);
|
|
78
|
+
const config = JSON.stringify({
|
|
79
|
+
mcpServers: {
|
|
80
|
+
nokai: {
|
|
81
|
+
command: "nokai",
|
|
82
|
+
args: ["serve"],
|
|
83
|
+
env: {
|
|
84
|
+
NOKAI_AGENT_NAME: agentName,
|
|
85
|
+
NOKAI_SIGNALING_URL: SIGNALING_URL,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
}, null, 2);
|
|
90
|
+
console.log(config.split("\n").map((l) => ` ${l}`).join("\n"));
|
|
91
|
+
}
|
|
100
92
|
async function firstTimeSetup() {
|
|
93
|
+
const { input, select, confirm } = await getPrompts();
|
|
101
94
|
console.log("\n ✨ Welcome to NokAI! Let's set you up.\n");
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
rl.close();
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
// Choose platform
|
|
95
|
+
const name = await input({
|
|
96
|
+
message: "What would you like to name your agent?",
|
|
97
|
+
validate: (v) => v.trim().length > 0 || "Name is required",
|
|
98
|
+
});
|
|
110
99
|
const platforms = getPlatforms();
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
100
|
+
const chosen = await select({
|
|
101
|
+
message: "Which AI tool are you using?",
|
|
102
|
+
choices: platforms.map((p) => ({ name: p.name, value: p.name })),
|
|
103
|
+
});
|
|
104
|
+
const platform = platforms.find((p) => p.name === chosen);
|
|
114
105
|
// Create profile
|
|
115
106
|
const profileDir = (0, profile_js_1.getProfileDir)();
|
|
116
|
-
const profile = (0, profile_js_1.createProfile)(name, profileDir);
|
|
117
|
-
console.log(`\n ✓ Agent created: ${name}`);
|
|
107
|
+
const profile = (0, profile_js_1.createProfile)(name.trim(), profileDir);
|
|
108
|
+
console.log(`\n ✓ Agent created: ${name.trim()}`);
|
|
118
109
|
console.log(` ✓ Your NokAI ID: ${profile.nokaiId}`);
|
|
119
110
|
// Configure MCP
|
|
120
111
|
if (platform.configPath) {
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
112
|
+
const shouldConfigure = await confirm({
|
|
113
|
+
message: `Add NokAI to ${platform.name} config? (${platform.configPath})`,
|
|
114
|
+
default: true,
|
|
115
|
+
});
|
|
116
|
+
if (shouldConfigure) {
|
|
117
|
+
const success = writeMcpConfig(platform, name.trim(), SIGNALING_URL);
|
|
124
118
|
if (success) {
|
|
125
119
|
console.log(` ✓ MCP configuration added to ${platform.name}`);
|
|
126
120
|
}
|
|
127
121
|
else {
|
|
128
122
|
console.log(` ✗ Failed to write config. You can add it manually.`);
|
|
129
|
-
showManualConfig(name);
|
|
123
|
+
showManualConfig(name.trim());
|
|
130
124
|
}
|
|
131
125
|
}
|
|
132
126
|
else {
|
|
133
|
-
showManualConfig(name);
|
|
127
|
+
showManualConfig(name.trim());
|
|
134
128
|
}
|
|
135
129
|
}
|
|
136
130
|
else if (platform.name === "VS Code (Extension)") {
|
|
@@ -138,73 +132,59 @@ async function firstTimeSetup() {
|
|
|
138
132
|
console.log(` Signaling URL: ${SIGNALING_URL}`);
|
|
139
133
|
}
|
|
140
134
|
else {
|
|
141
|
-
showManualConfig(name);
|
|
135
|
+
showManualConfig(name.trim());
|
|
142
136
|
}
|
|
143
137
|
console.log(`\n You're ready! Restart your AI tool to activate NokAI.`);
|
|
144
138
|
console.log(` Share your NokAI ID with teammates: ${profile.nokaiId}\n`);
|
|
145
|
-
rl.close();
|
|
146
|
-
}
|
|
147
|
-
function showManualConfig(agentName) {
|
|
148
|
-
console.log(`\n Add this to your MCP configuration:\n`);
|
|
149
|
-
console.log(JSON.stringify({
|
|
150
|
-
mcpServers: {
|
|
151
|
-
nokai: {
|
|
152
|
-
command: "nokai",
|
|
153
|
-
args: ["serve"],
|
|
154
|
-
env: {
|
|
155
|
-
NOKAI_AGENT_NAME: agentName,
|
|
156
|
-
NOKAI_SIGNALING_URL: SIGNALING_URL,
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
}, null, 2).split("\n").map((l) => ` ${l}`).join("\n"));
|
|
161
139
|
}
|
|
162
140
|
async function returningUser() {
|
|
141
|
+
const { input, select } = await getPrompts();
|
|
163
142
|
const profileDir = (0, profile_js_1.getProfileDir)();
|
|
164
143
|
const profile = (0, profile_js_1.loadProfile)(profileDir);
|
|
165
144
|
if (!profile) {
|
|
166
145
|
return firstTimeSetup();
|
|
167
146
|
}
|
|
168
147
|
console.log(`\n Welcome back, ${profile.name}! (${profile.nokaiId})\n`);
|
|
169
|
-
const action = await
|
|
170
|
-
"
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
148
|
+
const action = await select({
|
|
149
|
+
message: "What would you like to do?",
|
|
150
|
+
choices: [
|
|
151
|
+
{ name: "Connect to a teammate", value: "teammate" },
|
|
152
|
+
{ name: "Connect my own projects", value: "self" },
|
|
153
|
+
{ name: "Show my NokAI ID", value: "id" },
|
|
154
|
+
{ name: "Reconfigure MCP settings", value: "reconfig" },
|
|
155
|
+
{ name: "Exit", value: "exit" },
|
|
156
|
+
],
|
|
157
|
+
});
|
|
177
158
|
switch (action) {
|
|
178
|
-
case "
|
|
179
|
-
const peerId = await
|
|
180
|
-
|
|
159
|
+
case "teammate": {
|
|
160
|
+
const peerId = await input({
|
|
161
|
+
message: "Enter teammate's NokAI ID (e.g., NKI-XXXX-XXXX)",
|
|
162
|
+
});
|
|
163
|
+
if (peerId.trim()) {
|
|
181
164
|
console.log(`\n To connect, use this in your AI tool:`);
|
|
182
|
-
console.log(` nokai_connect mode=teammate id=${peerId}\n`);
|
|
165
|
+
console.log(` nokai_connect mode=teammate id=${peerId.trim()}\n`);
|
|
183
166
|
}
|
|
184
167
|
break;
|
|
185
168
|
}
|
|
186
|
-
case "
|
|
169
|
+
case "self": {
|
|
187
170
|
console.log(`\n To connect your sessions, use this in your AI tool:`);
|
|
188
171
|
console.log(` nokai_connect mode=self\n`);
|
|
189
172
|
console.log(` This will list your active sessions and let you connect them.\n`);
|
|
190
173
|
break;
|
|
191
174
|
}
|
|
192
|
-
case "
|
|
175
|
+
case "id": {
|
|
193
176
|
console.log(`\n NokAI ID: ${profile.nokaiId}`);
|
|
194
|
-
console.log(` Agent Name: ${profile.name}`);
|
|
195
|
-
console.log(` Device ID: ${profile.deviceId}\n`);
|
|
177
|
+
console.log(` Agent Name: ${profile.name}\n`);
|
|
196
178
|
console.log(` Share your NokAI ID with teammates so they can connect to you.\n`);
|
|
197
179
|
break;
|
|
198
180
|
}
|
|
199
|
-
case "
|
|
200
|
-
console.log(`\n To view connections, use nokai_connections in your AI tool.\n`);
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
case "Reconfigure MCP settings": {
|
|
181
|
+
case "reconfig": {
|
|
204
182
|
const platforms = getPlatforms();
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
183
|
+
const chosen = await select({
|
|
184
|
+
message: "Which AI tool?",
|
|
185
|
+
choices: platforms.map((p) => ({ name: p.name, value: p.name })),
|
|
186
|
+
});
|
|
187
|
+
const platform = platforms.find((p) => p.name === chosen);
|
|
208
188
|
if (platform.configPath) {
|
|
209
189
|
const success = writeMcpConfig(platform, profile.name, SIGNALING_URL);
|
|
210
190
|
if (success) {
|
|
@@ -221,10 +201,9 @@ async function returningUser() {
|
|
|
221
201
|
}
|
|
222
202
|
break;
|
|
223
203
|
}
|
|
224
|
-
case "
|
|
204
|
+
case "exit":
|
|
225
205
|
break;
|
|
226
206
|
}
|
|
227
|
-
rl.close();
|
|
228
207
|
}
|
|
229
208
|
async function runCli() {
|
|
230
209
|
const profileDir = (0, profile_js_1.getProfileDir)();
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;
|
|
1
|
+
{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,EAAE,OAAO,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;gBACtE,IAAI,OAAO,EAAE,CAAC;oBACZ,OAAO,CAAC,GAAG,CAAC,uCAAuC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;oBACpE,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAC;gBAC5D,CAAC;qBAAM,CAAC;oBACN,OAAO,CAAC,GAAG,CAAC,+BAA+B,CAAC,CAAC;oBAC7C,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACjC,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;YACD,MAAM;QACR,CAAC;QACD,KAAK,MAAM;YACT,MAAM;IACV,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,MAAM;IAC1B,MAAM,UAAU,GAAG,IAAA,0BAAa,GAAE,CAAC;IACnC,MAAM,OAAO,GAAG,IAAA,wBAAW,EAAC,UAAU,CAAC,CAAC;IAExC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,cAAc,EAAE,CAAC;IACzB,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nokai/cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "NokAI — Connecting AIs. Peer-to-peer communication between AI coding assistants via MCP.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"test:watch": "vitest"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@inquirer/prompts": "^8.4.1",
|
|
42
43
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
43
44
|
"node-datachannel": "^0.32.0",
|
|
44
45
|
"sql.js": "^1.14.0",
|