{"_id":"@aitg/cli","name":"@aitg/cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@aitg/cli","version":"0.1.0","description":"Mutation-tested quality gates for AI-generated code. Coverage is not quality.","private":false,"type":"module","license":"MIT","bin":{"aitg":"dist/index.js"},"scripts":{"build":"tsup","dev":"tsup --watch","type-check":"tsc --noEmit","clean":"rm -rf dist node_modules .turbo"},"dependencies":{"axios":"^1.7.7","chalk":"^5.3.0","commander":"^12.1.0","ora":"^8.1.0","simple-git":"^3.27.0","zod":"^3.23.8"},"peerDependencies":{"@stryker-mutator/core":">=8.0.0"},"peerDependenciesMeta":{"@stryker-mutator/core":{"optional":true}},"devDependencies":{"@aitg/shared":"workspace:*","@stryker-mutator/vitest-runner":"^9.6.1","@types/node":"^20.16.10","esbuild":"^0.24.0","tsup":"^8.3.0","typescript":"^5.6.3","vitest":"^4.1.10"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"author":{"name":"TactiCode"},"keywords":["mutation-testing","stryker","test-quality","ai-generated-code","quality-gate","ci"],"repository":{"type":"git","url":"git+https://github.com/tzurid25/aitg.git"},"homepage":"https://github.com/tzurid25/aitg","gitHead":"c5eceb7e946dda00e69f1fc627b57711c923bb10","_id":"@aitg/cli@0.1.0","bugs":{"url":"https://github.com/tzurid25/aitg/issues"},"_nodeVersion":"24.16.0","_npmVersion":"11.13.0","dist":{"integrity":"sha512-qCTGZzCIQ10bOfLNczZ9bYeEFj14H2o7OOWpIWrfcY7xvyiNjAPXJQqQTNYF1ghxdh9OIZepTTkzCfXO22F1tQ==","shasum":"4a8464cf16c7dde07f0d00533db4dacbe2842f1d","tarball":"https://registry.npmjs.org/@aitg/cli/-/cli-0.1.0.tgz","fileCount":5,"unpackedSize":264678,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB4lPudqml1CYr5cqJzWQia0Zo1kP7QVM6/rgbrAjxc7AiEA7MuSa928lTQRzGMet6Q6CHU+/PVgGYPZlEShwflF2vk="}]},"_npmUser":{"name":"ande1997","email":"tzurid25@gmail.com"},"directories":{},"maintainers":[{"name":"ande1997","email":"tzurid25@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cli_0.1.0_1784723944624_0.717371008789699"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-22T12:39:04.405Z","0.1.0":"2026-07-22T12:39:04.761Z","modified":"2026-07-22T12:39:05.460Z"},"maintainers":[{"name":"ande1997","email":"tzurid25@gmail.com"}],"description":"Mutation-tested quality gates for AI-generated code. Coverage is not quality.","homepage":"https://github.com/tzurid25/aitg","keywords":["mutation-testing","stryker","test-quality","ai-generated-code","quality-gate","ci"],"repository":{"type":"git","url":"git+https://github.com/tzurid25/aitg.git"},"author":{"name":"TactiCode"},"bugs":{"url":"https://github.com/tzurid25/aitg/issues"},"license":"MIT","readme":"# aitg\n\n**Coverage is not quality. Mutation score is.**\n\nAI writes tests that execute your code without ever checking what it does.\nThey pass. Coverage hits 100%. Then a bug ships through a line every report\nsaid was tested.\n\n`aitg` finds those tests. It makes small, deliberate changes to your changed\ncode -- flipping a `>=` to `>`, replacing a condition with `true` -- and\nre-runs your suite. If nothing fails, that behaviour is executed but never\nverified, and `aitg` tells you exactly where and what to assert.\n\nIt scans only the lines in your diff, so it runs in seconds rather than\nmutating the whole repository.\n\n## Install\n\n```bash\nnpm install --save-dev @aitg/cli @stryker-mutator/core\n```\n\nPlus the Stryker plugin for your test runner:\n\n```bash\n# pick the one you use\nnpm install --save-dev @stryker-mutator/vitest-runner\nnpm install --save-dev @stryker-mutator/jest-runner\nnpm install --save-dev @stryker-mutator/mocha-runner\n```\n\nUsing ava, uvu, `node:test`, or anything else? No plugin needed -- `aitg`\nfalls back to Stryker's command runner automatically. Slower, but it works.\n\n## Use\n\n```bash\nnpx aitg init --local   # no account required\nnpx aitg scan\n```\n\nThat's it. `scan` diffs against your default branch, mutates only the changed\nlines, and writes two files:\n\n- `.test-guard/report.md` -- what happened, ranked by severity\n- `.test-guard/fix-prompt.md` -- a prompt you can paste into Claude, Cursor,\n  or Copilot to get the missing tests written\n\n## What you get\n\n```\nMutation testing complete (vitest, 67 mutants).\n\nResults\n  Mutation score: 0%\n  Killed:       0\n  Survived:     8\n  No coverage:  29\n\nSurviving mutants\n  ! src/classify.ts:2 (EqualityOperator)\n  ! src/classify.ts:3 (ConditionalExpression)\n```\n\nAnd in `fix-prompt.md`, for each gap:\n\n```diff\n- if (score >= 80) return \"healthy\";\n+ score > 80\n```\n\n> A comparison boundary was shifted (inclusive <-> exclusive) and no test\n> noticed, so the exact edge value is untested. Assert the boundary itself,\n> not just values on either side.\n\nThe explanation is derived from the actual mutation, not its category -- a\nboundary shift and a reversed comparison need different tests, and you are\ntold which one you are looking at.\n\n## Commands\n\n| Command | What it does |\n| --- | --- |\n| `aitg init --local` | Set up in this repo. No account, nothing uploaded. |\n| `aitg init` | Set up and link to the cloud dashboard. |\n| `aitg scan` | Mutation-test the changed lines. |\n| `aitg scan --dry-run` | Show the mutation surface without running anything. |\n| `aitg scan --base <ref>` | Diff against a specific branch or ref. |\n| `aitg scan --uncommitted` | Include working-tree changes. |\n| `aitg report` | Re-print the last local report. |\n| `aitg doctor` | Diagnose the local setup. |\n\n## Configuration\n\n`aitg init` writes `aitg.config.json`:\n\n```json\n{\n  \"minMutationScore\": 70,\n  \"maxSurvivedMutants\": null,\n  \"failBuildOnBreach\": true,\n  \"excludePatterns\": [\"**/*.test.*\", \"**/node_modules/**\", \"**/dist/**\"]\n}\n```\n\n`scan` exits non-zero when the gate fails, so it works as a CI step as-is.\n\n## In CI\n\n```yaml\n- run: npm ci\n- run: npx aitg scan --base origin/main\n```\n\nFetch enough history for the merge-base to resolve\n(`actions/checkout` with `fetch-depth: 0`).\n\n## Requirements\n\n- Node 18+\n- A git repository\n- A test suite that passes on its own -- mutation testing needs a green\n  baseline to compare against\n\n## Troubleshooting\n\nRun `aitg doctor` first; it checks Node, git, the config, and which test\nrunner was detected.\n\nFailures name their own cause. If one doesn't, `AITG_DEBUG=1 npx aitg scan`\nprints Stryker's full output.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-560e100982d568a45bcaf53079b7738b"}