v0.1.0 · open source · MIT

Your repository works.
Does its setup?

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.

  • Deterministic — same files, same report
  • Read-only — never runs your project
  • No AI, no telemetry
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
Output of the SetupGuard 0.1.0 CLI on one of the repository's test projects, shortened.

What it checksThe contract a repository makes with whoever clones it

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.

Node.js versions agree

engines, volta, .nvmrc and .node-version read together; contradictions are reported, never silently resolved.

Lockfile matches the package manager

Missing lockfiles, lockfiles from several managers, and a lockfile that contradicts packageManager.

Environment variables are documented

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.

DemonstrationFour ways a setup breaks

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.

How it worksDeterministic, read-only, explainable

  1. Read what the repository declares

    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.

  2. Check it with fixed rules

    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.

  3. Aggregate honestly

    READY
    every check that applied concluded, and none found anything
    WARNINGS
    the contract is degraded, but the project can still run
    BLOCKED
    someone following the repository's own instructions is stuck
    INCOMPLETE
    part of the diagnosis did not happen — never reported as a pass
  4. On a pull request, compare with the base

    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.

    • new not on the base — fails the job (errors by default)
    • raised on the base as a warning, now an error — counts as introduced
    • pre-existing already on the base — listed, not failed

    REST calls: pulls/{n} · git/commits/{sha} · pulls/{n}/files (paginated) · contents/{path}?ref={base}

InterfacesOne engine, three places to use it

CI · pull requests

GitHub Action

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.

  • Eventpull_request (pull_request_target is refused)
  • Tokencontents: read, pull-requests: read
  • Outputsresult · readiness · new-errors · new-warnings
  • Resultpass · fail · incomplete (always fails)

Editor

VS Code extension

Diagnoses every workspace folder on open and again when a relevant file changes. Starts no process, so it is safe in untrusted workspaces.

  • SetupGuard: Ready
  • SetupGuard: Warnings
  • SetupGuard: Blocked
  • SetupGuard: Incomplete

Findings in the Problems panel, anchored to the file and line. Commands: SetupGuard: Run Diagnosis, SetupGuard: Show Report.

Terminal · scripts

Command line

setupguard [doctor|check] [path] with human or --json output, --level and --fail-on.

  • Exit 0nothing at the --fail-on threshold
  • Exit 1findings at or above it
  • Exit 2invalid usage or path
  • Exit 3incomplete — not a pass

Get startedInstall

GitHub Action

Add .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).

VS Code extension

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.

CLI, from source

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

ScopeWhat v0.1.0 does not do

  • Node.js, JavaScript and TypeScript only. Other ecosystems are not analysed.
  • An early 0.x release. Checks, outputs and configuration may change between minor versions.
  • Static checks in CI. The Action does not check Node.js versions or tools on the runner, which is not your contributors' machine.
  • Scan limits. Large repositories (more than 50 files under docs/, deeper than 8 levels) and pull requests with more than 3000 changed files are reported incomplete until narrowed with ignore: in .setupguard.yml.
  • No automatic fixes. Every finding suggests one; SetupGuard never changes your files.
  • Known false positive. A README that changes directory into another project in an earlier code block.

The full list, and the evidence behind each claim on this page, are in the design record.