CLIリファレンス
Vercel Doctorの全コマンドラインオプションとフラグ。
使用方法
npx -y vercel-doctor@latest [directory] [options]directory 引数はデフォルトで .(カレントディレクトリ)です。
オプション
| 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 |
例
カレントディレクトリをスキャンする
npx -y vercel-doctor@latest .詳細出力でスキャンする
npx -y vercel-doctor@latest . --verbose各診断の影響ファイルと行番号を表示します。
変更されたファイルのみをスキャンする
npx -y vercel-doctor@latest . --diffベースブランチを自動検出します。ベースを固定する場合:
npx -y vercel-doctor@latest . --diff main特定のワークスペースプロジェクトをスキャンする
npx -y vercel-doctor@latest . --project web複数プロジェクトの場合:
npx -y vercel-doctor@latest . --project web,apiDead code検出をスキップする
npx -y vercel-doctor@latest . --no-dead-codeCIでの使用
npx -y vercel-doctor@latest . --yes --score--yes フラグでインタラクティブプロンプトをスキップします。--score と組み合わせると、スクリプトやパイプライン用に数値スコアのみを出力します。
プログラムAPI
Vercel Doctorは programmatic API もエクスポートしています:
import { run } from "vercel-doctor/api";Oxlint Plugin
billing lint ルールはスタンドアロンの Oxlint プラグインとして利用できます:
import plugin from "vercel-doctor/oxlint-plugin";Edit on GitHub
Last updated on