# Quelltest for npm

> Free offline CLI for JavaScript and TypeScript that proves tests fail when code is wrong, flags weakened tests in a diff, and ranks untested risky edges.

Canonical page: https://quelltest.com/docs/npm

Quelltest for npm (package `quelltest`, version 0.3.1, Apache-2.0) is a free command-line tool that checks whether JavaScript and TypeScript tests would fail if the code were wrong, detects when a change weakens tests, and lists risky edges that no test executes. Use it when an AI agent or a teammate writes tests and you want evidence that they protect the code. It works with Jest, Vitest, Mocha and `node:test`, runs offline, and never sends code anywhere.

```bash
npm install --save-dev quelltest
npx quell verify tests/pay.test.js --source src/pay.js --runner jest
npx quell gate --diff origin/main
npx quell find src --diff origin/main --coverage coverage/coverage-final.json
```

## What are the three checks?

| Check | Question it answers | Command |
| --- | --- | --- |
| Verify | Would this test fail if the code were wrong? | `quell verify TEST --source FILE` |
| Gate | Did this change weaken the tests (deleted, skipped, loosened)? | `quell gate --diff REF` |
| Find | Which risky edges in my code have no test that runs them? | `quell find [PATH]` |

`verify` and `gate` are the reason the package exists. `find`, `score` and `generate` are the older half: a static scanner that ranks candidates, a score based on your coverage data, and a generator that writes tests for simple guards.

## Which command do I run?

| I want to | Run | Page |
| --- | --- | --- |
| Check a test I (or an agent) just wrote | `quell verify` | [How verify works](https://quelltest.com/docs/npm/verify.md) |
| Fail CI when a pull request weakens tests | `quell gate --diff origin/main` | [The test gate](https://quelltest.com/docs/npm/gate.md) |
| See risky untested code in my change | `quell find --diff origin/main --coverage FILE` | [Rule pack](https://quelltest.com/docs/npm/rules.md) |
| Get a number for CI | `quell score --threshold 60` | [CLI reference](https://quelltest.com/docs/npm/cli.md) |
| Write tests for guards | `quell generate --verify --write` | [Quickstart](https://quelltest.com/docs/npm/quickstart.md) |
| Check my stubs against recorded API responses | `quell mocks --examples FILE` | [Code that calls APIs](https://quelltest.com/docs/npm/dependencies.md) |
| Let a coding agent run the checks | `quell mcp` | [MCP server and hooks](https://quelltest.com/docs/npm/agents.md) |

## What does it execute?

Only `verify` runs your code, and only your own tests (or your own `--command`). Scanning, scoring, generating and gating are static: they parse source with Babel and read git. See [privacy](https://quelltest.com/docs/npm/privacy.md).

## What are the requirements?

Node.js 20 or newer for the version you can install today (0.3.1). The next release requires Node.js 22.18+ or 24.11+ because its parser dependency moved to `@babel/parser` 8. See [installation](https://quelltest.com/docs/npm/installation.md).

## Where next?

- [Installation](https://quelltest.com/docs/npm/installation.md)
- [Quickstart with real output](https://quelltest.com/docs/npm/quickstart.md)
- [CLI reference: all eight commands, flags and exit codes](https://quelltest.com/docs/npm/cli.md)
- [CI integration](https://quelltest.com/docs/npm/ci.md)
- [Limits and known issues](https://quelltest.com/docs/npm/limits.md)

Using Python instead? See the [Python quickstart](https://quelltest.com/docs/quickstart.md).
