# Files and code

Source: https://modulify.ai/docs/editor/files-and-code

Read the source of your site and export it as a zip.

Every Modulify site is a real codebase, and the File Explorer tab lets you read it. It is a reader, not a code editor: files open read only, and changes go through chat.

## Open the File Explorer

The tab lives behind **More** in the tab strip. Click **More**, then **File Explorer**. It has two sub-tabs, **Files** and **Settings**.

## Browse the tree

The tree sits on the left under a **Files** heading. Click a folder to open it and a file to open it in a tab.

Three buttons sit at the top of the tree: **Collapse all**, **Expand all** and **Search**. Search swaps the tree for a search panel where you type at least two characters to match file names and paths, with results capped at 100.

There is also a filter box on the tree itself, placeholded `Filter files`, which narrows what is displayed without leaving the tree. When nothing matches you get `No files match your filter.`, and on a project with no files yet, `No files found.`

Cmd or Ctrl with B hides and shows the tree. When the panel is too narrow to hold the tree beside the file, it collapses into a **Files** button that opens it as a drawer.

## Work with open files

Open files stack as tabs across the top. Right click a tab for **Close**, **Close Others**, **Close to the Left**, **Close to the Right** and **Close All**. Options that have nothing to act on are greyed out.

With no file open the panel reads `No file open` and `Choose a file from the tree.` If the file you had open has since gone, it reads `The file may have been deleted.`

## Read a file

Code opens with line numbers, syntax highlighting, bracket matching and folding. It is read only, so to change something, describe the change in chat.

The toolbar above the file has **Copy**, which copies the whole file and flips to `Copied!`, and **Download**, which saves that single file. On a narrow panel both move into a three dots menu.

Images open as a preview rather than as text. An SVG gets a **Code** and **View** switch so you can flip between its markup and the rendered image.

## Export the whole site

The **Settings** sub-tab has one section, **Export**, described as downloading your whole site as source code you can run anywhere.

**Export .zip** downloads the full source of your site. It requires a paid plan. On a free plan the button carries a **Paid** badge and is disabled, with the tooltip `Exporting your code requires a paid plan.`


## From an AI client over MCP

`list_files` and `read_file` read the source, and `write_file` replaces files directly in the running preview.

`write_file` bypasses the AI entirely, so nothing about the change is explained or reviewed, and it is **not captured in version history**: `restore_version` cannot undo it. Take a backup first for anything substantial. It needs the preview to be running, replaces the whole file rather than patching it, and needs the `code:write` scope, which is unticked by default.

When you want a change described rather than dictated, `send_message` is the better tool, because the AI reads the surrounding code first.

See [MCP tools](/docs/mcp/tools).
## Next

- [Logs](/docs/editor/logs) shows what the code is doing when it runs.
- [Site chat](/docs/build/site-chat) is how you change any of these files.