Vercel Doctor

CLI-Referenz

Alle Kommandozeilen-Optionen und Flags für Vercel Doctor.

Verwendung

npx -y vercel-doctor@latest [directory] [options]

Das directory-Argument Standardwert ist . (aktuelles Verzeichnis).

Optionen

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

Beispiele

Aktuelles Verzeichnis scannen

npx -y vercel-doctor@latest .

Mit ausführlicher Ausgabe scannen

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

Zeigt betroffene Dateipfade und Zeilennummern für jede Diagnose.

Nur geänderte Dateien scannen

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

Erkennt den Base-Branch automatisch. Du kannst auch einen festen Base angeben:

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

Bestimmtes Workspace-Projekt scannen

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

Für mehrere Projekte:

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

Dead-Code-Erkennung überspringen

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

CI-Verwendung

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

Das Flag --yes überspringt interaktive Prompts. In Kombination mit --score gibt es nur die numerische Bewertung für Scripts und Pipelines aus.

Programmatische API

Vercel Doctor exportiert auch eine programmatische API:

import { run } from "vercel-doctor/api";

Oxlint-Plugin

Die Billing-Lint-Regeln sind als eigenständiges Oxlint-Plugin verfügbar:

import plugin from "vercel-doctor/oxlint-plugin";
Edit on GitHub

Last updated on

On this page