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

# Auto-save & Version Rollback

> Automatic saving with restore points and safely rolling back to earlier versions.

Inkwell automatically saves your work and tracks changes, allowing you to recover from accidental edits or restore earlier versions. This guide explains how auto-save and version history work.

## How auto-save works

Inkwell saves your script automatically in the background—you never need to manually save (though `Cmd/Ctrl+S` works if you prefer).

### Save frequency

Auto-save triggers when the renderer detects changes and sends updated data to the main process. This happens:

* While you're actively editing (tracks changes continuously)
* When you stop typing (after a brief pause)
* When you close the file or quit the app

### What gets saved

* All screenplay content (scenes, dialogue, action, etc.)
* Script Info (title, author, contact details)
* Project Info (logline, scratchpad notes)
* Character metadata (age, gender, aliases, bios)
* Revision marks and colors
* Formatting and structure

<Tip>
  Auto-save uses an efficient **patch-based system** that only saves what changed, keeping file sizes small and saves fast.
</Tip>

### Save location

Scripts save as `.ink` files in the location you chose when creating the script:

* **Default location**: `~/Documents/Inkwell Scripts/`
* **Custom location**: Wherever you selected in the "Save As" dialog

You can move `.ink` files to other folders—just open them from their new location with `Cmd/Ctrl+O`.

## Version history system

Inkwell uses a sophisticated version history system that efficiently tracks all changes to your script.

### How history works

Instead of storing complete copies of your script for every save, Inkwell uses:

* **Snapshots**: Full copies of your script at key moments (initial state, manual saves, checkpoints)
* **Patches**: Efficient change records between snapshots (auto-saves)

This approach keeps file sizes small while maintaining complete version history.

### Automatic checkpoints

Inkwell automatically creates checkpoints (full snapshots) when:

* Too many patches have accumulated since the last checkpoint
* Too much time has passed since the last checkpoint

This ensures you can always restore to any point in history quickly.

### Access version history

Click the save status indicator in the bottom-right corner of the status bar to open the Save History popover:

<Steps>
  <Step title="Open Save History">
    Click the save status text (e.g., "Saved") in the status bar, or look for the clock icon
  </Step>

  <Step title="Browse history">
    The popover shows all save points chronologically:

    * **Time saved**: How long ago each save occurred
    * **Save type**: Manual Save (💾) or Auto-save (🕐)
    * **Current**: Highlighted entry shows your current position
  </Step>

  <Step title="Restore a version">
    Click the restore icon (↻) next to any entry to revert to that version. A confirmation dialog appears before restoring.
  </Step>
</Steps>

<Warning>
  Restoring a version **creates a backup** of your current state before reverting. The backup is saved to your backup folder and can be recovered if needed.
</Warning>

## Common rollback scenarios

### Accidental deletion

**Problem**: You deleted a scene or dialogue and need it back.

**Solution**:

1. Click the save status in the status bar to open Save History
2. Find a save point from before the deletion (check timestamps)
3. Click the restore icon (↻) next to that entry
4. Confirm the restore in the dialog that appears
5. Your deleted content returns, and a backup of your current state is saved

### Rewrite gone wrong

**Problem**: You rewrote a scene but prefer the original.

**Solution**:

1. Open Save History from the status bar
2. Find the save from before your rewrite
3. Restore that version
4. Your original writing returns, and your experimental version is backed up

### Want to experiment safely

**Scenario**: You want to try a major rewrite without fear of losing your current draft.

**Approach**:

1. Press `Cmd/Ctrl+S` to create a manual save of your current state
2. Make your experimental changes
3. If you like them, keep writing
4. If not, restore the manual save from Save History

<Tip>
  Manual saves (`Cmd/Ctrl+S`) create clear markers in your history, making it easy to find important drafts.
</Tip>

## Compress history

Over time, your `.ink` file accumulates version history. If file size becomes large, you can compress history.

### When to compress

Consider compressing when:

* Your `.ink` file exceeds 20-30 MB
* You're archiving a finished draft and won't need edit history
* You want to share a script without including your editing process

### How to compress

<Steps>
  <Step title="Open Save History">
    Click the save status in the status bar
  </Step>

  <Step title="Click Compress history">
    At the bottom of the popover, click **Compress history**
  </Step>

  <Step title="Confirm">
    A dialog explains that this keeps only your current state and removes all history. A backup is created automatically.

    Click **Confirm Compress** to proceed.
  </Step>

  <Step title="Review results">
    A summary shows how many entries were removed and how much space was saved.
  </Step>
</Steps>

<Warning>
  Compression is **permanent** for the file itself, but a backup with full history is automatically created in your backup folder before compression.
</Warning>

### Backup folder

All revert backups and compression backups are saved to a dedicated backup folder. To access it:

1. Open Save History from the status bar
2. Click **Open backup folder** at the bottom
3. Your file manager opens to the backup directory

Backups are named with timestamps and the reason they were created (e.g., `my-script-revert-2025-01-15.ink`).

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Can I disable auto-save?">
    No. Auto-save is always active to protect your work. The patch-based system is efficient and doesn't interrupt writing.
  </Accordion>

  <Accordion title="What happens if Inkwell crashes?">
    Your script is saved up to the last auto-save (usually recent). When you reopen Inkwell, your work will be recovered automatically.
  </Accordion>

  <Accordion title="How much history does Inkwell keep?">
    Inkwell keeps all history until you manually compress it. The patch-based system keeps file sizes reasonable even with extensive history.
  </Accordion>

  <Accordion title="Where are automatic backups stored?">
    Backups created during restores and compressions are saved to a dedicated backup folder. Click "Open backup folder" in the Save History popover to access them.
  </Accordion>

  <Accordion title="I restored the wrong version—can I undo it?">
    Yes! Restoring automatically creates a backup. Open your backup folder (from Save History popover → "Open backup folder") and open the most recent backup file.
  </Accordion>

  <Accordion title="Does version history work with imported files?">
    Files imported from Fountain or Final Draft don't include version history. History tracking starts fresh when you import and begin editing in Inkwell.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Save status shows 'Saving...' indefinitely">
    Possible causes:

    * **Disk full**: Check available storage space
    * **File permissions**: Ensure Inkwell can write to the save location
    * **File in use**: Close other apps accessing the `.ink` file

    If the issue persists, export to PDF or Fountain immediately, then contact support.
  </Accordion>

  <Accordion title="Save History popover is empty">
    This occurs when:

    * You just created a new script (history starts accumulating as you edit)
    * You compressed history (only current state remains)
    * The file was just imported (no history transfers from other formats)
  </Accordion>

  <Accordion title="My .ink file is very large">
    Large files (20+ MB) usually have extensive history. Compress history from the Save History popover to reduce file size. A backup with full history is created automatically.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Exporting files" icon="file-export" href="/managing-files/exporting-files">
    Export your script to PDF, Fountain, or Final Draft
  </Card>

  <Card title="Importing files" icon="file-import" href="/managing-files/importing-files">
    Import scripts from other formats
  </Card>

  <Card title="Keyboard shortcuts" icon="keyboard" href="/reference/keyboard-shortcuts">
    Learn all available shortcuts
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/reference/troubleshooting">
    Fix common issues and recover lost work
  </Card>
</CardGroup>
