nia-wizard 0.1.14 → 0.1.16
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 +42 -0
- package/dist/bin.js +89 -5
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-IYETBVTI.js → chunk-JKF3ZFD5.js} +349 -14
- package/dist/chunk-JKF3ZFD5.js.map +1 -0
- package/dist/index.d.ts +20 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
- package/dist/chunk-IYETBVTI.js.map +0 -1
package/README.md
CHANGED
|
@@ -65,6 +65,42 @@ npx nia-wizard
|
|
|
65
65
|
|
|
66
66
|
This runs `npx skills add nozomio-labs/nia-skill` and stores your API key at `~/.config/nia/api_key`.
|
|
67
67
|
|
|
68
|
+
For deterministic agent/CI usage:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx nia-wizard skill add \
|
|
72
|
+
--api-key nk_xxx \
|
|
73
|
+
--source nozomio-labs/nia-skill \
|
|
74
|
+
--non-interactive \
|
|
75
|
+
--ci
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Install globally for all detected agents:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx nia-wizard skill add \
|
|
82
|
+
--api-key nk_xxx \
|
|
83
|
+
--all-agents \
|
|
84
|
+
--non-interactive \
|
|
85
|
+
--ci
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Optional target-specific installation:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npx nia-wizard skill add \
|
|
92
|
+
--api-key nk_xxx \
|
|
93
|
+
--target codex \
|
|
94
|
+
--non-interactive \
|
|
95
|
+
--ci
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Print the headless onboarding guide for agents:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx nia-wizard agent-guide
|
|
102
|
+
```
|
|
103
|
+
|
|
68
104
|
## Options
|
|
69
105
|
|
|
70
106
|
| Option | Description |
|
|
@@ -74,6 +110,12 @@ This runs `npx skills add nozomio-labs/nia-skill` and stores your API key at `~/
|
|
|
74
110
|
| `--debug` | Enable debug logging |
|
|
75
111
|
| `--ci` | CI mode (skip prompts, use defaults) |
|
|
76
112
|
| `--api-key`, `-k` | Nia API key |
|
|
113
|
+
| `--non-interactive` | Fail fast instead of waiting for prompts (skill command) |
|
|
114
|
+
| `--target` | Target coding agent for skill installation (skill command) |
|
|
115
|
+
| `--all-agents` | Install to all detected agents in global scope (skill command) |
|
|
116
|
+
| `--global` | Install to global user skills directories (skill command) |
|
|
117
|
+
| `--source` | Skill source path/repo (skill command) |
|
|
118
|
+
| `--json` | Print machine-readable result (skill command) |
|
|
77
119
|
|
|
78
120
|
## Authentication
|
|
79
121
|
|
package/dist/bin.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import 'dotenv/config';
|
|
3
3
|
import {
|
|
4
|
+
printAgentGuide,
|
|
4
5
|
runMCPAdd,
|
|
5
6
|
runMCPRemove,
|
|
7
|
+
runSkillAdd,
|
|
6
8
|
runWizard
|
|
7
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JKF3ZFD5.js";
|
|
8
10
|
|
|
9
11
|
// src/bin.ts
|
|
10
12
|
import yargs from "yargs";
|
|
11
13
|
import { hideBin } from "yargs/helpers";
|
|
12
|
-
|
|
14
|
+
function printCliError(error) {
|
|
15
|
+
if (error instanceof Error) {
|
|
16
|
+
console.error(`Error: ${error.message}`);
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
console.error("Error:", error);
|
|
20
|
+
}
|
|
21
|
+
var cli = yargs(hideBin(process.argv)).scriptName("nia-wizard").usage("$0 [api-key] [options]").usage("$0 mcp add [options]").usage("$0 mcp remove [options]").usage("$0 skill add [options]").usage("$0 agent-guide").command(
|
|
13
22
|
"$0 [api-key]",
|
|
14
23
|
"Install Nia MCP server to your coding agents",
|
|
15
24
|
(yargs2) => yargs2.positional("api-key", {
|
|
@@ -39,10 +48,85 @@ var cli = yargs(hideBin(process.argv)).scriptName("nia-wizard").usage("$0 [api-k
|
|
|
39
48
|
ci: argv.ci
|
|
40
49
|
});
|
|
41
50
|
} catch (error) {
|
|
42
|
-
|
|
51
|
+
printCliError(error);
|
|
43
52
|
process.exit(1);
|
|
44
53
|
}
|
|
45
54
|
}
|
|
55
|
+
).command(
|
|
56
|
+
"agent-guide",
|
|
57
|
+
"Print API-first agent onboarding guide in Markdown",
|
|
58
|
+
() => {
|
|
59
|
+
},
|
|
60
|
+
() => {
|
|
61
|
+
printAgentGuide();
|
|
62
|
+
}
|
|
63
|
+
).command(
|
|
64
|
+
"skill <command>",
|
|
65
|
+
"Manage skill installation",
|
|
66
|
+
(yargs2) => yargs2.command(
|
|
67
|
+
"add",
|
|
68
|
+
"Add Nia skill",
|
|
69
|
+
(yargs3) => yargs3.option("api-key", {
|
|
70
|
+
type: "string",
|
|
71
|
+
alias: "k",
|
|
72
|
+
description: "Nia API key (nk_xxx)"
|
|
73
|
+
}).option("source", {
|
|
74
|
+
type: "string",
|
|
75
|
+
default: "nozomio-labs/nia-skill",
|
|
76
|
+
description: "Skill source to install"
|
|
77
|
+
}).option("target", {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "Target coding agent for skill installation"
|
|
80
|
+
}).option("all-agents", {
|
|
81
|
+
type: "boolean",
|
|
82
|
+
default: false,
|
|
83
|
+
description: "Install to all detected agents (non-interactive)"
|
|
84
|
+
}).option("global", {
|
|
85
|
+
type: "boolean",
|
|
86
|
+
description: "Install to global user skills directories"
|
|
87
|
+
}).option("yes", {
|
|
88
|
+
type: "boolean",
|
|
89
|
+
default: false,
|
|
90
|
+
description: "Auto-confirm prompts when supported by the skills CLI"
|
|
91
|
+
}).option("non-interactive", {
|
|
92
|
+
type: "boolean",
|
|
93
|
+
default: false,
|
|
94
|
+
description: "Fail fast instead of waiting for prompts"
|
|
95
|
+
}).option("json", {
|
|
96
|
+
type: "boolean",
|
|
97
|
+
default: false,
|
|
98
|
+
description: "Print machine-readable install result"
|
|
99
|
+
}).option("debug", {
|
|
100
|
+
type: "boolean",
|
|
101
|
+
default: false,
|
|
102
|
+
description: "Enable debug logging"
|
|
103
|
+
}).option("ci", {
|
|
104
|
+
type: "boolean",
|
|
105
|
+
default: false,
|
|
106
|
+
description: "CI mode (implies non-interactive behavior)"
|
|
107
|
+
}),
|
|
108
|
+
async (argv) => {
|
|
109
|
+
try {
|
|
110
|
+
await runSkillAdd({
|
|
111
|
+
apiKey: argv["api-key"],
|
|
112
|
+
source: argv.source,
|
|
113
|
+
target: argv.target,
|
|
114
|
+
allAgents: argv["all-agents"],
|
|
115
|
+
global: argv.global,
|
|
116
|
+
yes: argv.yes,
|
|
117
|
+
nonInteractive: argv["non-interactive"],
|
|
118
|
+
json: argv.json,
|
|
119
|
+
debug: argv.debug,
|
|
120
|
+
ci: argv.ci
|
|
121
|
+
});
|
|
122
|
+
} catch (error) {
|
|
123
|
+
printCliError(error);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
).demandCommand(1, "You need to specify a command (add)"),
|
|
128
|
+
() => {
|
|
129
|
+
}
|
|
46
130
|
).command(
|
|
47
131
|
"mcp <command>",
|
|
48
132
|
"Manage MCP server installation",
|
|
@@ -77,7 +161,7 @@ var cli = yargs(hideBin(process.argv)).scriptName("nia-wizard").usage("$0 [api-k
|
|
|
77
161
|
ci: argv.ci
|
|
78
162
|
});
|
|
79
163
|
} catch (error) {
|
|
80
|
-
|
|
164
|
+
printCliError(error);
|
|
81
165
|
process.exit(1);
|
|
82
166
|
}
|
|
83
167
|
}
|
|
@@ -93,7 +177,7 @@ var cli = yargs(hideBin(process.argv)).scriptName("nia-wizard").usage("$0 [api-k
|
|
|
93
177
|
try {
|
|
94
178
|
await runMCPRemove({ debug: argv.debug });
|
|
95
179
|
} catch (error) {
|
|
96
|
-
|
|
180
|
+
printCliError(error);
|
|
97
181
|
process.exit(1);
|
|
98
182
|
}
|
|
99
183
|
}
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { runWizard } from './run.js';\nimport { runMCPAdd, runMCPRemove } from './mcp.js';\n\nconst cli = yargs(hideBin(process.argv))\n .scriptName('nia-wizard')\n .usage('$0 [api-key] [options]')\n .usage('$0 mcp add [options]')\n .usage('$0 mcp remove [options]')\n .command(\n '$0 [api-key]',\n 'Install Nia MCP server to your coding agents',\n (yargs) =>\n yargs\n .positional('api-key', {\n type: 'string',\n description: 'Nia API key (nk_xxx)',\n })\n .option('local', {\n type: 'boolean',\n description: 'Use local mode (requires pipx)',\n })\n .option('remote', {\n type: 'boolean',\n description: 'Use remote mode (cloud)',\n })\n .option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n })\n .option('ci', {\n type: 'boolean',\n default: false,\n description: 'CI mode (skip prompts)',\n }),\n async (argv) => {\n try {\n await runWizard({\n apiKey: argv['api-key'],\n local: argv.local ?? (argv.remote ? false : undefined),\n debug: argv.debug,\n ci: argv.ci,\n });\n } catch (error) {\n console.error('Error:', error);\n process.exit(1);\n }\n },\n )\n .command(\n 'mcp <command>',\n 'Manage MCP server installation',\n (yargs) =>\n yargs\n .command(\n 'add',\n 'Add Nia MCP server to coding agents',\n (yargs) =>\n yargs\n .option('api-key', {\n type: 'string',\n alias: 'k',\n description: 'Nia API key (nk_xxx)',\n })\n .option('local', {\n type: 'boolean',\n description: 'Use local mode',\n })\n .option('remote', {\n type: 'boolean',\n description: 'Use remote mode',\n })\n .option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n })\n .option('ci', {\n type: 'boolean',\n default: false,\n description: 'CI mode (skip prompts)',\n }),\n async (argv) => {\n try {\n await runMCPAdd({\n apiKey: argv['api-key'],\n local: argv.local ?? (argv.remote ? false : undefined),\n debug: argv.debug,\n ci: argv.ci,\n });\n } catch (error) {\n console.error('Error:', error);\n process.exit(1);\n }\n },\n )\n .command(\n 'remove',\n 'Remove Nia MCP server from coding agents',\n (yargs) =>\n yargs.option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n }),\n async (argv) => {\n try {\n await runMCPRemove({ debug: argv.debug });\n } catch (error) {\n console.error('Error:', error);\n process.exit(1);\n }\n },\n )\n .demandCommand(1, 'You need to specify a command (add or remove)'),\n () => {},\n )\n .help()\n .version()\n .strict();\n\ncli.parse();\n"],"mappings":";;;;;;;;;AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AAIxB,IAAM,MAAM,MAAM,QAAQ,QAAQ,IAAI,CAAC,EACpC,WAAW,YAAY,EACvB,MAAM,wBAAwB,EAC9B,MAAM,sBAAsB,EAC5B,MAAM,yBAAyB,EAC/B;AAAA,EACC;AAAA,EACA;AAAA,EACA,CAACA,WACCA,OACG,WAAW,WAAW;AAAA,IACrB,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,SAAS;AAAA,IACf,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,UAAU;AAAA,IAChB,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,SAAS;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC,EACA,OAAO,MAAM;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC;AAAA,EACL,OAAO,SAAS;AACd,QAAI;AACF,YAAM,UAAU;AAAA,QACd,QAAQ,KAAK,SAAS;AAAA,QACtB,OAAO,KAAK,UAAU,KAAK,SAAS,QAAQ;AAAA,QAC5C,OAAO,KAAK;AAAA,QACZ,IAAI,KAAK;AAAA,MACX,CAAC;AAAA,IACH,SAAS,OAAO;AACd,cAAQ,MAAM,UAAU,KAAK;AAC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AA,EAAC;AACT,EACC,KAAK,EACL,QAAQ,EACR,OAAO;AAEV,IAAI,MAAM;","names":["yargs"]}
|
|
1
|
+
{"version":3,"sources":["../src/bin.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\nimport { runWizard } from './run.js';\nimport { runMCPAdd, runMCPRemove } from './mcp.js';\nimport { runSkillAdd } from './skill.js';\nimport { printAgentGuide } from './agent-guide.js';\n\nfunction printCliError(error: unknown): void {\n if (error instanceof Error) {\n console.error(`Error: ${error.message}`);\n return;\n }\n\n console.error('Error:', error);\n}\n\nconst cli = yargs(hideBin(process.argv))\n .scriptName('nia-wizard')\n .usage('$0 [api-key] [options]')\n .usage('$0 mcp add [options]')\n .usage('$0 mcp remove [options]')\n .usage('$0 skill add [options]')\n .usage('$0 agent-guide')\n .command(\n '$0 [api-key]',\n 'Install Nia MCP server to your coding agents',\n (yargs) =>\n yargs\n .positional('api-key', {\n type: 'string',\n description: 'Nia API key (nk_xxx)',\n })\n .option('local', {\n type: 'boolean',\n description: 'Use local mode (requires pipx)',\n })\n .option('remote', {\n type: 'boolean',\n description: 'Use remote mode (cloud)',\n })\n .option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n })\n .option('ci', {\n type: 'boolean',\n default: false,\n description: 'CI mode (skip prompts)',\n }),\n async (argv) => {\n try {\n await runWizard({\n apiKey: argv['api-key'],\n local: argv.local ?? (argv.remote ? false : undefined),\n debug: argv.debug,\n ci: argv.ci,\n });\n } catch (error) {\n printCliError(error);\n process.exit(1);\n }\n },\n )\n .command(\n 'agent-guide',\n 'Print API-first agent onboarding guide in Markdown',\n () => {},\n () => {\n printAgentGuide();\n },\n )\n .command(\n 'skill <command>',\n 'Manage skill installation',\n (yargs) =>\n yargs\n .command(\n 'add',\n 'Add Nia skill',\n (yargs) =>\n yargs\n .option('api-key', {\n type: 'string',\n alias: 'k',\n description: 'Nia API key (nk_xxx)',\n })\n .option('source', {\n type: 'string',\n default: 'nozomio-labs/nia-skill',\n description: 'Skill source to install',\n })\n .option('target', {\n type: 'string',\n description: 'Target coding agent for skill installation',\n })\n .option('all-agents', {\n type: 'boolean',\n default: false,\n description: 'Install to all detected agents (non-interactive)',\n })\n .option('global', {\n type: 'boolean',\n description: 'Install to global user skills directories',\n })\n .option('yes', {\n type: 'boolean',\n default: false,\n description: 'Auto-confirm prompts when supported by the skills CLI',\n })\n .option('non-interactive', {\n type: 'boolean',\n default: false,\n description: 'Fail fast instead of waiting for prompts',\n })\n .option('json', {\n type: 'boolean',\n default: false,\n description: 'Print machine-readable install result',\n })\n .option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n })\n .option('ci', {\n type: 'boolean',\n default: false,\n description: 'CI mode (implies non-interactive behavior)',\n }),\n async (argv) => {\n try {\n await runSkillAdd({\n apiKey: argv['api-key'],\n source: argv.source,\n target: argv.target,\n allAgents: argv['all-agents'],\n global: argv.global,\n yes: argv.yes,\n nonInteractive: argv['non-interactive'],\n json: argv.json,\n debug: argv.debug,\n ci: argv.ci,\n });\n } catch (error) {\n printCliError(error);\n process.exit(1);\n }\n },\n )\n .demandCommand(1, 'You need to specify a command (add)'),\n () => {},\n )\n .command(\n 'mcp <command>',\n 'Manage MCP server installation',\n (yargs) =>\n yargs\n .command(\n 'add',\n 'Add Nia MCP server to coding agents',\n (yargs) =>\n yargs\n .option('api-key', {\n type: 'string',\n alias: 'k',\n description: 'Nia API key (nk_xxx)',\n })\n .option('local', {\n type: 'boolean',\n description: 'Use local mode',\n })\n .option('remote', {\n type: 'boolean',\n description: 'Use remote mode',\n })\n .option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n })\n .option('ci', {\n type: 'boolean',\n default: false,\n description: 'CI mode (skip prompts)',\n }),\n async (argv) => {\n try {\n await runMCPAdd({\n apiKey: argv['api-key'],\n local: argv.local ?? (argv.remote ? false : undefined),\n debug: argv.debug,\n ci: argv.ci,\n });\n } catch (error) {\n printCliError(error);\n process.exit(1);\n }\n },\n )\n .command(\n 'remove',\n 'Remove Nia MCP server from coding agents',\n (yargs) =>\n yargs.option('debug', {\n type: 'boolean',\n default: false,\n description: 'Enable debug logging',\n }),\n async (argv) => {\n try {\n await runMCPRemove({ debug: argv.debug });\n } catch (error) {\n printCliError(error);\n process.exit(1);\n }\n },\n )\n .demandCommand(1, 'You need to specify a command (add or remove)'),\n () => {},\n )\n .help()\n .version()\n .strict();\n\ncli.parse();\n"],"mappings":";;;;;;;;;;;AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AAMxB,SAAS,cAAc,OAAsB;AAC3C,MAAI,iBAAiB,OAAO;AAC1B,YAAQ,MAAM,UAAU,MAAM,OAAO,EAAE;AACvC;AAAA,EACF;AAEA,UAAQ,MAAM,UAAU,KAAK;AAC/B;AAEA,IAAM,MAAM,MAAM,QAAQ,QAAQ,IAAI,CAAC,EACpC,WAAW,YAAY,EACvB,MAAM,wBAAwB,EAC9B,MAAM,sBAAsB,EAC5B,MAAM,yBAAyB,EAC/B,MAAM,wBAAwB,EAC9B,MAAM,gBAAgB,EACtB;AAAA,EACC;AAAA,EACA;AAAA,EACA,CAACA,WACCA,OACG,WAAW,WAAW;AAAA,IACrB,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,SAAS;AAAA,IACf,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,UAAU;AAAA,IAChB,MAAM;AAAA,IACN,aAAa;AAAA,EACf,CAAC,EACA,OAAO,SAAS;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC,EACA,OAAO,MAAM;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,aAAa;AAAA,EACf,CAAC;AAAA,EACL,OAAO,SAAS;AACd,QAAI;AACF,YAAM,UAAU;AAAA,QACd,QAAQ,KAAK,SAAS;AAAA,QACtB,OAAO,KAAK,UAAU,KAAK,SAA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AA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA,CAACA,WACCA,OAAM,OAAO,SAAS;AAAA,MACpB,MAAM;AAAA,MACN,SAAS;AAAA,MACT,aAAa;AAAA,IACf,CAAC;AAAA,IACH,OAAO,SAAS;AACd,UAAI;AACF,cAAM,aAAa,EAAE,OAAO,KAAK,MAAM,CAAC;AAAA,MAC1C,SAAS,OAAO;AACd,sBAAc,KAAK;AACnB,gBAAQ,KAAK,CAAC;AAAA,MAChB;AAAA,IACF;AAAA,EACF,EACC,cAAc,GAAG,+CAA+C;AAAA,EACrE,MAAM;AAAA,EAAC;AACT,EACC,KAAK,EACL,QAAQ,EACR,OAAO;AAEV,IAAI,MAAM;","names":["yargs"]}
|
|
@@ -2932,9 +2932,6 @@ async function removeMCPServerFromClientsStep() {
|
|
|
2932
2932
|
// src/run.ts
|
|
2933
2933
|
import chalk3 from "chalk";
|
|
2934
2934
|
import { spawnSync as spawnSync5 } from "child_process";
|
|
2935
|
-
import * as fs33 from "fs";
|
|
2936
|
-
import * as os32 from "os";
|
|
2937
|
-
import * as path33 from "path";
|
|
2938
2935
|
|
|
2939
2936
|
// src/utils/dependencies.ts
|
|
2940
2937
|
import { execSync as execSync5, spawnSync as spawnSync4 } from "child_process";
|
|
@@ -3139,12 +3136,37 @@ function dependenciesReady() {
|
|
|
3139
3136
|
return true;
|
|
3140
3137
|
}
|
|
3141
3138
|
|
|
3142
|
-
// src/
|
|
3139
|
+
// src/utils/api-key.ts
|
|
3140
|
+
import * as fs33 from "fs";
|
|
3141
|
+
import * as os32 from "os";
|
|
3142
|
+
import * as path33 from "path";
|
|
3143
|
+
var NIA_CONFIG_DIR = path33.join(os32.homedir(), ".config", "nia");
|
|
3144
|
+
var NIA_KEY_PATH = path33.join(NIA_CONFIG_DIR, "api_key");
|
|
3143
3145
|
function storeApiKey(apiKey) {
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3146
|
+
fs33.mkdirSync(NIA_CONFIG_DIR, { recursive: true });
|
|
3147
|
+
fs33.writeFileSync(NIA_KEY_PATH, apiKey, { mode: 384 });
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
// src/run.ts
|
|
3151
|
+
async function runAddMcpInstall(apiKey) {
|
|
3152
|
+
clack_default.log.info("Launching add-mcp installer...\n");
|
|
3153
|
+
const result = spawnSync5(
|
|
3154
|
+
"npx",
|
|
3155
|
+
[
|
|
3156
|
+
"add-mcp",
|
|
3157
|
+
REMOTE_MCP_URL,
|
|
3158
|
+
"--header",
|
|
3159
|
+
`"Authorization: Bearer ${apiKey}"`,
|
|
3160
|
+
"-g",
|
|
3161
|
+
"--all",
|
|
3162
|
+
"-y"
|
|
3163
|
+
],
|
|
3164
|
+
{
|
|
3165
|
+
stdio: "inherit",
|
|
3166
|
+
shell: true
|
|
3167
|
+
}
|
|
3168
|
+
);
|
|
3169
|
+
return result.status === 0;
|
|
3148
3170
|
}
|
|
3149
3171
|
async function runSkillsInstall() {
|
|
3150
3172
|
clack_default.log.info("Launching Nia skill installer...\n");
|
|
@@ -3249,15 +3271,20 @@ async function runWizard(options) {
|
|
|
3249
3271
|
message: "What would you like to do? (space to select, enter to confirm)",
|
|
3250
3272
|
options: [
|
|
3251
3273
|
{
|
|
3252
|
-
value: "mcp",
|
|
3253
|
-
label: "Install
|
|
3254
|
-
hint: "
|
|
3274
|
+
value: "add-mcp",
|
|
3275
|
+
label: "Install via add-mcp",
|
|
3276
|
+
hint: "Quick install to all agents (new standard)"
|
|
3255
3277
|
},
|
|
3256
3278
|
{
|
|
3257
3279
|
value: "skills",
|
|
3258
3280
|
label: "Install Nia Skill",
|
|
3259
3281
|
hint: "Install via skills CLI"
|
|
3260
3282
|
},
|
|
3283
|
+
{
|
|
3284
|
+
value: "mcp",
|
|
3285
|
+
label: "Install Nia MCP Server",
|
|
3286
|
+
hint: "Works, but migrating to add-mcp since it's a new standard"
|
|
3287
|
+
},
|
|
3261
3288
|
{
|
|
3262
3289
|
value: "manual",
|
|
3263
3290
|
label: "Manual Setup (View Config)",
|
|
@@ -3274,8 +3301,19 @@ async function runWizard(options) {
|
|
|
3274
3301
|
const apiKey = await getApiKey(options.apiKey);
|
|
3275
3302
|
storeApiKey(apiKey);
|
|
3276
3303
|
clack_default.log.success("API key saved");
|
|
3304
|
+
let installedAddMcp = false;
|
|
3277
3305
|
let installedMcp = false;
|
|
3278
3306
|
let installedSkills = false;
|
|
3307
|
+
if (actions.includes("add-mcp")) {
|
|
3308
|
+
console.log("");
|
|
3309
|
+
const success = await runAddMcpInstall(apiKey);
|
|
3310
|
+
if (success) {
|
|
3311
|
+
clack_default.log.success("Nia installed via add-mcp!");
|
|
3312
|
+
installedAddMcp = true;
|
|
3313
|
+
} else {
|
|
3314
|
+
clack_default.log.warn("add-mcp installation may have failed");
|
|
3315
|
+
}
|
|
3316
|
+
}
|
|
3279
3317
|
if (actions.includes("mcp")) {
|
|
3280
3318
|
let mode;
|
|
3281
3319
|
if (options.local !== void 0) {
|
|
@@ -3327,7 +3365,7 @@ async function runWizard(options) {
|
|
|
3327
3365
|
clack_default.log.warn("Skills installation may have failed");
|
|
3328
3366
|
}
|
|
3329
3367
|
}
|
|
3330
|
-
if (installedMcp || installedSkills) {
|
|
3368
|
+
if (installedAddMcp || installedMcp || installedSkills) {
|
|
3331
3369
|
const outroMessage = `
|
|
3332
3370
|
${chalk3.green("\u2713 Nia installed!")}
|
|
3333
3371
|
|
|
@@ -3416,6 +3454,301 @@ async function runMCPRemove(options = {}) {
|
|
|
3416
3454
|
clack_default.outro(chalk4.green("Done!"));
|
|
3417
3455
|
}
|
|
3418
3456
|
|
|
3457
|
+
// src/skill.ts
|
|
3458
|
+
import chalk5 from "chalk";
|
|
3459
|
+
import { spawnSync as spawnSync6 } from "child_process";
|
|
3460
|
+
var DEFAULT_SKILL_SOURCE = "nozomio-labs/nia-skill";
|
|
3461
|
+
var NON_INTERACTIVE_TIMEOUT_MS = 3e4;
|
|
3462
|
+
async function runSkillAdd(options) {
|
|
3463
|
+
if (options.debug) {
|
|
3464
|
+
enableDebug();
|
|
3465
|
+
}
|
|
3466
|
+
const nonInteractive = Boolean(options.nonInteractive || options.ci);
|
|
3467
|
+
const source = options.source || DEFAULT_SKILL_SOURCE;
|
|
3468
|
+
const allAgents = Boolean(options.allAgents);
|
|
3469
|
+
if (!options.json) {
|
|
3470
|
+
clack_default.intro(chalk5.bgCyan.black(" Nia Skill Installer "));
|
|
3471
|
+
}
|
|
3472
|
+
if (allAgents && options.target) {
|
|
3473
|
+
throw new Error("Use either `--target` or `--all-agents`, not both.");
|
|
3474
|
+
}
|
|
3475
|
+
if (nonInteractive && !options.apiKey) {
|
|
3476
|
+
throw new Error("`--api-key` is required when using `--non-interactive` or `--ci`.");
|
|
3477
|
+
}
|
|
3478
|
+
if (nonInteractive && options.apiKey && !options.apiKey.startsWith("nk_")) {
|
|
3479
|
+
throw new Error("Invalid API key format. Keys should start with `nk_`.");
|
|
3480
|
+
}
|
|
3481
|
+
const apiKey = nonInteractive ? options.apiKey : await getApiKey(options.apiKey);
|
|
3482
|
+
storeApiKey(apiKey);
|
|
3483
|
+
if (!options.json) {
|
|
3484
|
+
clack_default.log.success("API key saved");
|
|
3485
|
+
clack_default.log.info(`Installing skill source: ${source}`);
|
|
3486
|
+
}
|
|
3487
|
+
const capabilities = detectSkillsCapabilities();
|
|
3488
|
+
const installResult = runSkillsInstall2({
|
|
3489
|
+
source,
|
|
3490
|
+
target: options.target,
|
|
3491
|
+
allAgents,
|
|
3492
|
+
globalInstall: options.global ?? (nonInteractive || allAgents),
|
|
3493
|
+
nonInteractive,
|
|
3494
|
+
assumeYes: nonInteractive || Boolean(options.yes),
|
|
3495
|
+
jsonOutput: Boolean(options.json),
|
|
3496
|
+
capabilities
|
|
3497
|
+
});
|
|
3498
|
+
if (options.json) {
|
|
3499
|
+
console.log(
|
|
3500
|
+
JSON.stringify(
|
|
3501
|
+
{
|
|
3502
|
+
success: installResult.success,
|
|
3503
|
+
command: installResult.command,
|
|
3504
|
+
status: installResult.status,
|
|
3505
|
+
signal: installResult.signal,
|
|
3506
|
+
timedOut: installResult.timedOut,
|
|
3507
|
+
stdout: installResult.stdout,
|
|
3508
|
+
stderr: installResult.stderr
|
|
3509
|
+
},
|
|
3510
|
+
null,
|
|
3511
|
+
2
|
|
3512
|
+
)
|
|
3513
|
+
);
|
|
3514
|
+
}
|
|
3515
|
+
if (!installResult.success) {
|
|
3516
|
+
if (installResult.timedOut) {
|
|
3517
|
+
throw new Error(
|
|
3518
|
+
"Skills installation timed out in non-interactive mode. Install manually or run without `--non-interactive` to inspect prompts."
|
|
3519
|
+
);
|
|
3520
|
+
}
|
|
3521
|
+
throw new Error(
|
|
3522
|
+
`Skills installation failed (${installResult.status ?? "no-exit-code"}). Use \`--debug\` to inspect command behavior.`
|
|
3523
|
+
);
|
|
3524
|
+
}
|
|
3525
|
+
if (!options.json) {
|
|
3526
|
+
clack_default.log.success("Nia skill installed!");
|
|
3527
|
+
clack_default.outro(chalk5.green("Done!"));
|
|
3528
|
+
}
|
|
3529
|
+
}
|
|
3530
|
+
function detectSkillsCapabilities() {
|
|
3531
|
+
const result = spawnSync6("npx", ["skills", "add", "--help"], {
|
|
3532
|
+
shell: false,
|
|
3533
|
+
stdio: "pipe",
|
|
3534
|
+
encoding: "utf-8",
|
|
3535
|
+
timeout: 8e3,
|
|
3536
|
+
env: {
|
|
3537
|
+
...process.env,
|
|
3538
|
+
CI: "1",
|
|
3539
|
+
TERM: "dumb",
|
|
3540
|
+
FORCE_COLOR: "0",
|
|
3541
|
+
NO_COLOR: "1"
|
|
3542
|
+
}
|
|
3543
|
+
});
|
|
3544
|
+
const output = `${result.stdout ?? ""}
|
|
3545
|
+
${result.stderr ?? ""}`.toLowerCase();
|
|
3546
|
+
if (result.status !== 0 || !output.trim()) {
|
|
3547
|
+
const fallback = {
|
|
3548
|
+
target: false,
|
|
3549
|
+
agent: true,
|
|
3550
|
+
all: true,
|
|
3551
|
+
globalLong: true,
|
|
3552
|
+
globalShort: true,
|
|
3553
|
+
yesLong: true,
|
|
3554
|
+
yesShort: true,
|
|
3555
|
+
nonInteractive: false,
|
|
3556
|
+
ci: false,
|
|
3557
|
+
json: false
|
|
3558
|
+
};
|
|
3559
|
+
debug("skills capabilities fallback", fallback);
|
|
3560
|
+
return fallback;
|
|
3561
|
+
}
|
|
3562
|
+
const capabilities = {
|
|
3563
|
+
target: output.includes("--target"),
|
|
3564
|
+
agent: output.includes("--agent"),
|
|
3565
|
+
all: output.includes("--all"),
|
|
3566
|
+
globalLong: output.includes("--global"),
|
|
3567
|
+
globalShort: output.includes(" -g") || output.includes(", -g"),
|
|
3568
|
+
yesLong: output.includes("--yes"),
|
|
3569
|
+
yesShort: output.includes(" -y") || output.includes(", -y"),
|
|
3570
|
+
nonInteractive: output.includes("--non-interactive"),
|
|
3571
|
+
ci: output.includes("--ci"),
|
|
3572
|
+
json: output.includes("--json")
|
|
3573
|
+
};
|
|
3574
|
+
debug("skills capabilities", capabilities);
|
|
3575
|
+
return capabilities;
|
|
3576
|
+
}
|
|
3577
|
+
function runSkillsInstall2(params) {
|
|
3578
|
+
const args = ["skills", "add", params.source];
|
|
3579
|
+
if (params.globalInstall) {
|
|
3580
|
+
if (params.capabilities.globalLong) {
|
|
3581
|
+
args.push("--global");
|
|
3582
|
+
} else if (params.capabilities.globalShort) {
|
|
3583
|
+
args.push("-g");
|
|
3584
|
+
} else if (params.nonInteractive) {
|
|
3585
|
+
throw new Error(
|
|
3586
|
+
"`skills add` in this environment does not advertise `--global`/`-g`; cannot enforce deterministic scope."
|
|
3587
|
+
);
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
if (params.allAgents) {
|
|
3591
|
+
if (params.capabilities.all) {
|
|
3592
|
+
args.push("--all");
|
|
3593
|
+
} else if (params.capabilities.agent) {
|
|
3594
|
+
args.push("--agent", "*");
|
|
3595
|
+
} else {
|
|
3596
|
+
throw new Error(
|
|
3597
|
+
"`skills add` in this environment does not advertise `--all` or `--agent`; cannot target all agents."
|
|
3598
|
+
);
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
if (params.target) {
|
|
3602
|
+
if (params.capabilities.target) {
|
|
3603
|
+
args.push("--target", params.target);
|
|
3604
|
+
} else if (params.capabilities.agent) {
|
|
3605
|
+
args.push("--agent", params.target);
|
|
3606
|
+
} else {
|
|
3607
|
+
throw new Error(
|
|
3608
|
+
"`skills add` in this environment does not advertise `--target` or `--agent`; cannot enforce target."
|
|
3609
|
+
);
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
if (params.assumeYes) {
|
|
3613
|
+
if (params.capabilities.yesLong) {
|
|
3614
|
+
args.push("--yes");
|
|
3615
|
+
} else if (params.capabilities.yesShort) {
|
|
3616
|
+
args.push("-y");
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
if (params.nonInteractive) {
|
|
3620
|
+
if (params.capabilities.nonInteractive) {
|
|
3621
|
+
args.push("--non-interactive");
|
|
3622
|
+
} else if (params.capabilities.ci) {
|
|
3623
|
+
args.push("--ci");
|
|
3624
|
+
}
|
|
3625
|
+
}
|
|
3626
|
+
if (params.jsonOutput && params.capabilities.json) {
|
|
3627
|
+
args.push("--json");
|
|
3628
|
+
}
|
|
3629
|
+
const command = `npx ${args.join(" ")}`;
|
|
3630
|
+
debug("running", command);
|
|
3631
|
+
const result = spawnSync6("npx", args, {
|
|
3632
|
+
shell: false,
|
|
3633
|
+
stdio: params.nonInteractive ? "pipe" : "inherit",
|
|
3634
|
+
encoding: params.nonInteractive ? "utf-8" : void 0,
|
|
3635
|
+
timeout: params.nonInteractive ? NON_INTERACTIVE_TIMEOUT_MS : void 0,
|
|
3636
|
+
env: {
|
|
3637
|
+
...process.env,
|
|
3638
|
+
...params.nonInteractive ? {
|
|
3639
|
+
CI: "1",
|
|
3640
|
+
TERM: "dumb",
|
|
3641
|
+
FORCE_COLOR: "0",
|
|
3642
|
+
NO_COLOR: "1"
|
|
3643
|
+
} : {}
|
|
3644
|
+
}
|
|
3645
|
+
});
|
|
3646
|
+
const timedOut = params.nonInteractive && Boolean(result.error && "code" in result.error && result.error.code === "ETIMEDOUT");
|
|
3647
|
+
const stdout = params.nonInteractive ? result.stdout || "" : "";
|
|
3648
|
+
const stderr = params.nonInteractive ? result.stderr || "" : "";
|
|
3649
|
+
if (stdout) {
|
|
3650
|
+
debug("skills stdout", stdout);
|
|
3651
|
+
}
|
|
3652
|
+
if (stderr) {
|
|
3653
|
+
debug("skills stderr", stderr);
|
|
3654
|
+
}
|
|
3655
|
+
if (result.error) {
|
|
3656
|
+
debug("skills error", result.error);
|
|
3657
|
+
}
|
|
3658
|
+
return {
|
|
3659
|
+
success: result.status === 0,
|
|
3660
|
+
command,
|
|
3661
|
+
status: result.status,
|
|
3662
|
+
signal: result.signal,
|
|
3663
|
+
timedOut,
|
|
3664
|
+
stdout,
|
|
3665
|
+
stderr
|
|
3666
|
+
};
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
// src/agent-guide.ts
|
|
3670
|
+
var AGENT_GUIDE_MARKDOWN = [
|
|
3671
|
+
"# Nia Agent Onboarding (Headless)",
|
|
3672
|
+
"",
|
|
3673
|
+
"Use this flow when an agent cannot complete browser-based setup.",
|
|
3674
|
+
"",
|
|
3675
|
+
"## Base URL",
|
|
3676
|
+
"",
|
|
3677
|
+
"`https://apigcp.trynia.ai/v2`",
|
|
3678
|
+
"",
|
|
3679
|
+
"## New Account",
|
|
3680
|
+
"",
|
|
3681
|
+
"1. Create account + bootstrap token:",
|
|
3682
|
+
"",
|
|
3683
|
+
"```bash",
|
|
3684
|
+
'curl -sS -X POST "https://apigcp.trynia.ai/v2/auth/signup" \\',
|
|
3685
|
+
' -H "Content-Type: application/json" \\',
|
|
3686
|
+
` -d '{"email":"agent@example.com","password":"strong-password-123","organization_name":"Agent Org"}'`,
|
|
3687
|
+
"```",
|
|
3688
|
+
"",
|
|
3689
|
+
"2. Exchange bootstrap token for API key:",
|
|
3690
|
+
"",
|
|
3691
|
+
"```bash",
|
|
3692
|
+
'curl -sS -X POST "https://apigcp.trynia.ai/v2/auth/bootstrap-key" \\',
|
|
3693
|
+
' -H "Content-Type: application/json" \\',
|
|
3694
|
+
` -d '{"bootstrap_token":"<bootstrap-token>"}'`,
|
|
3695
|
+
"```",
|
|
3696
|
+
"",
|
|
3697
|
+
"## Existing Account",
|
|
3698
|
+
"",
|
|
3699
|
+
"Create API key directly with email/password:",
|
|
3700
|
+
"",
|
|
3701
|
+
"```bash",
|
|
3702
|
+
'curl -sS -X POST "https://apigcp.trynia.ai/v2/auth/login-key" \\',
|
|
3703
|
+
' -H "Content-Type: application/json" \\',
|
|
3704
|
+
` -d '{"email":"agent@example.com","password":"strong-password-123"}'`,
|
|
3705
|
+
"```",
|
|
3706
|
+
"",
|
|
3707
|
+
"## Install Nia Skill (Non-Interactive)",
|
|
3708
|
+
"",
|
|
3709
|
+
"Install for all detected agents:",
|
|
3710
|
+
"",
|
|
3711
|
+
"```bash",
|
|
3712
|
+
"npx nia-wizard skill add \\",
|
|
3713
|
+
' --api-key "<nk_api_key>" \\',
|
|
3714
|
+
" --source nozomio-labs/nia-skill \\",
|
|
3715
|
+
" --all-agents \\",
|
|
3716
|
+
" --non-interactive \\",
|
|
3717
|
+
" --ci",
|
|
3718
|
+
"```",
|
|
3719
|
+
"",
|
|
3720
|
+
"Install for one target agent:",
|
|
3721
|
+
"",
|
|
3722
|
+
"```bash",
|
|
3723
|
+
"npx nia-wizard skill add \\",
|
|
3724
|
+
' --api-key "<nk_api_key>" \\',
|
|
3725
|
+
" --source nozomio-labs/nia-skill \\",
|
|
3726
|
+
" --non-interactive \\",
|
|
3727
|
+
" --ci",
|
|
3728
|
+
"```",
|
|
3729
|
+
"",
|
|
3730
|
+
"Target pinning example:",
|
|
3731
|
+
"",
|
|
3732
|
+
"```bash",
|
|
3733
|
+
'npx nia-wizard skill add --api-key "<nk_api_key>" --target codex --non-interactive --ci',
|
|
3734
|
+
"```",
|
|
3735
|
+
"",
|
|
3736
|
+
"Supported `--target` values:",
|
|
3737
|
+
"",
|
|
3738
|
+
"`amp`, `kimi-cli`, `replit`, `universal`, `antigravity`, `augment`, `claude-code`, `openclaw`, `cline`, `codebuddy`, `codex`, `command-code`, `continue`, `cortex`, `crush`, `cursor`, `droid`, `gemini-cli`, `github-copilot`, `goose`, `junie`, `iflow-cli`, `kilo`, `kiro-cli`, `kode`, `mcpjam`, `mistral-vibe`, `mux`, `opencode`, `openhands`, `pi`, `qoder`, `qwen-code`, `roo`, `trae`, `trae-cn`, `windsurf`, `zencoder`, `neovate`, `pochi`, `adal`",
|
|
3739
|
+
"",
|
|
3740
|
+
"## Command",
|
|
3741
|
+
"",
|
|
3742
|
+
"Print this guide any time:",
|
|
3743
|
+
"",
|
|
3744
|
+
"```bash",
|
|
3745
|
+
"npx nia-wizard agent-guide",
|
|
3746
|
+
"```"
|
|
3747
|
+
].join("\n");
|
|
3748
|
+
function printAgentGuide() {
|
|
3749
|
+
console.log(AGENT_GUIDE_MARKDOWN);
|
|
3750
|
+
}
|
|
3751
|
+
|
|
3419
3752
|
export {
|
|
3420
3753
|
startDeviceSession,
|
|
3421
3754
|
exchangeForApiKey,
|
|
@@ -3429,6 +3762,8 @@ export {
|
|
|
3429
3762
|
removeMCPServerFromClientsStep,
|
|
3430
3763
|
runWizard,
|
|
3431
3764
|
runMCPAdd,
|
|
3432
|
-
runMCPRemove
|
|
3765
|
+
runMCPRemove,
|
|
3766
|
+
runSkillAdd,
|
|
3767
|
+
printAgentGuide
|
|
3433
3768
|
};
|
|
3434
|
-
//# sourceMappingURL=chunk-
|
|
3769
|
+
//# sourceMappingURL=chunk-JKF3ZFD5.js.map
|