---
name: codepulse-previews
description: Share what you build on CodePulse — publish a page, image, video, or folder to a public URL, or expose a running local dev server through a tunnel. Use when the user wants to share, preview, host, or show a rendered page, an image or video, or a running dev server.
---

# CodePulse previews

CodePulse turns what you are working on into a shareable URL on https://codepulse.pro. Two commands, both from the `relay` CLI.

## Publish a file or folder (static)

```
relay publish <file-or-dir> [--title "..."]
```

- Publishes a page, image, or video and prints a shareable CodePulse URL. Paste that URL into your reply.
- An HTML bundle opens as a site; a single image or video opens in a viewer.
- Re-publish after changes; each publish creates a new URL.

## Expose a running dev server (live tunnel)

```
relay expose <port> [--title "..."]
```

- Starts a public tunnel to `http://localhost:<port>` and prints a CodePulse URL. Paste it into your reply.
- The tunnel lives while the relay runs. Stop it with `relay previews stop <public_id>`.
- Only loopback ports 1024-65535 can be exposed.

## Notes

- Every URL is public and unlisted: anyone with the link can open it. It is kept out of search indexes.
- Static previews stay until deleted; live previews end when the dev server or session stops.
