Documented scripts exist
A README or docs/ page telling you to run npm run dev when package.json has no dev — and scripts that call scripts that are not declared.
v0.1.0 · open source · MIT
Catch broken setup instructions, configuration mismatches and onboarding regressions before they slow your team down. SetupGuard reads what a Node.js or TypeScript repository declares — its README, package.json, lockfiles, version files and .env.example — and tells you where those promises no longer hold.
Documentation · node/docs-script-drift error README.md tells the reader to run "pnpm start", which is not a declared script expected: a script named "start" in package.json found: package.json scripts: web, build at README.md:12 — in a shell code block warning README.md tells the reader to run "pnpm dev", which is not a declared script at README.md:15 — in inline code fix: Update README.md to use "web", or declare "dev" in package.json. 1 blocker · 1 warning · 5 checks verified BLOCKED
A README or docs/ page telling you to run npm run dev when package.json has no dev — and scripts that call scripts that are not declared.
engines, volta, .nvmrc and .node-version read together; contradictions are reported, never silently resolved.
Missing lockfiles, lockfiles from several managers, and a lockfile that contradicts packageManager.
Variables the code reads that .env.example does not list. Names only — a value is never printed.
Plus package.json validity and, from the CLI and the editor, the local machine: Node.js version, package manager on PATH, local .env names. Nine checks in total in v0.1.0.
Illustrative. Nothing is analysed in your browser. Each scenario shows small synthetic files and the output SetupGuard 0.1.0 actually printed for them — from the CLI, or from a real GitHub Actions run — with long lines wrapped and some detail lines left out to fit.
README.md
11 ```bash 12 # start the dev server 13 npm run dev 14 ```
package.json
"scripts": {
"start": "node src/index.js",
"test": "node --test"
}
Documentation · node/docs-script-drift error README.md tells the reader to run "npm dev", which is not a declared script node/docs-script-not-found · confidence: high expected: a script named "dev" in package.json found: package.json scripts: start, test at README.md:13 — in a shell code block fix: Update README.md, or declare "dev" in package.json. 1 blocker · 0 warnings · 6 checks verified BLOCKED exit code 1
package.json
"engines": { "node": ">=22" }
.nvmrc
18.20.4
Project · node/node-version-declaration error Conflicting Node.js requirements: package.json#engines.node says ">=22", .nvmrc says "18.20.4" No single Node.js version satisfies both declarations, so whichever one a contributor follows, the other is violated. found: >=22 vs 18.20.4 fix: Align the declarations on one supported version range. 1 blocker · 0 warnings · 5 checks verified BLOCKED exit code 1
src/payments.js
1 export const paymentsUrl = process.env.PAYMENTS_API_URL;
.env.example
# Copy this file to .env DATABASE_URL= PORT=3000
Configuration · node/env-contract warning PAYMENTS_API_URL is read by the code but not listed in .env.example node/env-var-undocumented · confidence: medium SetupGuard infers this from source code, so the variable may in fact be optional. at src/payments.js:1 — reads PAYMENTS_API_URL fix: Add PAYMENTS_API_URL to .env.example, or treat this finding as expected if the variable is genuinely optional. 0 blockers · 1 warning · 6 checks verified WARNINGS exit code 0 (warnings fail the run only with --fail-on warning)
Pull request diff · README.md
249 pnpm install 250 pnpm check # lint + typecheck + test 251 +pnpm run serve
Annotation on the diff
Error · README.md:251
SetupGuard: new · node/docs-script-drift
README.md tells the reader to run "pnpm serve", which is not a declared script
SetupGuard — pull request #2 Compared with base 5e8be85acc8c (merge checkout); 1 file(s) changed GitHub API requests (5) Result: FAIL - This pull request introduces 1 blocking problem(s) New in this pull request (1): error README.md:251 README.md tells the reader to run "pnpm serve", which is not a declared script fix: Update README.md, or declare "serve" in package.json.
From a real run in this repository: failing, then passing after the line was removed. Problems that were already on the base branch are listed in the job summary but do not fail the pull request.
Manifests, lockfiles, version files, Markdown and source code are read as data. SetupGuard never runs install, builds, tests or any script from the project, and does not follow paths outside it.
Every finding has a stable code, a confidence level, the file and line it comes from, and a suggested fix. No model, no heuristics that change between runs: the same files always produce the same report.
The GitHub Action diagnoses the checked-out pull request, then uses the GitHub REST API to learn exactly what changed and what the base looked like, and diagnoses the base too. Only the files a check actually reads are fetched.
REST calls: pulls/{n} · git/commits/{sha} · pulls/{n}/files (paginated) · contents/{path}?ref={base}
CI · pull requests
Reports what a pull request introduces as annotations on the diff and a job summary listing every finding: new, already on the base, or not comparable.
pull_request (pull_request_target is refused)contents: read, pull-requests: readresult · readiness · new-errors · new-warningspass · fail · incomplete (always fails)Editor
Diagnoses every workspace folder on open and again when a relevant file changes. Starts no process, so it is safe in untrusted workspaces.
Findings in the Problems panel, anchored to the file and line. Commands: SetupGuard: Run Diagnosis, SetupGuard: Show Report.
Terminal · scripts
setupguard [doctor|check] [path] with human or --json output, --level and --fail-on.
--fail-on thresholdAdd .github/workflows/setupguard.yml. The action is pinned to the exact commit of release v0.1.0 — a SHA cannot be moved, a tag can.
name: SetupGuard
on:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
readiness:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5; keep the default ref
with:
persist-credentials: false
- uses: Jovinull/SetupGuard@36a1e3a620f638d9844254f32c4bcc4d1ad38d87 # v0.1.0
Inputs: token (defaults to the workflow's GITHUB_TOKEN), path, fail-on (error or warning).
Download setupguard-0.1.0.vsix and SHA256SUMS.txt from the release, then:
sha256sum -c SHA256SUMS.txt code --install-extension setupguard-0.1.0.vsix
Requires VS Code 1.90 or newer. Not published to the VS Code Marketplace or Open VSX.
Not published to npm. Needs Node.js 22.13 or newer and pnpm 11 (via Corepack).
git clone https://github.com/Jovinull/SetupGuard.git cd SetupGuard git switch --detach v0.1.0 pnpm install --frozen-lockfile pnpm build node packages/cli/dist/bin.js path/to/your/repo
docs/, deeper than 8 levels) and pull requests with more than 3000 changed files are reported incomplete until narrowed with ignore: in .setupguard.yml.The full list, and the evidence behind each claim on this page, are in the design record.