> ## 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.

# Google Slides

> Mount Google Slides decks as Mirage files from Node or the browser.

`GSlidesVFS` exposes Slides decks as `.gslides.json` files containing the deck structure, slides, and text content.

Setup steps for OAuth credentials live at [Google Workspace Credentials](/home/setup/google).

## Node

```bash theme={null}
pnpm add @struktoai/mirage-node
```

```ts theme={null}
import { GSlidesVFS, MountMode, Workspace } from '@struktoai/mirage-node'

const slides = new GSlidesVFS({
  clientId: process.env.GOOGLE_CLIENT_ID!,
  clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
  refreshToken: process.env.GOOGLE_REFRESH_TOKEN!,
})

const ws = new Workspace({ '/slides': slides }, { mode: MountMode.READ })
await ws.shell('ls /slides/owned/')
```

## Browser

```bash theme={null}
pnpm add @struktoai/mirage-browser
```

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

const slides = new GSlidesVFS({
  clientId: GOOGLE_CLIENT_ID,
  clientSecret: GOOGLE_CLIENT_SECRET,
  refreshToken: localStorage.getItem('gslides.refresh_token')!,
})
```

## Config

| Field | Default | Notes |
| - | - | - |
| `clientId` | required | Google OAuth client ID. |
| `clientSecret` | required | Google OAuth client secret. Redacted in snapshots. |
| `refreshToken` | required | User's refresh token. Redacted in snapshots. |
| `refreshFn` | built-in | Optional override for the access-token refresh callback. |

## Mount mode

`read`, partial write (text element replacements).

For the JSON structure (slides, layouts, text frames) see the [Python Slides docs](/python/vfs/gslides).


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