@ia-qa/cli 1.0.2 → 1.0.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/index.js +18 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -40,7 +40,15 @@ function parseArgv(argv) {
|
|
|
40
40
|
for (let i = 0; i < argv.length; i++) {
|
|
41
41
|
const tok = argv[i];
|
|
42
42
|
if (tok.startsWith('--')) {
|
|
43
|
-
const
|
|
43
|
+
const bodyTok = tok.slice(2);
|
|
44
|
+
const eq = bodyTok.indexOf('=');
|
|
45
|
+
if (eq !== -1) {
|
|
46
|
+
const key = bodyTok.slice(0, eq);
|
|
47
|
+
const val = bodyTok.slice(eq + 1);
|
|
48
|
+
flags[key] = flags[key] === undefined ? val : [].concat(flags[key], val);
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const key = bodyTok;
|
|
44
52
|
const next = argv[i + 1];
|
|
45
53
|
if (next === undefined || next.startsWith('--')) {
|
|
46
54
|
flags[key] = flags[key] === undefined ? true : flags[key];
|
|
@@ -278,8 +286,16 @@ async function main(argv) {
|
|
|
278
286
|
process.stderr.write(`⚠ Sending secret param(s) [${secretKeys.join(', ')}] to ${server} — make sure you trust this server (set via --server/$IAQA_SERVER).\n`);
|
|
279
287
|
}
|
|
280
288
|
|
|
289
|
+
let outPath = null;
|
|
290
|
+
if (flags.out !== undefined) {
|
|
291
|
+
if (typeof flags.out !== 'string') {
|
|
292
|
+
throw new CliError('--out needs a single file path, e.g. --out result.json', 2);
|
|
293
|
+
}
|
|
294
|
+
outPath = flags.out;
|
|
295
|
+
}
|
|
296
|
+
|
|
281
297
|
const data = await callTool(server, tool.name, params);
|
|
282
|
-
process.stdout.write(emit(data, { json: !!flags.json, out:
|
|
298
|
+
process.stdout.write(emit(data, { json: !!flags.json, out: outPath, toolName: tool.name }) + '\n');
|
|
283
299
|
}
|
|
284
300
|
|
|
285
301
|
if (require.main === module) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ia-qa/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Run ia-qa.com's 148 QA/LLM/dev tools from your shell — for AI agents (Claude Code, Copilot CLI) and humans. Zero dependencies, no signup; most tools key-free, BYOK for the LLM-powered ones.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ia-qa",
|