Command Syntax
Arguments
string
default:"."
Project directory to scan. Defaults to the current directory.
Options
Scan Configuration
boolean
default:"true"
Enable linting checks. Can be overridden in config file.
boolean
Skip linting checks.
boolean
default:"true"
Enable dead code detection using Knip.
boolean
Skip dead code detection.
boolean
default:"false"
Show file details per rule in the output.
Output Options
boolean
default:"false"
Output only the score without diagnostic details.
boolean
default:"false"
Skip telemetry (anonymous, not stored, only used to calculate score).
Project Selection
string
Select workspace project(s). Use comma-separated values for multiple projects.
boolean
default:"false"
Skip prompts and scan all workspace projects automatically.
Differential Scanning
boolean | string
Scan only files changed vs base branch. If a branch name is provided, uses that as the base branch.
Error Handling
'error' | 'warning' | 'none'
default:"none"
Exit with non-zero code based on diagnostic severity:
error: Exit with code 1 if any errors are foundwarning: Exit with code 1 if any warnings or errors are foundnone: Always exit with code 0
Auto-fix
boolean
default:"false"
Open Ami to automatically fix all issues.
boolean
Skip Ami-related prompts.
Information
boolean
Display the version number.
boolean
Display help information.
Subcommands
fix
Open Ami to auto-fix react-doctor issues.string
default:"."
Project directory. Defaults to current directory.
install-ami
Install Ami and open it to auto-fix issues.string
default:"."
Project directory. Defaults to current directory.
Exit Codes
Success
Scan completed successfully (or no failures based on
--fail-on setting).Failure
Diagnostic issues found that match the
--fail-on severity level.Environment Variables
React Doctor detects automated environments and adjusts behavior accordingly. The following environment variables indicate an automated environment:CI- Continuous Integration environmentCLAUDECODE- Claude Code environmentCURSOR_AGENT- Cursor Agent environmentCODEX_CI- Codex CI environmentOPENCODE- OpenCode environmentAMP_HOME- Amp environmentAMI- Ami environment
- Prompts are automatically skipped (equivalent to
--yes) - TTY checks are bypassed