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

# Modernize APIs

> Detect and rewrite deprecated Apple APIs in your Swift code

## Overview

Apple deprecates APIs every release. **Parsaa Modernize** finds deprecated Apple APIs in the focused file and rewrites them to modern equivalents — with a diff you review before applying.

Two slash commands drive it:

* `/analyze` — detect deprecated APIs only (free, read-only)
* `/modernize` — detect **and** rewrite them

## How It Works

<Steps>
  <Step title="Focus a file in Xcode">
    Open the Swift file you want to check.
  </Step>

  <Step title="Run /analyze or /modernize">
    Type the command in the composer. `/analyze` lists deprecated APIs without changing anything; `/modernize` proposes modern replacements.
  </Step>

  <Step title="Review the diff">
    Modernize opens its window with the findings. For `/modernize`, each change is shown as a diff.
  </Step>

  <Step title="Apply">
    Apply the rewrite when you're satisfied. Nothing changes until you confirm.
  </Step>
</Steps>

## Configuration

Configure Modernize in **Settings → Automation → Modernize**:

<CardGroup cols={2}>
  <Card title="Model" icon="brain">
    Pick the model used for analysis and rewrites (separate from your chat default).
  </Card>

  <Card title="Auto-analyze on open" icon="bolt">
    Automatically scan the file when the Modernize window opens.
  </Card>

  <Card title="Review before apply" icon="eye">
    Require a diff review before any change is written.
  </Card>

  <Card title="Enable / disable" icon="toggle-on">
    Turn the Modernize automation on or off.
  </Card>
</CardGroup>

<Tip>
  Use `/analyze` first to gauge how much is deprecated — it's free and read-only — then run `/modernize` to apply the modern rewrites.
</Tip>
