CLI Reference
All command-line options and flags for Vercel Doctor.
Usage
npx -y vercel-doctor@latest [directory] [options]The directory argument defaults to . (current directory).
Options
| Flag | Description |
|---|---|
-v, --version | Display the current version |
--no-lint | Skip billing lint rules |
--no-dead-code | Skip dead code detection (Knip) |
--verbose | Show file paths and line numbers per rule |
--score | Output only the numeric score (useful for CI) |
-y, --yes | Skip interactive prompts, scan all workspace projects |
--project <name> | Select specific workspace project(s), comma-separated |
--diff [base] | Scan only files changed vs the base branch |
--offline | Skip anonymous telemetry used for score calculation |
Examples
Scan the current directory
npx -y vercel-doctor@latest .Scan with verbose output
npx -y vercel-doctor@latest . --verboseShows affected file paths and line numbers for each diagnostic.
Scan only changed files
npx -y vercel-doctor@latest . --diffAuto-detects the base branch. You can also pin a specific base:
npx -y vercel-doctor@latest . --diff mainScan a specific workspace project
npx -y vercel-doctor@latest . --project webFor multiple projects:
npx -y vercel-doctor@latest . --project web,apiSkip dead code detection
npx -y vercel-doctor@latest . --no-dead-codeCI usage
npx -y vercel-doctor@latest . --yes --scoreThe --yes flag skips interactive prompts. Combined with --score, it outputs only the numeric score for use in scripts and pipelines.
Programmatic API
Vercel Doctor also exports a programmatic API:
import { run } from "vercel-doctor/api";Oxlint Plugin
The billing lint rules are available as a standalone Oxlint plugin:
import plugin from "vercel-doctor/oxlint-plugin";Edit on GitHub
Last updated on