The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Npx Vibe listing page.
Evidence-first safety checks for npm packages and project dependencies before developers, coding agents, or MCP clients execute them.
npx-vibe resolves packages from the public npm registry, downloads and verifies their tarballs without executing them, inspects install-time code, and prints clear Proceed, Caution, or Block verdicts. Use it for one-off npx commands or scan an existing project's direct dependencies.
The default scan is deterministic, local, and requires no account or API key. AI review is optional, opt-in, and lets you choose an exact model or a maintained fast, balanced, or strong profile. Version 1.5 also ships a zero-dependency MCP server with read-only package, project, and model-catalog tools.
The project website displays the current seven-day download total directly from npm's public download API:
The counter is live rather than hard-coded, and the site links to the source data. npm download counts measure package fetches, not unique users. They are momentum signals—not proof of package safety or quality—but they show that the package is being discovered and installed.
Review a package without executing it:
Use it as a guarded replacement for npx:
Or install the command globally:
Scan an existing project's direct dependencies:
Give a coding agent a stable, read-only result:
Or connect the native MCP server:
--agent turns the scanner into a predictable machine interface. It implies check-only mode, writes only JSON to stdout, disables terminal color and local review-memory writes, and never executes package code. Operational failures are JSON too, so an agent can fail closed instead of interpreting partial terminal output.
Install the portable Agent Skill for Codex, Claude Code, Cursor, VS Code, and other compatible agents:
The skill tells an agent to preflight unfamiliar packages before npx, npm exec, or dependency installation and then apply the normalized decision:
decision.action | Required behavior |
|---|---|
continue | Continue only with the package action the user already requested |
review | Pause, summarize source evidence, and request human approval |
stop | Do not install or execute the package |
retry | The scan is incomplete; report the error and do not infer safety |
Example envelope:
The complete deterministic report remains under report. Require schemaVersion === 2, status === "complete", and decision.mayContinue === true before continuing automatically. The outer npx --yes only suppresses npm's download prompt; agent mode rejects npx-vibe's execution flags such as --force and --yes.
AI remains off by default in agent mode. If a user explicitly requests model interpretation, use a provider-specific environment variable and add --ai online --provider <provider>; never place a key in a generated command.
Version 1.5 includes a read-only Model Context Protocol server over stdio. It gives MCP-compatible AI applications a native tool surface without teaching them to parse terminal text or construct shell commands.
Add this server configuration to an MCP client that supports local stdio servers:
Global installations can use npx-vibe-mcp as the command with no arguments. Run npx npx-vibe --mcp --help for server-specific help.
The server exposes four schema-backed tools:
| MCP tool | Purpose |
|---|---|
scan_package | Resolve, verify, and inspect one public npm package without executing it |
scan_project | Review the dependency tree from a project manifest and lockfile |
approve_scripts | Decide which dependencies may run install scripts under npm 12 |
list_providers | Return supported AI providers and where each publishes its model list |
Scan results return the same versioned decision contract in both structuredContent and a JSON text block for client compatibility. The tools are annotated read-only and non-destructive. review still requires human approval, while stop, retry, and MCP tool errors fail closed.
AI remains off unless a tool call explicitly selects it. API keys are intentionally excluded from MCP tool arguments: configure provider-specific environment variables on the MCP server process so credentials do not enter prompts or tool history.
npx-vibe@2.0.0 is active in the official MCP Registry as io.github.Devrajsinh-Jhala/npx-vibe. Registry clients can resolve the verified npm package and start its local stdio server with --mcp.
Running npx some-package can download code and execute a package binary immediately. Packages may also declare lifecycle scripts that run during installation.
npx-vibe inserts a visible checkpoint before execution:
For an existing app, --project repeats the same read-only review across direct registry dependencies and aggregates the result. This makes the check useful in local development and pull-request CI, not only before an unfamiliar npx command.
By default, execution uses npm with install scripts ignored. Use --allow-install-scripts only when you intentionally want reviewed root lifecycle scripts to run.
Every deterministic source finding includes the matched line and a bounded excerpt. Registry popularity is displayed separately as context and never overrides suspicious code. Local review memory is keyed by the verified package integrity—not merely its name or version. The example below mirrors a real scan; registry dates and download counts naturally change over time.
A popular package can still receive Caution when it performs sensitive install-time behavior. That is intentional: maturity is useful context, not a security exemption.
When AI is explicitly enabled, the resolved provider and model are visible in the result. This example is adapted from the successful Gemini 3.5 Flash run on June 25, 2026; model wording can vary:
| Area | Signals |
|---|---|
| Known vulnerabilities | OSV.dev advisories for the exact resolved version, with CVE aliases and severity. No API key; batched across a whole tree |
| Registry context | package age, version age, weekly downloads, maintainers, publisher, license, deprecation. Reported, never scored |
| Install behavior | preinstall, install, postinstall, and their script targets. prepare, prepublish, preprepare, and postprepare are reported separately as context, because npm does not run them when a published tarball is installed |
| Tarball safety | npm integrity verification, unsafe paths, escaping symlinks, archive size and entry limits |
| Source behavior | secret/environment access, network calls, shell execution, external payloads, obfuscation, persistence, mining indicators |
| Dependency metadata | remote Git/HTTP/file protocols in the fields npm actually installs, and lockfile install-script indicators |
| Repository context | GitHub repository, stars, last update, last push, and latest commit |
| Review memory | verified integrity match, previous verdict, selected-file changes, lifecycle-hook changes, and finding deltas |
| Optional AI | local Ollama or supported online providers, used only after explicit opt-in and a heuristic trigger |
npx-vibe always performs a fresh registry lookup, tarball download, integrity verification, and deterministic scan. Local review memory adds comparison context after those checks:
When the integrity changes:
The history file stores package versions, integrity hashes, selected-file hashes, finding identifiers, verdicts, and model metadata. It does not store package source, API keys, environment values, or local project files. The default location is ~/.npx-vibe/reviews.json.
| Verdict | Meaning | Check-mode exit code |
|---|---|---|
| Proceed | No meaningful deterministic risk signal was found | 0 |
| Caution | Reviewable behavior or incomplete context requires human judgment | 2 |
| Block | Critical behavior or a high-risk review result was detected | 3 |
| Operational error | Registry, network, input, or internal failure | 1 |
Registry context — package age, version age, and download volume — is reported at the info severity and never contributes to the score. It describes how new a package is, not whether it does anything.
A verdict is a decision aid, not proof that a package is safe or malicious.
Scanning never executes package code. npx-vibe run is the only command that
does, and it still refuses a Block verdict unless you pass --force.
Common commands:
Useful options:
Run npx npx-vibe --help for the complete CLI reference.
Project mode turns the one-package review into a repeatable dependency preflight:
It reads package.json and, when present, package-lock.json locally. Exact versions from npm lockfiles are preferred over version ranges. By default it scans direct dependencies and optionalDependencies; add --include-dev for devDependencies.
Every registry-resolved package in package-lock.json is reviewed, not only the direct ones, because supply-chain compromises usually arrive transitively. Pass --direct-only for the narrower, faster check:
Without a lockfile the scan degrades to direct dependencies and says so, rather than failing.
The workflow is deliberately bounded:
package-lock.json is scanned by default. --direct-only narrows it to the dependencies named in package.json.--max-packages (default 500) caps how many packages one scan reviews. Anything past the cap is reported as skipped, never silently dropped.--concurrency 1-8). Weekly download counts for the whole scan are fetched through npm's bulk endpoint in a single request.--ai-limit 0-100).package.json and package-lock.json are never sent to an AI provider. Optional online AI receives only bounded files selected from the downloaded registry package.This is autonomous triage rather than autonomous execution: discover, resolve, verify, inspect, escalate when requested, and aggregate. It never installs dependencies or edits the project.
Ambient keys such as OPENAI_API_KEY or GEMINI_API_KEY do not activate AI in the default mode.
Important: Do not paste long-lived API keys into screenshots, issues, chat messages, or shared terminal recordings. Revoke any exposed key immediately.
Provider-specific keys are read only after --ai online or --ai auto is selected:
Provider-specific environment variables are the safest and most reliable option because they avoid provider guessing and keep secrets out of shell history. Recognizable direct-key formats can be routed automatically, but ambiguous formats stop locally and ask for --provider rather than sending a credential to a guessed service.
Google introduced new Gemini authorization keys in June 2026. npx-vibe 1.2.0 recognizes both the newer authorization-key family and traditional Google API keys, and sends Gemini credentials using Google's documented x-goog-api-key header.
PowerShell example:
Direct-key example when you intentionally want to specify the provider:
If automatic routing cannot confidently identify a direct key, npx-vibe exits locally with instructions to add --provider. It does not try the key against OpenAI or any other guessed endpoint.
Custom OpenAI-compatible endpoint:
Online AI receives bounded package metadata, deterministic findings, install scripts, and selected files from the downloaded package tarball. It does not receive your project files, shell history, npm tokens, or environment-variable values.
AI findings are checked against the inspected source before they are displayed as evidence. A model finding records its file, line, exact excerpt, and rationale. Unsupported model claims are omitted from the source-backed findings section, and an unsupported AI recommendation cannot independently produce a Block verdict.
npx-vibe ships no model catalog. A pinned model id rots: when a provider retires one, the call fails, the review becomes ai_unavailable, the score is floored, and the package reports a false Caution. A scanner whose accuracy decays on a timer is worse than one that asks you to name the model.
--models lists every supported provider, the environment variable it reads its key from, and where that provider publishes its current model list:
Official model lists: OpenAI, Anthropic, Gemini, OpenRouter, Groq, and Together.
Local models need no key and keep their own default:
Use JSON plus exit codes in local automation:
Use the versioned agent envelope when another tool or coding agent owns the decision loop:
Agent mode keeps stdout machine-readable for successful, incomplete, and failed scans. It is deliberately incompatible with --force, npx-vibe's --yes, --allow-install-scripts, and package execution arguments.
npm 12 turned install scripts off by default, and the hard part is not getting the
list of pending packages — it is deciding. npm 12 allowScripts: how to decide what to
approve
covers the three questions that matter, what the eight most common install-script
packages actually do, the .npmrc setting that silently disables the whole
allowlist system, and how to enforce the result in CI.
Listed on the GitHub Marketplace. The action wraps the same CLI, so a workflow needs one step:
Review install-script permissions instead of the dependency tree, and fail the build when a lockfile change introduces one you have not decided on:
| Input | Default | Purpose |
|---|---|---|
command | project | project, approve-scripts, or package |
package | Package spec, required when command: package | |
path | . | Project directory or package.json path |
include-dev | false | Include devDependencies in a project scan |
direct-only | false | Skip the transitive tree |
max-packages | 500 | Cap on packages reviewed in one run |
fail-on | block | block, caution, or never |
version | 2 | npx-vibe version range to run |
Outputs are verdict (proceed, caution, block, error) and exit-code.
An incomplete scan always fails the step, even with fail-on: never — a scan
that could not finish is never read as a pass.
For GitHub Actions, --ci emits a warning for each Caution result, an error for each Block or operational failure, and writes a package table to the job summary:
Project mode preserves the normal exit contract: 0 Proceed, 2 Caution, 3 Block, and 1 for an incomplete scan caused by an operational error. --ci and --json are intentionally separate so JSON output remains valid.
The repository tests Node.js 20, 22, and 24 across Linux, Windows, and macOS. CI also packs the npm tarball, installs it into a clean temporary consumer project, and exercises the shipped CLI and MCP handshake from the exact artifact users receive.
The tag-driven release workflow is prepared for npm trusted publishing and npm publish --provenance. Configure the trusted publisher once, then push a version tag to publish without storing a long-lived npm token. See RELEASING.md.
npx-vibe supports public npm registry package names, scoped packages, dist-tags, exact versions, common semver ranges, and dependency discovery from npm package manifests and lockfiles, including the full transitive tree with --transitive. Version ranges resolve to stable releases unless the range itself names a prerelease, matching npm. It intentionally rejects local paths, arbitrary tarball URLs, Git URLs, and non-registry project dependencies to keep the trust boundary narrow.
Node.js 20 or newer is required. The project is tested on current Windows, macOS, and Linux GitHub-hosted runners.
npx-vibe is a pre-execution risk scanner. It is not a sandbox, antivirus engine, formal audit, or guarantee of safety. A package may hide behavior in unselected files, runtime branches, native code, or remote responses.
Review coverage is bounded and reported rather than implied. Files are selected from the install and executable entry points and the imports reachable from them; each selected file is read up to 64 KiB, and the scan stops selecting once the byte budget is reached. The dashboard names how many files were read only in part or left past the budget, so a large bundled file is never mistaken for a fully reviewed one.
Contributions that improve detection quality, evidence, compatibility, or false-positive handling are welcome. See CONTRIBUTING.md.
MIT © Devrajsinh Jhala