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

> ## Agent Instructions
> Agents: start with https://docs.pre.dev/agents.md, which has complete recipes, plan access, polling rules, errors and limits.
> Authenticate with the workspace API key (pdk_…) from Integrations → Built-in, sent as Authorization: Bearer <key>.
> REST API: https://api.pre.dev (OpenAPI: https://docs.pre.dev/api-reference/openapi.json). AI Gateway: https://api.pre.dev/v1, OpenAI-compatible (OpenAPI: https://docs.pre.dev/api-reference/ai-gateway.openapi.json).
> pre.dev MCP server: npx -y @predotdev/mcp setup adds it to every local coding agent with every pre.dev tool plus the user's own Chrome; the hosted server is https://api.pre.dev/mcp. Search these docs over MCP at https://docs.pre.dev/mcp.

# Preview and hosting

> Inspect the running app, install mobile builds, and see where your app is served.

**Preview** shows the running app with your latest changes, the draft, from the project's sandbox. The workspace checks its status and restores an idle environment when you open it. If setup or startup fails, use the reported status and the agent's debugging controls to resolve it.

A code change can exist before the application starts successfully. Check the build output, environment variables, start command, and preview behavior before sharing the result.

## Sessions and access

Select the session whose work you want to inspect. Each session has its own preview; Main's is also reachable through Share's Draft link. For a session running on your laptop through the CLI, the owner sees the laptop's app while its dev server is up.

Who can open the app is set in [Publish](https://predev.mintlify.site/coding-agent/building/publish.md#who-can-open-it): **Anyone** or **Invited only**. Opening the app and editing the project are [separate permissions](https://predev.mintlify.site/coding-agent/building/collaboration.md).

## Mobile projects

Expo and React Native projects preview in a phone frame in the browser. To test native features, install the app on a device from **Install your app**:

| Platform | How |
| - | - |
| Android | **Build Android app**, then download and install the APK |
| iPhone | **Build for TestFlight** with your Apple Developer account, or install on an iPhone registered with that account |

Connect your Expo account once to build; your Expo plan covers build usage. Builds run in the background, so you can leave the page, and you can ask for an email with the install link when a build is ready. **Send to my phone** gives a QR code or link for the finished build. Live Expo Go previews are under **Advanced options**.

To open the same session on your phone, use the phone handoff next to the preview: scan the QR code, copy the link, or email it to yourself. If the mobile server is unavailable, **Debug with Agent** sends the relevant context into the project conversation.

## History and export

The Code and history views let you inspect available commits, branches, and file changes. Uncommitted work is not a saved Git version. Review the selected commit and the confirmation before using **Revert**, because it changes the working code.

Use **Download code** to get the project as a zip, and the export controls for planning artifacts. **Refresh from GitHub** synchronizes a linked hosted checkout after external changes when offered.

## Hosting

The app's address, `<name>.pre.dev`, serves your [published](https://predev.mintlify.site/coding-agent/building/publish.md) app once you publish, and stays up while the sandbox sleeps. Before you publish, it shows the draft. Hosted addresses use HTTPS and support WebSockets. To serve the published app on your own hostname, add a [custom domain](https://predev.mintlify.site/coding-agent/building/custom-domains.md).


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