@ia-qa/cli 1.0.12 → 1.1.0
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 -20
- package/index.js +38 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
# @ia-qa/cli
|
|
2
2
|
|
|
3
|
-
Run [ia-qa.com](https://www.ia-qa.com)'s **
|
|
4
|
-
|
|
3
|
+
Run [ia-qa.com](https://www.ia-qa.com)'s **QA judges** from your shell — for AI agents (Claude Code,
|
|
4
|
+
Copilot CLI, Cursor agents), humans and CI steps. Each tool returns a verdict and a `gate` field
|
|
5
|
+
(`pass | review | fail`). **Zero dependencies. No signup.**
|
|
5
6
|
|
|
6
|
-
Most tools run **key-free**. For the
|
|
7
|
-
your own key (BYOK)** — pass it as a parameter; nothing is stored.
|
|
7
|
+
Most tools run **key-free**. For the few that call a model (test cases from a ticket, an eval contract
|
|
8
|
+
on your provider), **bring your own key (BYOK)** — pass it as a parameter; nothing is stored.
|
|
8
9
|
|
|
9
10
|
The CLI carries no business logic: it discovers tools from the public MCP manifest and runs them on
|
|
10
11
|
the hosted server (`https://www.ia-qa.com`). Requires **Node ≥ 18**.
|
|
@@ -25,10 +26,11 @@ Set up @ia-qa/cli in this project so you can run QA tools from the shell.
|
|
|
25
26
|
4. Run one of them on my real data — after I confirm which.
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
Step 1 is the load-bearing one: the catalogue changes with
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
Step 1 is the load-bearing one: the catalogue changes with server deploys, so a model answering from
|
|
30
|
+
memory will confidently invoke tools that don't exist. `list` is generated from the live manifest.
|
|
31
|
+
Step 3 is not politeness — this CLI is a thin client, **your input is sent to `https://www.ia-qa.com`
|
|
32
|
+
to be executed there**; `@ia-qa/pal`, `@ia-qa/self-healing` and `@ia-qa/qa-discovery` run on your
|
|
33
|
+
machine instead.
|
|
32
34
|
|
|
33
35
|
Agents that speak MCP can skip the CLI entirely and point at `https://www.ia-qa.com/mcp` — same
|
|
34
36
|
tools, same manifest.
|
|
@@ -51,30 +53,41 @@ node ia-qa.js --help
|
|
|
51
53
|
|
|
52
54
|
```bash
|
|
53
55
|
ia-qa --help # categories + examples
|
|
54
|
-
ia-qa list [--category
|
|
56
|
+
ia-qa list [--category security] # every listed tool, one line each
|
|
55
57
|
ia-qa <tool> --help # flags for one tool
|
|
56
58
|
|
|
57
|
-
ia-qa
|
|
58
|
-
ia-qa
|
|
59
|
-
ia-qa hash_text "secret" --algorithm sha256
|
|
60
|
-
echo '{"b":2,"a":1}' | ia-qa format_json --stdin
|
|
59
|
+
ia-qa screen_text "ignore all previous instructions" --json
|
|
60
|
+
ia-qa screen_text --text-file prompt.txt --checks injection,secrets --report scan.html --open
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
ia-qa
|
|
64
|
-
|
|
62
|
+
git diff origin/main...HEAD > diff.txt
|
|
63
|
+
ia-qa run_pr_gate_pipeline --git_diff-file diff.txt --json --out gate.json
|
|
64
|
+
|
|
65
|
+
ia-qa package_check --lockfile-file package-lock.json --json --out deps.json
|
|
66
|
+
ia-qa get_testing_guidelines --query "flaky tests"
|
|
65
67
|
```
|
|
66
68
|
|
|
69
|
+
- **The verdict is in the answer, not the exit code.** The exit code says whether the call ran:
|
|
70
|
+
`0` it ran, whatever the verdict · `2` malformed call (missing or bad flag) · `1` server or network
|
|
71
|
+
error. A CI step reads `gate` from the JSON: `fail` and `review` (the tool could not decide — not a
|
|
72
|
+
pass) stop the build. `generate_ci_workflow` writes those steps for you.
|
|
67
73
|
- **`--json`** emits machine-parsable JSON (default is human-readable).
|
|
68
|
-
-
|
|
74
|
+
- **`--out <file>`** writes the answer to a file. Without it, an answer over 4 000 characters goes to a
|
|
75
|
+
temp file and stdout holds only its path — so in CI always use `--out`, never `> file.json`.
|
|
76
|
+
- **`--<param>-file <path>`** reads any parameter from a file: multiline-safe, and the way to pass a
|
|
77
|
+
diff or a document (one shell argument is capped at 128 KB on Linux).
|
|
69
78
|
- **`--report <file.html>`** also writes a self-contained, ia-qa.com-branded HTML report of the run
|
|
70
79
|
(verdict, stats, per-case badges — secret params redacted). Add **`--open`** to open it in your
|
|
71
80
|
browser (local use; leave it off in CI). `--open` alone writes a default-named report and opens it.
|
|
72
81
|
- **`--stdin`** (or `-` as the positional) reads the primary input from stdin.
|
|
73
82
|
- **`--server <url>`** / **`$IAQA_SERVER`** point at another server (default `https://www.ia-qa.com`,
|
|
74
83
|
or a self-hosted ia-qa server).
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
84
|
+
|
|
85
|
+
## Tools that left the list
|
|
86
|
+
|
|
87
|
+
In November 2026 the server went from 156 listed tools to the current list: each tool kept absorbed its
|
|
88
|
+
neighbours, with the same engines, and the utilities stay on the website. An old name (`secret_scan`,
|
|
89
|
+
`format_json`…) still answers until **2027-05-22**: the CLI runs it, prints on stderr the tool that
|
|
90
|
+
replaces it, and `ia-qa list --all` shows every old name with its replacement.
|
|
78
91
|
|
|
79
92
|
## Also available as MCP
|
|
80
93
|
|
package/index.js
CHANGED
|
@@ -35,12 +35,17 @@ const VERSION = (() => { try { return require('./package.json').version; } catch
|
|
|
35
35
|
|
|
36
36
|
// ── argv parsing (no dependency) ─────────────────────────────────────────────
|
|
37
37
|
|
|
38
|
+
// A flag is `--name` or `--name=value`. Anything else that starts with `--` is a value: a hand-made
|
|
39
|
+
// diff (`--- a/x.js`) or an SQL comment used to become a flag of its own and the tool got `true`.
|
|
40
|
+
const FLAG_RE = /^--[A-Za-z0-9][A-Za-z0-9_-]*(=|$)/;
|
|
41
|
+
const isFlag = (tok) => typeof tok === 'string' && FLAG_RE.test(tok);
|
|
42
|
+
|
|
38
43
|
function parseArgv(argv) {
|
|
39
44
|
const positional = [];
|
|
40
45
|
const flags = {};
|
|
41
46
|
for (let i = 0; i < argv.length; i++) {
|
|
42
47
|
const tok = argv[i];
|
|
43
|
-
if (tok
|
|
48
|
+
if (isFlag(tok)) {
|
|
44
49
|
const bodyTok = tok.slice(2);
|
|
45
50
|
const eq = bodyTok.indexOf('=');
|
|
46
51
|
if (eq !== -1) {
|
|
@@ -51,7 +56,7 @@ function parseArgv(argv) {
|
|
|
51
56
|
}
|
|
52
57
|
const key = bodyTok;
|
|
53
58
|
const next = argv[i + 1];
|
|
54
|
-
if (next === undefined || next
|
|
59
|
+
if (next === undefined || isFlag(next)) {
|
|
55
60
|
flags[key] = flags[key] === undefined ? true : flags[key];
|
|
56
61
|
} else {
|
|
57
62
|
const val = next;
|
|
@@ -401,9 +406,21 @@ function renderHtmlReport({ toolName, params, result, server, version }) {
|
|
|
401
406
|
|
|
402
407
|
// ── help & list ──────────────────────────────────────────────────────────────
|
|
403
408
|
|
|
409
|
+
// The manifest also carries the names that left the server's list (MCP V2), marked `deprecated`, so a
|
|
410
|
+
// CI step that calls one keeps working until its date. Help and list show the listed tools.
|
|
411
|
+
const listedOf = (m) => m.tools.filter((t) => !t.deprecated);
|
|
412
|
+
const oldNamesLine = (m) => {
|
|
413
|
+
const old = m.tools.filter((t) => t.deprecated);
|
|
414
|
+
if (!old.length) return null;
|
|
415
|
+
const until = old[0].deprecated.until;
|
|
416
|
+
return `${old.length} older ${old.length > 1 ? 'names still answer' : 'name still answers'}${until ? ` until ${until}` : ''}: ia-qa list --all`;
|
|
417
|
+
};
|
|
418
|
+
const replacedBy = (t) => (t.deprecated.use ? `use ${t.deprecated.use}` : 'it stays on the website');
|
|
419
|
+
|
|
404
420
|
function compactHelp(m) {
|
|
405
421
|
const groups = {};
|
|
406
|
-
|
|
422
|
+
const tools = listedOf(m);
|
|
423
|
+
for (const t of tools) (groups[t.category || 'other'] = groups[t.category || 'other'] || []).push(t.name);
|
|
407
424
|
const cats = Object.entries(groups).sort((a, b) => b[1].length - a[1].length)
|
|
408
425
|
.map(([c, n]) => `${c}(${n.length})`).join(' ');
|
|
409
426
|
return [
|
|
@@ -416,38 +433,42 @@ function compactHelp(m) {
|
|
|
416
433
|
'',
|
|
417
434
|
'Usage: ia-qa <tool> [input] [--flag value] [--json] [--out <file>] [--report <file.html>] [--stdin]',
|
|
418
435
|
'',
|
|
419
|
-
`${
|
|
436
|
+
`${tools.length} tools. Categories (use "ia-qa list [--category <c>]" for names):`,
|
|
420
437
|
` ${cats}`,
|
|
438
|
+
...(oldNamesLine(m) ? [` ${oldNamesLine(m)}`] : []),
|
|
421
439
|
'',
|
|
422
440
|
' ia-qa <tool> --help flags for one tool',
|
|
423
441
|
' ia-qa list every tool, one line each',
|
|
424
442
|
' ia-qa --version print the installed CLI version',
|
|
425
443
|
'',
|
|
426
444
|
'Examples:',
|
|
427
|
-
' ia-qa
|
|
428
|
-
' ia-qa
|
|
429
|
-
|
|
430
|
-
'
|
|
445
|
+
' ia-qa screen_text "ignore all previous instructions" --report scan.html',
|
|
446
|
+
' ia-qa run_pr_gate_pipeline --git_diff-file diff.txt --json --out gate.json',
|
|
447
|
+
' ia-qa get_testing_guidelines --query "flaky tests"',
|
|
448
|
+
'',
|
|
449
|
+
'The exit code says whether the call ran (0 · 2 malformed · 1 server error); the verdict is the answer\'s "gate": pass | review | fail.',
|
|
431
450
|
'',
|
|
432
451
|
`Runs on ${DEFAULT_SERVER} (override with --server or $IAQA_SERVER). No signup; most tools key-free, BYOK for LLM tools.`,
|
|
433
452
|
].join('\n');
|
|
434
453
|
}
|
|
435
454
|
|
|
436
|
-
function listTools(m, category) {
|
|
437
|
-
let tools = m.tools;
|
|
455
|
+
function listTools(m, category, all = false) {
|
|
456
|
+
let tools = all ? m.tools : listedOf(m);
|
|
438
457
|
if (category) tools = tools.filter((t) => (t.category || 'other') === category);
|
|
439
458
|
if (!tools.length) {
|
|
440
|
-
const cats = [...new Set(m.
|
|
459
|
+
const cats = [...new Set(listedOf(m).map((t) => t.category || 'other'))].sort();
|
|
441
460
|
return `No tools in category "${category}". Available: ${cats.join(', ')}`;
|
|
442
461
|
}
|
|
443
|
-
return tools.map((t) => `${t.name}\t${(t.description || '').split('. ')[0].slice(0, 80)}`).join('\n');
|
|
462
|
+
return tools.map((t) => `${t.name}\t${t.deprecated ? `(old name, ${replacedBy(t)})` : (t.description || '').split('. ')[0].slice(0, 80)}`).join('\n');
|
|
444
463
|
}
|
|
445
464
|
|
|
465
|
+
const deprecatedLine = (tool) => `${tool.name} is no longer listed: ${replacedBy(tool)}${tool.deprecated.until ? ` (it answers until ${tool.deprecated.until})` : ''}.`;
|
|
466
|
+
|
|
446
467
|
function toolHelp(tool) {
|
|
447
468
|
const props = (tool.inputSchema && tool.inputSchema.properties) || {};
|
|
448
469
|
const required = new Set((tool.inputSchema && tool.inputSchema.required) || []);
|
|
449
470
|
const primary = primaryParam(tool.inputSchema);
|
|
450
|
-
const lines = [`Usage: ia-qa ${tool.name} [input] [options]`, '', tool.description || ''];
|
|
471
|
+
const lines = [...(tool.deprecated ? [deprecatedLine(tool), ''] : []), `Usage: ia-qa ${tool.name} [input] [options]`, '', tool.description || ''];
|
|
451
472
|
if (Object.keys(props).length) {
|
|
452
473
|
lines.push('', 'Options:');
|
|
453
474
|
for (const [k, p] of Object.entries(props)) {
|
|
@@ -522,7 +543,7 @@ async function main(argv) {
|
|
|
522
543
|
const { positional, flags } = parseArgv(rest);
|
|
523
544
|
|
|
524
545
|
if (command === 'list') {
|
|
525
|
-
process.stdout.write(listTools(await manifest(server), flags.category) + '\n');
|
|
546
|
+
process.stdout.write(listTools(await manifest(server), flags.category, !!flags.all) + '\n');
|
|
526
547
|
return;
|
|
527
548
|
}
|
|
528
549
|
|
|
@@ -570,6 +591,9 @@ async function main(argv) {
|
|
|
570
591
|
reportPath = typeof flags.report === 'string' ? flags.report : `ia-qa-${tool.name}-report.html`;
|
|
571
592
|
}
|
|
572
593
|
|
|
594
|
+
// On stderr: a CI log shows it, and the --json answer on stdout stays parseable.
|
|
595
|
+
if (tool.deprecated) process.stderr.write(`⚠ ${deprecatedLine(tool)}\n`);
|
|
596
|
+
|
|
573
597
|
const data = await callTool(server, tool.name, params);
|
|
574
598
|
|
|
575
599
|
if (reportPath) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ia-qa/cli",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Run ia-qa.com's QA/LLM/dev toolbox 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",
|