> For the complete documentation index, see [llms.txt](https://docs.nimbalyst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nimbalyst.com/file-management/file-history-and-restore.md).

# File History and Restore

Nimbalyst saves file snapshots automatically. Open history with Cmd+Y to compare versions and restore a document after an AI edit goes wrong.

Nimbalyst keeps automatic snapshots of every document you edit, so version history is built into the editor with no git or other tools required. When an AI edit goes wrong, or you want yesterday's wording back, open the file's history, compare versions, and restore the one you want.

### Files with unsaved changes

Tabs show a dot (•) next to a filename with unsaved changes. The dot disappears after a manual save (Cmd+S) or an autosave (the interval is configurable).

### Opening file history

Snapshots are captured automatically as you work: on autosave, on manual save, and around AI edits, so you always have a version from just before the agent touched the file. They are stored compressed in Nimbalyst's local database.

Open the history panel for the current file in any of these ways:

* Press **Cmd+Y**
* Choose **Edit > View Local History** from the menu bar
* Open the **...** menu in the editor header and choose **View History**

<div align="left"><figure><img src="https://562749618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiVUeHZHlFlZrZt02syRC%2Fuploads%2Fm7FxnWKD0ybMfeuZ79mi%2Fimage.png?alt=media&amp;token=177b541e-a39b-434b-bcf7-291f65095f24" alt="" width="218"><figcaption><p>The editor's overflow menu includes View History.</p></figcaption></figure></div>

The panel lists every snapshot with a timestamp, a size, and how it was created (Auto Save, AI Edit, Pre Edit). Select a snapshot to preview its full content.

<figure><img src="https://562749618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiVUeHZHlFlZrZt02syRC%2Fuploads%2FaGsxXyy6D6d2DVeELSRv%2Fimage.png?alt=media&amp;token=ade752b2-7b4e-41d7-92c8-4febaff08dd2" alt=""><figcaption><p>The history panel: snapshots with timestamps on the left, a preview of the selected version on the right, and a Restore This Version button.</p></figcaption></figure>

### Comparing snapshots

Click a snapshot to see how it differs from the previous one. To compare any two versions, click the first snapshot and then Cmd+click the second.

<figure><img src="https://562749618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiVUeHZHlFlZrZt02syRC%2Fuploads%2FiI7wp33BSLAjgbdSqEfK%2Fimage.png?alt=media&amp;token=5cf41235-e928-4848-9107-81e2501af5a8" alt=""><figcaption><p>Comparing two snapshots side by side, with removed text in red on the old version and added text in green on the new one.</p></figcaption></figure>

Study the differences, then choose the version you want.

### Restoring a version

Select a snapshot and click **Restore This Version**. Your current version becomes a new snapshot, so history is preserved and you can undo the restoration if needed.

### Deleting snapshots

Hover a snapshot in the list and click its delete icon. Nimbalyst asks for confirmation before removing it.

### Where snapshots are stored

Snapshots live in the `document_history` table of Nimbalyst's local database, inside the application data folder:

| Platform | Application data folder                   |
| -------- | ----------------------------------------- |
| macOS    | `~/Library/Application Support/Nimbalyst` |
| Windows  | `%APPDATA%\Nimbalyst`                     |
| Linux    | `~/.config/Nimbalyst`                     |

Newer installs use SQLite (`sqlite-db/nimbalyst.sqlite`). Installs that predate the SQLite migration use PGLite (the `pglite-db/` folder) until they migrate. Development builds use a `@nimbalyst/electron` folder in the same location.

That database is backed up every 12 hours by default and on quit, so document history can be recovered after database corruption. You can change the interval under **Settings > Application > Database**. See [Database Backups and Restore](/troubleshooting/database-backups-and-restore.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nimbalyst.com/file-management/file-history-and-restore.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
