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

# Staging Review for Optimizations

> Review and manage optimizations before creating pull requests with staging mode

# Staging Review for Optimizations

<Note>
  This is a Pro feature available exclusively to Codeflash Pro users. [Upgrade to
  Pro](https://app.codeflash.ai/billing) to access it.
</Note>

Staging Review allows you to preview and evaluate all optimizations before creating pull requests. This
feature provides a centralized review interface where you can examine proposed changes and selectively
create pull requests for approved optimizations.

## Benefits of Staging Review

* **Preview without PRs:** Review all optimization suggestions without cluttering your repository with multiple pull requests
* **Batch review:** Examine all optimizations in one centralized location
* **Selective PR creation:** Choose which optimizations to convert into pull requests
* **Reduced noise:** Keep your repository's PR list clean while evaluating changes

## Using Staging Review

To optimize your codebase with staging review enabled, run:

```bash theme={null}
codeflash --all --staging-review
```

This command will:

1. Start to optimize your project, and if it finds any optimizations, it will save them to [Review Optimizations Page](https://app.codeflash.ai/review-optimizations) instead of creating PRs immediately

   <img src="https://mintcdn.com/codeflash-acdac3a5/gWYWeuOU4VheJVFd/images/review-optimizations.png?fit=max&auto=format&n=gWYWeuOU4VheJVFd&q=85&s=ed3065b936101a408b8f5bc02c4df8e0" alt="Review Optimizations List" width="2994" height="1700" data-path="images/review-optimizations.png" />

2. Provide you with a staging interface to review all proposed changes

   <img src="https://mintcdn.com/codeflash-acdac3a5/gWYWeuOU4VheJVFd/images/editor.png?fit=max&auto=format&n=gWYWeuOU4VheJVFd&q=85&s=3abe29daae99ed361f9b16921738b9ee" alt="Staging Review Editor" width="2988" height="1722" data-path="images/editor.png" />

## Managing Staged Optimizations

Once optimizations are staged, you can:

* Review each optimization individually
* Compare original and optimized code side-by-side
* Edit the code of staged optimizations
* Create pull requests for selected optimizations directly from the staging interface

<img src="https://mintcdn.com/codeflash-acdac3a5/gWYWeuOU4VheJVFd/images/edited-code.png?fit=max&auto=format&n=gWYWeuOU4VheJVFd&q=85&s=2678310e920a885fdd24534ff5b9c707" alt="Edited Code" width="2992" height="1730" data-path="images/edited-code.png" />
