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

# OPFS

> Keep workspace files in browser storage across page reloads.

OPFS uses the browser's Origin Private File System. Files stay scoped to the
current website's origin and persist across page reloads. Browser only; for
Python or Node, use [Disk](/home/setup/disk).

## Configuration

```typescript theme={null}
import { MountMode, OPFSVFS, Workspace } from '@struktoai/mirage-browser'

const ws = new Workspace(
  { '/data': new OPFSVFS({ root: 'mirage' }) },
  { mode: MountMode.WRITE },
)
await ws.shell('echo "hello" > /data/note.txt')
await ws.close()
```

The browser controls storage quotas and may remove data under storage
pressure. See the [OPFS guide](/typescript/setup/opfs#storage-and-quotas) for
checking usage and requesting persistent storage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.