Skip to content

npm CLI reference

The quell command has eight subcommands: find, score, generate, verify, gate, mcp, eval and mocks. This page lists every command, every flag accepted by quelltest 0.3.1 and every exit code, so you can script it in CI or give it to an agent. Run npx quell --help for the same information in the terminal.

What is the general syntax?

quell <find|score|generate|verify|gate|mcp|eval|mocks> [PATH] [options]
  • PATH is a directory or a single file and defaults to .. At most one path is accepted.
  • If the first argument is not a command but looks like a path (it contains a slash, starts with a dot, has an extension, or exists), the command is find: npx quell src equals npx quell find src.
  • Options accept --name value and --name=value. -- ends option parsing.
  • -h/--help and -v/--version print help and the version.

What does each command do?

CommandPurposeRuns your code?
find [PATH]List risk-ranked edge-case candidates per function.No
score [PATH]Print the share of candidates your tests execute, from coverage data.No
generate [PATH]Write tests for guards it can analyse; notes for the rest.Only with --verify
verify TEST_FILE --source FILEProve a test fails when the source is mutated.Yes (your tests)
gate --diff REFDetect weakened tests in a change.No
mcpMCP server on stdio with tools find, verify, gate.Through verify
mocks [PATH] --examples FILECompare annotated stubs with recorded API examples.No
evalRun the bundled benchmark and print JSON.Yes (bundled fixtures)

Which options apply to which command?

Reporting options (find, score, generate)

OptionMeaning
--jsonPrint the full report as JSON.
--sarifPrint SARIF 2.1.0 for GitHub code scanning (find, score).
--coverage FILEcoverage-final.json (Istanbul) or lcov.info. Default: ./coverage/coverage-final.json, then ./coverage/lcov.info.
--diff REFOnly candidates on lines changed since the merge-base with REF, including uncommitted and untracked files.
--allShow covered candidates too and do not truncate the list.
--top NNumber of candidates to print (default 10, minimum 1).
--threshold NExit 1 when the score is below N (integer, 0 or more); exit 3 when there is nothing to score from.
--include GLOBOnly scan matching files. Repeatable.
--exclude GLOBSkip matching files. Repeatable; --ignore is an alias. Also read from .quellignore. Patterns match paths relative to the scanned directory.
--min-confidence LOnly findings at least this trustworthy: low, medium or high.
--include-testsScan test files too.

generate options

OptionMeaning
--writeWrite tests and TODO notes to disk. Without it the command is a dry run.
--destination DIROutput directory (default tests/quelltest).
--runner NAMEnode, jest, vitest or mocha. Default: detected from package.json.
--verifyKeep only tests that pass on the original and fail on a source mutant.
--include-coveredAlso generate for candidates your tests already cover.
--llm MODULEESM module whose default export writes tests for findings the rules cannot. It is your code; see privacy.

verify options

OptionMeaning
--source FILESource file to mutate. Required.
--runner NAMEnode (default), jest, vitest or mocha.
--function NAMEOnly mutate this function. Repeatable.
--findingsAim mutation at the lines the scanner flagged.
--min-score NAlso require N% of decided mutants killed (0 to 100).
--handoff FILEWrite surviving mutants as Markdown an agent can act on.
--command CMDRun your own command instead of a runner; {test} is replaced by the test path.
--infra-exit CODEExit code your command uses for "the environment failed". Repeatable; counted as inconclusive, never as a kill.
--timeout SECONDSPer-run timeout (default 60).
--in-placeMutate the source file itself (with a backup) instead of a temporary copy.
--jsonPrint the full verification result as JSON.

gate and mocks options

OptionMeaning
--diff REFgate: git ref to compare against. Required.
--strictgate: also fail on "expected value changed" review items.
--json, --sarifgate: machine-readable output. --sarif wins if both are given.
--examples FILEmocks: HAR file, JSON examples file or OpenAPI JSON. Required.
--jsonmocks: print { examples, problems } as JSON.

What are the exit codes?

CodeMeaningCommands
0Success.all
1Score below --threshold; or eval found noise or wrong verdicts.find, score, generate, eval
2Usage or runtime error (unknown option, missing --source, bad git ref, unreadable file).all
3--threshold given but there is nothing to score from (no coverage evidence).find, score, generate
4verify did not verify the test.verify
5gate found weakened tests.gate
6mocks found stub drift.mocks

When --threshold is set and the scan finds no candidates at all, the exit code is 0.

npx quell score src --threshold 60 ; echo $?
npx quell verify tests/pay.test.js --source src/pay.js ; echo $?
npx quell gate ; echo $?
Score: not scored (no coverage evidence) | 6 candidates
3
Not verified: test fails on the original code (node --test ...): ReferenceError: test is not defined
4
quell: gate requires --diff REF
Run `quell --help` for usage.
2

(The second command used the default node runner on a Jest test file, which is why it is not verified: see how verify works.)

What does the JSON report look like?

find --json and score --json print one object:

{
  "version": 1,
  "root": "/path/to/project",
  "findings": [
    {
      "id": "7f6b9ca36c8d",
      "file": "src/files.js",
      "line": 4,
      "column": 16,
      "endLine": 4,
      "endColumn": 64,
      "function": "download",
      "category": "risk",
      "rule": "path-traversal",
      "confidence": "high",
      "evidence": "fs.readFileSync('/srv/uploads/' + req.query.name)",
      "suggestion": "request value reaches a file path; test \"../\" and absolute paths and use path.basename or a base-directory check",
      "risk": 10,
      "covered": false
    }
  ],
  "skipped": [],
  "restored": [],
  "suppressed": 0,
  "summary": {
    "total": 13,
    "coverageEvidence": "istanbul",
    "evidenceFile": "coverage/coverage-final.json",
    "score": 15,
    "tier": "edge-cases-uncovered",
    "covered": 2,
    "uncovered": 11
  }
}
  • id hashes the function name and the evidence, not the line number, so it survives unrelated edits.
  • category is throws, boundary, nullish, jsdoc, schema, async, or risk (then rule names the rule).
  • confidence is low, medium or high. covered is present only when coverage evidence was given.
  • summary.coverageEvidence is none, istanbul or lcov. summary.tier is production-ready, review-needed, edge-cases-uncovered, not-scored or no-findings; score is null unless it was computed.
  • skipped lists files that could not be parsed; suppressed counts findings silenced by quell-ignore.

verify --json returns verified, reason, killed, total, inconclusive, ignored, mutationScore, isolation and a mutants array. gate --json returns { issues, ok, checked }. Treat the report as versioned (version: 1) and never parse the human-readable output.

Is there a library API?

Yes. The package exports scan, score, report, generate, generateWithLlm, verifyGenerated, toSarif, gate, gateSarif, renderHandoff, checkStubs and loadExamples for ESM and CommonJS, with TypeScript declarations.