# Quickstart

Run React Doctor locally, review the highest-severity findings, then add the same scan to pull requests.

## 1. Run the CLI

Run React Doctor from the project root:

```bash
npx react-doctor@latest
```

React Doctor detects your framework, React version, and rule set. It prints a health score and the issues it found. Start with security risks and performance regressions before lower-risk diagnostics.

The default scan also finds complex React components and hooks, plus repeated JSX structures that may belong in shared components.

To report only issues introduced on your branch, use the `changed` scope:

```bash
npx react-doctor@latest --scope changed
```

## 2. Fix the issues

Re-scan as you work, starting with security, performance, and `error` diagnostics:

```bash
npx react-doctor@latest --verbose --scope changed
```

The `changed` scope compares your branch with its merge base and reports only new diagnostics. Fix `error` diagnostics before warnings. See [How to fix issues](/docs/getting-started/how-to-fix-issues).

## 3. Add it to CI

Install the continuous integration (CI) workflow:

```bash
npx react-doctor@latest ci install
```

React Doctor writes `.github/workflows/react-doctor.yml`. The default workflow reports new pull request findings without blocking the merge. Use `react-doctor ci config` when you want to change the gate, scan scope, or reporting. See [GitHub Actions setup](/docs/ci-and-prs/github-actions-setup).

## Next steps

- [Install for coding agents](/docs/getting-started/install-for-coding-agents): teach your agent to scan after React changes
- [React maintainability](/docs/overview/react-maintainability): understand complexity and repeated JSX findings
- [Configuration](/docs/configuration/config-files): tune rules, categories, and surfaces
- [CLI reference](/docs/reference/cli-reference): every command and flag
