### Worked example: install and help output Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Shows the output of installing the published package and running the help command in a throwaway directory. The version 0.3.0 is not yet published to npm; install without pinning or pin @0.2.3 explicitly. ```console $ npm install --save-dev quick-gate added 7 packages, and audited 8 packages in 5s found 0 vulnerabilities $ npx --no-install quick-gate --help Quick Gate v0.2.3 Commands: quick-gate run --mode quick|full --changed-files --output-dir quick-gate summarize --input .quick-gate/failures.json quick-gate repair --input .quick-gate/failures.json [--output-dir ] [--max-attempts 3] [--deterministic-only] Options: --deterministic-only Skip model-assisted repair (no Ollama required) --help, -h Show this help message ``` -------------------------------- ### Development Setup Commands Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/CONTRIBUTING.md Clones the repository, installs dependencies, and runs the test suite. Use this to set up a local development environment. ```bash git clone https://github.com/hermes-labs-ai/quick-gate-js.git cd quick-gate-js npm ci --ignore-scripts npm test ``` -------------------------------- ### Install, view help, summarize, and test Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/AGENTS.md Minimal commands for setting up and using Quick Gate. Run npm install, view CLI help, summarize a failures file, and run tests. ```bash npm install npx quick-gate --help npx quick-gate summarize --input .quick-gate/failures.json npm test ``` -------------------------------- ### Clone and install Quick Gate from repository Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Clones the Quick Gate repository, installs dependencies, and shows the help output. Requires Node.js 18 or newer and a project whose dependencies are already installed. ```bash git clone https://github.com/hermes-labs-ai/quick-gate-js.git cd quick-gate-js npm install npx --no-install quick-gate --help ``` -------------------------------- ### Install and run Quick Gate on a project Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Installs Quick Gate as a development dependency, sets up temporary files for changed-files and output, and runs the quick mode gate. The changed-files input is either a newline-delimited file or a JSON array. If a check is not configured or available, Quick Gate reports that as a finding instead of inventing a result. ```bash npm install --save-dev quick-gate QG_CHANGED="$(mktemp)" QG_OUTPUT="$(mktemp -d)" printf 'src/app.ts\n' > "$QG_CHANGED" npx --no-install quick-gate run \ --mode quick \ --changed-files "$QG_CHANGED" \ --output-dir "$QG_OUTPUT" ``` -------------------------------- ### Run quick-gate with explicit output directory Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Use this command when CI or another process needs a stable path for the run artifacts. It continues the QG_OUTPUT shell variables from the 'First success' example. The run writes artifacts to the specified directory instead of the default temporary location. ```bash npx --no-install quick-gate run \ --mode quick \ --changed-files "$QG_CHANGED" \ --output-dir "$QG_OUTPUT" ``` -------------------------------- ### Check skill fixtures with npm install and quick-gate run Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/skills/quick-gate-js/SKILL.md Copy a fixture (clean or broken) to a temp directory and run these commands to verify the skill works. The broken fixture has a type error in broken/greeting.ts; clean exits 0 with status pass, broken exits 1 with status fail and typecheck_failure finding. ```bash npm install --ignore-scripts --no-audit --no-fund --no-package-lock npx --yes quick-gate@0.2.3 run --mode quick --changed-files changed-files.txt --output-dir "$(mktemp -d)" ``` -------------------------------- ### Quick Gate CLI help output Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/assets/preview-source.txt Displays the help information for the Quick Gate command-line tool, listing available commands and their usage. ```text $ quick-gate --help Quick Gate v0.2.3 Commands: quick-gate run --mode quick|full --changed-files quick-gate summarize --input .quick-gate/failures.json quick-gate repair --input .quick-gate/failures.json [--max-attempts 3] [--deterministic-only] ``` -------------------------------- ### Run Quick Gate 0.2.3 with changed files and output directory Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/skills/quick-gate-js/SKILL.md From the project root, write changed files (newline-delimited or JSON array) and run with explicit mode and external output directory. --mode and --changed-files are required; 'quick' runs lint, typecheck, and Lighthouse, while 'full' also runs build. Stdout is JSON with status, gateResult, artifacts, and runId. ```bash printf 'src/app.ts\n' > "$TMPDIR/qg-changed.txt" npx --yes quick-gate@0.2.3 run --mode quick \ --changed-files "$TMPDIR/qg-changed.txt" \ --output-dir "$(mktemp -d)" ``` -------------------------------- ### quick-gate.config.json configuration Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Configuration file for customizing commands and policy. Commands use argv arrays; strings are rejected unless allowUnsafeShellCommands is true. Policy settings control attempts, patch limits, timeouts, and output caps. ```json { "commands": { "lint": ["npm", "run", "lint"], "typecheck": ["npm", "run", "typecheck"], "build": ["npm", "run", "build"], "lighthouse": ["npm", "run", "ci:lighthouse"] }, "policy": { "maxAttempts": 3, "maxPatchLines": 150, "abortOnNoImprovement": 2, "timeCapMs": 1200000, "commandTimeoutMs": 120000, "gateTimeoutMs": 300000, "outputCapBytes": 65536 }, "allowUnsafeShellCommands": false } ``` -------------------------------- ### Emit quick and full evaluation results Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Run the evidence emitter in quick mode or full mode with a specified path. The full mode requires a path argument. These commands write nothing beyond what evaluateGates already writes. ```bash node src/evidence.js --mode quick node src/evidence.js --mode full --path path/to/project ``` -------------------------------- ### Summarize and repair with explicit output directory Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md These commands have separate, legacy worktree behavior. When `--output-dir` is provided, they keep their reports, rerun artifacts, escalation, and backup directories in that external directory. Without it, they retain the legacy `.quick-gate/` behavior. Repair may modify project files, so inspect the diff before accepting changes. ```bash npx --no-install quick-gate summarize \ --input "$QG_OUTPUT/failures.json" \ --output-dir "$QG_OUTPUT" ``` ```bash npx --no-install quick-gate repair \ --input "$QG_OUTPUT/failures.json" \ --output-dir "$QG_OUTPUT" \ --deterministic-only ``` -------------------------------- ### GitHub Actions workflow for Quick Gate Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Workflow to run Quick Gate on pull requests. It collects changed files, runs the CLI with npx --no-install, and writes artifacts to a temporary directory. The action fails if the gate remains unresolved after repair. ```yaml name: Quick Gate on: pull_request: branches: [main] permissions: contents: read jobs: quality-gate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - run: npm ci - name: Collect changed files run: git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.sha }}" > "$RUNNER_TEMP/quick-gate-changed.txt" - name: Run Quick Gate run: >- npx --no-install quick-gate run --mode quick --changed-files "$RUNNER_TEMP/quick-gate-changed.txt" --output-dir "$RUNNER_TEMP/quick-gate" ``` -------------------------------- ### Repair failures with quick-gate repair (deterministic-only) Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Use this command for repair in deterministic-only mode, which applies scoped ESLint fixes, reruns the gate, and escalates when it cannot make bounded progress. Model-assisted repair is optional and only runs when Ollama is available and deterministic-only mode is not requested. Exits 0 on pass and 2 on escalation. ```bash npx --no-install quick-gate repair \ --input "$QG_OUTPUT/failures.json" \ --output-dir "$QG_OUTPUT" \ --max-attempts 3 \ --deterministic-only ``` -------------------------------- ### Summarize failures with quick-gate summarize Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Use this command after a failed run to convert failure findings into prioritized actions for humans and agents. It reads from the failures.json file and writes output to the specified directory. ```bash npx --no-install quick-gate summarize \ --input "$QG_OUTPUT/failures.json" \ --output-dir "$QG_OUTPUT" ``` -------------------------------- ### Evaluate gates with evaluateGates API Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Use this API when an application needs the structured evaluation result without Quick Gate writing its own artifact files. It returns a gate-result/v1 result and does not write artifacts or invoke repair, but it still executes configured project commands. ```js import { evaluateGates } from 'quick-gate'; const { gateResult, findings } = evaluateGates({ mode: 'quick', cwd: process.cwd(), changedFiles: ['src/app.ts'], }); console.log(gateResult.status, findings); ``` -------------------------------- ### Ollama environment variables Source: https://github.com/hermes-labs-ai/quick-gate-js/blob/main/README.md Environment variables to configure optional Ollama repair. Without Ollama, deterministic gates and repair still run. When enabled, the model adapter invokes the local ollama command with bounded snippets. ```bash QUICK_GATE_HINT_MODEL=qwen3:4b QUICK_GATE_PATCH_MODEL=mistral:7b QUICK_GATE_MODEL_TIMEOUT_MS=60000 QUICK_GATE_ALLOW_HINT_ONLY_PATCH=0 ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.