Discuss online

Blog

Developers, Zero Trust, Access

Private preview links: share a local app with only the people you choose

Leo Marchetti and Priya Raman

8 minute read

Copy URL

We launched preview links two years ago so developers could share whatever was running on their laptop with a single command. A lot has changed since then, but the core idea is the same: you should be able to show your work without setting up hosting first.

Your coding agent has just finished a feature. The dev server is up on localhost:5173, and before you ask, the agent offers to let you try it on your phone. It runs one command and hands you a link:

embrowe preview --url
embrowe preview --url
embrowe preview --url

That command starts a preview link. embrowe, our lightweight connector, publishes your local service at a random preview.embrowe.dev address. No account, no domain, no cost. Agents reach for preview links for the same reason people do: they are the shortest path from a local port to a URL.

The catch has always been the same. Anyone with the link can open it.

Starting today, you can add --allow-email to the command, and your preview link only lets in the addresses and domains you choose. Visitors prove they own one of those addresses with a one time code. Nobody, on either side, needs an Embrowe account.

Agents made preview links more popular than ever

Agents that write code need somewhere to show you the result. Agents running on a machine at home need to be reachable from your phone. Tool servers on a laptop need a public endpoint before a hosted assistant can call them. Each of these needs a URL, and a preview link produces one from a single command an agent can run by itself. There is no signup form for it to get stuck on. Add --output json and every log line becomes a JSON object, so the agent can pick out the URL without scraping text.

The most common question we heard was simple: how do I make sure the link only opens for me?

Control who can access your service

Pass an email address to --allow-email:

embrowe preview --url http://localhost:8080 \
  --allow-email

embrowe preview --url http://localhost:8080 \
  --allow-email

embrowe preview --url http://localhost:8080 \
  --allow-email

Alex opens the URL, enters an email address, types in the code sent to that inbox, and reaches your app. Anyone else is stopped before a single request reaches your machine. You still do not create a DNS record, write a config file, or open a dashboard.

To let in more people, repeat the flag or allow an entire domain:

embrowe preview --url http://localhost:8080 \
  --allow-email alex@example.com \
  --allow-email sam@example.com \
  --allow-email '*@example.com'
embrowe preview --url http://localhost:8080 \
  --allow-email alex@example.com \
  --allow-email sam@example.com \
  --allow-email '*@example.com'
embrowe preview --url http://localhost:8080 \
  --allow-email alex@example.com \
  --allow-email sam@example.com \
  --allow-email '*@example.com'

If you leave out --allow-email, nothing changes. Public preview links behave exactly as they always have.

To change who can get in, stop the connector and start a new link. Access ends for everyone the moment the process exits.

Make it your agent's default

Because protection is a single flag, agents can use it as easily as people can. Add one line to the instructions file your coding agent reads, and every link it shares is private by default.

When sharing a local server, run embrowe preview with --allow-email set
When sharing a local server, run embrowe preview with --allow-email set
When sharing a local server, run embrowe preview with --allow-email set

Start a protected link from the CLI

The same flag works when you start a preview from the Embrowe CLI, so your existing scripts only need one extra argument.

Embrowe checks the email. Your machine decides who gets in.

The one time code is checked at the edge, before traffic is forwarded. Your connector receives a signed header with the verified address, so your app can greet the visitor by name or apply its own rules on top.

Try it on your next demo

Email protection for preview links is free, like preview links themselves. Update embrowe, start your local server, and add the --allow-email flag:

embrowe preview --url http://localhost:8080 --allow-email
embrowe preview --url http://localhost:8080 --allow-email
embrowe preview --url http://localhost:8080 --allow-email

The next time you or your agent shares what you are building, the link will only open for the people you chose.

Related tags

Developers, Zero Trust, Access

Follow on social media

Embrowe

Leo Marchetti and Priya Raman

On this page

Agents made preview links more popular than ever

Control who can access your service

Make it your agent's default

Start a protected link from the CLI

Embrowe checks the email. Your machine decides who gets in.

Try it on your next demo

Subscribe to receive notifications of new posts

Your email address

Subscribe

We will never share your email address.

Create a free website with Framer, the website builder loved by startups, designers and agencies.