> ## Documentation Index
> Fetch the complete documentation index at: https://opm.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# opm fix

> Auto-fix typosquats and vulnerable dependencies.

# opm fix

Runs the same scan as `opm check`, then auto-applies fixes to `package.json`.

## What It Fixes

* **Typosquats** — Renames to the correct package (e.g. `lodahs` → `lodash`)
* **Vulnerable packages** — Upgrades to patched versions suggested by OSV
* **AI-flagged packages** — Applies replacements when 2+ agents agree on a suggestion

## Process

1. Scans all dependencies (same as `opm check`)
2. Collects fixes: typosquat renames, CVE upgrades, AI-suggested replacements
3. Modifies `package.json` in place (preserves `^`/`~` prefixes)
4. Optionally uploads report to Fileverse

<Warning>
  Run `npm install` or `opm install` after `opm fix` to apply changes and update the lockfile.
</Warning>

<Tip>
  Review the diff before committing. AI replacements require 2+ agent consensus.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.