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

> ## Agent Instructions
> For account actions, read https://ohmyho.st/skills/ohmyhost-get-started/SKILL.md and use the authenticated ohmyho.st CLI, local product MCP or supported remote OAuth MCP. Read the current project source binding before choosing GitHub or managed versions. Mintlify search only reads documentation. Preserve the customer’s selected project, environment and authentication provider; keep private application values in the one-hour secret link or local stdin flow.

# Live previews

> Open a stable preview and see saved source changes through your framework's development server.

A live preview runs your app's development server at a stable URL. Save a version through [managed source](https://docs.ohmyho.st/sources.md), or push to the selected [GitHub branch](https://docs.ohmyho.st/github.md), to update an awake preview. Code changes use the framework's hot reload. Package, lockfile or runtime-configuration changes can restart its server.

Cloudflare selects the location of preview compute; the project region selects its data services.

Choose the project environment explicitly. A Dev preview uses Dev data; a Prod preview uses Prod data, including when you write through the app. Free projects have a Prod preview. Paid projects can have a separate Dev preview and Prod preview.

## Open the preview

Use your current [CLI login](https://docs.ohmyho.st/cli.md) and the intended project. Retrieving or managing its private preview link requires project write permission; viewers use a link shared with them:

```sh theme={null}
ohmyhost project preview open --project "$PROJECT_ID" --environment prod --json
ohmyhost project preview get --project "$PROJECT_ID" --environment prod --json
```

Open the returned `url` in your browser. `status` is `cold`, `starting`, `ready` or `sleeping`. The URL shows progress while the app starts. `source` identifies the saved version selected for the preview and `applied_source` identifies the version it has applied. Either can be `null`. Share the preview when `ready_to_show` is true, which means the preview is ready and the two version sequences match. The URL stays the same as you save later versions.

Anyone with this URL can view and use the app without a platform login. Share it only with intended viewers. Application login, when configured, still applies.

For an app that uses Native Auth, the preview checks project rollout access before Paid coverage. If it reports `native_auth_launch_unavailable`, ask the project owner to contact [support](https://docs.ohmyho.st/support.md) with the project ID. If it reports `paid_plan_required` during Native Auth preparation, the owner can check the workspace plan. Once the reported requirement is satisfied, wake the same preview URL. [Native Auth setup](https://docs.ohmyho.st/application-auth.md#set-up-omh-native-auth).

## Save and continue

Use the normal [source publication flow](https://docs.ohmyho.st/sources.md#save-current-local-files) for local files, or the connected chat's `source_changes` and `source_upload_*` tools. Follow the save operation until it succeeds. An accepted upload that has not committed yet is not a saved version.

An awake preview applies the accepted files. A sleeping preview keeps the latest target and applies it when opened again. Ordinary code edits retain the running development server; framework hot reload determines which component state can be preserved.

Preview startup does not run customer migrations. Apply an intended schema change through the explicit [migration flow](https://docs.ohmyho.st/migrations.md). To publish a checked production artifact, continue through the normal [deployment flow](https://docs.ohmyho.st/environments.md).

## Sleep and reopen

A preview sleeps after ten minutes without meaningful use. An idle tab, hot-reload connection or automatic polling does not keep it awake. Open the URL or use its wake action to continue.

Dependencies are retained for thirty days after the last preview use. After that, the next open prepares them again. Sleeping has no compute charge; awake usage follows [the preview rate](https://docs.ohmyho.st/pricing.md).

A compressed dependency snapshot can be at most 2 GiB. Reduce large dependencies or generated files if the preview exceeds this limit. A snapshot belongs only to the selected project's environment; publication still builds the saved source separately.

## Stop or replace the link

Stop clears the current runtime and dependency cache. A later open prepares the saved source at the same URL:

```sh theme={null}
ohmyhost project preview stop --project "$PROJECT_ID" --environment prod \
  --idempotency-key "$STOP_REQUEST_KEY" --yes --json
```

Rotate when you want a new link. The old URL stops working and its open connections close:

```sh theme={null}
ohmyhost project preview rotate --project "$PROJECT_ID" --environment prod \
  --idempotency-key "$ROTATE_REQUEST_KEY" --yes --json
```

Keep each request's original key after an uncertain response. With managed Native Auth, rotation also invalidates that preview's previous login sessions.

## Use MCP or REST

Local and remote MCP expose `preview_get`, `preview_open`, `preview_stop` and `preview_rotate`. Pass the project and `environment` returned by your current tool schema. `preview_open` allows up to 20 seconds for wake-up and readiness checks. If it returns while the preview is still starting or applying a version, use `preview_get` to check again.

MCP results can include `next_step` for the agent and `say_to_user` to relay in the user's language. Follow the deploy Skill for when to open the preview, check readiness and share the link. [Deploy Skill](https://ohmyho.st/skills/ohmyhost-deploy/SKILL.md)

The same actions are available through REST.

| Operation | Endpoint |
| - | - |
| `getProjectPreview` | `GET /v1/projects/{project_id}/preview?environment=dev\|prod` |
| `openProjectPreview` | `POST /v1/projects/{project_id}/preview?environment=dev\|prod` |
| `stopProjectPreview` | `DELETE /v1/projects/{project_id}/preview?environment=dev\|prod` |
| `rotateProjectPreviewToken` | `POST /v1/projects/{project_id}/preview/token?environment=dev\|prod` |

Use the generated SDK or published API schema for request headers and authorization. Keep capability URLs out of public logs and source files.


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