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
| 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 |
Beispiele
Aktuelles Verzeichnis scannen
npx -y vercel-doctor@latest .Mit ausführlicher Ausgabe scannen
npx -y vercel-doctor@latest . --verboseZeigt betroffene Dateipfade und Zeilennummern für jede Diagnose.
Nur geänderte Dateien scannen
npx -y vercel-doctor@latest . --diffErkennt den Base-Branch automatisch. Du kannst auch einen festen Base angeben:
npx -y vercel-doctor@latest . --diff mainBestimmtes Workspace-Projekt scannen
npx -y vercel-doctor@latest . --project webFür mehrere Projekte:
npx -y vercel-doctor@latest . --project web,apiDead-Code-Erkennung überspringen
npx -y vercel-doctor@latest . --no-dead-codeCI-Verwendung
npx -y vercel-doctor@latest . --yes --scoreDas 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