---
name: codepulse-previews
description: Share what you build on CodePulse - publish a page, image, video, or folder to a durable public URL, or expose a running local dev server through a temporary 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://files.codepulse.pro. Two commands, both from the `relay` CLI.

Pick by what the person needs:

| The situation | Use | Result |
| --- | --- | --- |
| Someone must click through a running app now | `relay expose <port> [-- <command>]` | Live at `<id>.preview.codepulse.pro`. Ends with the server or the session. |
| A finished page, image, video or folder someone opens later | `relay publish <path>` | Published at `<slug>-<id>.files.codepulse.pro`. Survives restarts and deploys. |
| The address exists and only the contents changed | `relay publish <path> --to <address>` | Same link, new files. |

## Publish a file or folder (durable)

```
relay publish <file-or-dir> [--title "..."] [--description "..."] [--slug "..."] [--to <address>]
```

- Prints the absolute address, then `update: relay publish <path> --to <address>`. Paste both into your reply, and reuse the update line instead of making a second link.
- Always pass `--description "..."`: one line on what it is and who it is for.
- Never publish secrets or `.env` files. Every address is public and unlisted.
- Contents expire 90 days after the last visit; the address then shows a tombstone.
- A team has 1 GB of published storage by default. A publish over it fails with 413 naming the limit and the usage.
- Manage with `relay assets list [--all]`, `relay assets postpone <address> --days 90|180|365`, and `relay assets delete <address>`.

## Expose a running dev server (live tunnel)

```
relay expose <port> [--title "..."] [--ttl 12h] [--idle 30m] [-- <command>]
```

- Starts a public tunnel to `http://localhost:<port>` at `<id>.preview.codepulse.pro` and prints the URL. Paste it into your reply.
- The tunnel lives while the relay and the dev server run. Stop it with `relay previews stop <public_id>`.
- Never start a dev server with `nohup`, `&`, or a disowned background process. Use `relay expose -- <command>` so it dies with the preview.
- 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.
- Live previews end when the dev server or session stops. Published links survive the session, a deploy and an offline relay.
