Vercel Doctor

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

FlagDescription
-v, --versionDisplay the current version
--no-lintSkip billing lint rules
--no-dead-codeSkip dead code detection (Knip)
--verboseShow file paths and line numbers per rule
--scoreOutput only the numeric score (useful for CI)
-y, --yesSkip 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
--offlineSkip 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 . --verbose

Shows affected file paths and line numbers for each diagnostic.

Scan only changed files

npx -y vercel-doctor@latest . --diff

Auto-detects the base branch. You can also pin a specific base:

npx -y vercel-doctor@latest . --diff main

Scan a specific workspace project

npx -y vercel-doctor@latest . --project web

For multiple projects:

npx -y vercel-doctor@latest . --project web,api

Skip dead code detection

npx -y vercel-doctor@latest . --no-dead-code

CI usage

npx -y vercel-doctor@latest . --yes --score

The --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

On this page