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

# Run your app in Replit

> Ask Replit to run a development preview of your GitHub or GitLab repository, follow setup progress, and try the app before making your first focused change.

See your application running before changing its code. This walkthrough uses the [Cloud Agent Demo](https://github.com/replit/cloud-agent-demo), a small landing page with no required database, credentials, or external services. If you already have a repository, use its URL instead.

> [!NOTE]
>
> Don't have a repository to try? You can use the Cloud Agent Demo if you have been granted access. The example repository is currently private, not public.

## Run your app

Before starting, [connect to your repository](https://docs.replit.com/build/code/connect-your-repository.md) if your GitHub or GitLab account is not already connected.

**1. Ask Replit to run the app**

For the demo, copy this prompt:

Run [https://github.com/replit/cloud-agent-demo](https://github.com/replit/cloud-agent-demo) and show me a preview.
Do not push changes or open a pull request.

If you have your own repository, paste its link in place of the demo URL.

![Replit chat composer with a prompt to run the Cloud Agent Demo and show a preview without pushing changes or opening a pull request.](https://mintcdn.com/replit/ZvLiuMLrojYoqf3I/images/code-contributions/cloud-agent-demo-prompt.jpg?fit=max\&auto=format\&n=ZvLiuMLrojYoqf3I\&q=85\&s=d2961cd7d4183656174154ea0506a1aa)

Replit prepares or reuses a development setup, installs dependencies, and starts the app. It can use your repository's instructions to work out the setup commands, so you don't need to determine them yourself.

The app runs in a cloud sandbox. You do not need to create a reusable environment first; [Files and environment](https://docs.replit.com/build/code/navigate-your-workspace.md#files-and-environment) explains the difference.

If your application needs credentials, enter them through the [secure secrets flow](https://docs.replit.com/build/code/navigate-your-workspace.md#secrets), not in your message. The Cloud Agent Demo does not require any.

**2. Preview and save the environment**

Try the running preview. Once the app works, you can optionally save its setup so future chats can start with the repository, runtime, tools, and dependencies prepared.

When Replit offers to save it, confirm the repository, branch, and proposed setup with Replit. Review the environment name and description in the form, then select **Save environment**.

![Replit showing the Cloud Agent Demo preview beside a Save environment form with a name, description, and Save environment button.](https://mintcdn.com/replit/ZvLiuMLrojYoqf3I/images/code-contributions/cloud-agent-demo-save-environment.jpg?fit=max\&auto=format\&n=ZvLiuMLrojYoqf3I\&q=85\&s=c58d0efa53f1824164e84ff86ec09665)

Replit builds the saved setup and checks the app in a fresh sandbox. Saving the configuration does not itself mean the build succeeded. After a successful build, future chats can reuse the prepared setup.

> [!NOTE]
>
> Background builds need [workspace repository access](https://docs.replit.com/build/code/manage-repository-access.md), separate from your personal Git connection. An administrator may need to configure it. You can keep using your current preview without saving a reusable environment.

Saving does not publish your app or automatically share the setup with your team. Later rebuilds do not update the sandbox you're already using. See [Files and environment](https://docs.replit.com/build/code/navigate-your-workspace.md#files-and-environment) for how this works.

If the form does not appear, you can ask Replit to save the working setup. Detailed setup guidance is in [Create a reusable environment](https://docs.replit.com/build/code/create-reusable-environment.md).

**3. Open the preview in a new tab**

Select **Open in a new tab** in the upper-right corner of the preview toolbar. Hover over the button to see its tooltip.

![Preview toolbar with the Open in a new tab button and its tooltip highlighted.](https://mintcdn.com/replit/ZvLiuMLrojYoqf3I/images/code-contributions/open-preview-tab.jpg?fit=max\&auto=format\&n=ZvLiuMLrojYoqf3I\&q=85\&s=6a25f71d56825d3bba81068ee7786ba3)

The application opens in a separate browser tab, giving you more room to try it. You are still looking at a development preview, not a production deployment.

![Cloud Agent Demo landing page displayed without the surrounding Replit chat and sidebar.](https://mintcdn.com/replit/ZvLiuMLrojYoqf3I/images/code-contributions/cloud-agent-demo-browser-preview.jpg?fit=max\&auto=format\&n=ZvLiuMLrojYoqf3I\&q=85\&s=42295144489b57ee47f267524de5068e)

For the landing-page demo:

* **Try the navigation:** Select the links to jump to the page's sections.
* **Explore the content:** Find the workflow, benefits, and how-it-works sections.
* **Check the layout:** Resize the preview to see how the page adapts to a smaller screen.

If the preview does not load, ask Replit to check the server and preview endpoint. If it stops responding, ask Replit to restart the app and check the link again.

Next: [Make a contribution](https://docs.replit.com/build/code/first-contribution.md) to improve your app.
