Command Syntax
Arguments
Project directory to scan. Defaults to the current directory.
Options
Scan Configuration
Enable linting checks. Can be overridden in config file.
Skip linting checks.
Enable dead code detection using Knip.
Skip dead code detection.
Show file details per rule in the output.
Output Options
Output only the score without diagnostic details.
Skip telemetry (anonymous, not stored, only used to calculate score).
Project Selection
Select workspace project(s). Use comma-separated values for multiple projects.
Skip prompts and scan all workspace projects automatically.
Differential Scanning
Scan only files changed vs base branch. If a branch name is provided, uses that as the base branch.
Error Handling
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
Open Ami to automatically fix all issues.
Skip Ami-related prompts.
Information
Display the version number.
Display help information.
Subcommands
fix
Open Ami to auto-fix react-doctor issues.Project directory. Defaults to current directory.
install-ami
Install Ami and open it to auto-fix issues.Project directory. Defaults to current directory.
Exit Codes
Scan completed successfully (or no failures based on
--fail-on setting).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