elide share

You just finished a build. A designer needs to see it on their phone. A client wants a link. You want to pull it up on a device across the room. You do not want to deploy anything, configure anything, or sign up for anything.

bash
 elide share ./dist

That is the entire workflow. Elide starts a static file server with compression, provisions a public HTTPS URL, and prints a QR code you can scan. No configuration files, no tunnel setup, no DNS records. Point it at a directory and it is live.

Quick start

Share the current directory:

bash
 elide share .

Elide auto-detects the best available exposure method -- Tailscale Funnel, ACME, self-signed, or local -- starts serving with brotli, zstd, and gzip compression enabled, and prints the public URL with a QR code.

Share a build output directory:

bash
 elide share ./dist

Share with live reload while you are still working:

bash
 elide share ./dist --dev

File changes trigger automatic browser refresh. Useful when iterating on a static site and previewing on another device simultaneously.

How share compares to serve + expose

elide share is elide serve and elide expose fused into one command. Under the hood it validates the directory, resolves the best exposure method, starts a static file server on 0.0.0.0, enables compression, and prints the connection banner. The tradeoff is simplicity versus control:
elide serveelide exposeelide share
InputDirectory, JS/TS file, or Pkl configLocal port or addressDirectory
TLSManual or via configAuto (Tailscale, ACME, self-signed)Auto (Tailscale, ACME, self-signed)
Public URLNo (local only by default)YesYes
ConfigurationFull Pkl config supportedCLI flagsCLI flags
Use caseProduction servers, dev serversExposing existing servicesQuick directory sharing
Use elide share when you want the fastest path from a directory to a public URL. Use elide serve when you need reverse proxy, middleware, multiple routes, or a Pkl config file. Use elide expose when you already have a local service running and just need to punch a hole to it.

Common scenarios

Sharing build artifacts with a teammate

You ran the build, they need to verify it looks right:

bash
 elide share ./dist --timeout 30m

The server shuts itself down after 30 minutes. Send them the URL, they check it, done.

Documentation preview for a pull request

You are reviewing a docs change and want to see the rendered output on your phone:

bash
 elide share ./site/build --method tailscale

Tailscale Funnel gives you a public https://.ts.net URL with valid TLS. No domain registration, no certificate setup.

Design mockup review

A designer exported static HTML and assets. Share it so the team can view it on real devices:

bash
 elide share ./mockups --dev

With --dev, the browser reloads automatically as the designer updates files.

CI artifact inspection

Pipe structured logs to stdout for scripting or CI integration:

bash
 elide share --json --no-qr ./artifacts

Each request emits a JSON line:

json
{"method":"GET","url":"/index.html","status": 200,"latency_us": 142}

Exposure methods

The --method flag controls how the directory becomes publicly accessible. The default is auto, which tries each method in order until one succeeds.
MethodWhat it does
autoTries Tailscale Funnel first, then ACME if —domain is provided, otherwise falls back to self-signed
tailscaleExposes via Tailscale Funnel. Requires tailscaled running. Instant DNS and TLS with zero config
acmeProvisions a TLS certificate via ACME (Let's Encrypt). Requires a public domain pointing at this machine and —acme-email
self-signedGenerates an ephemeral self-signed TLS certificate. Quick local testing when a trusted cert is not needed
localPlain HTTP on the local network, no TLS
If you have Tailscale installed and running, auto will find it and use Funnel automatically. This is the zero-thought path to a public HTTPS URL.

CLI reference

elide share [OPTIONS] <DIR>
FlagDefaultDescription
DIR(required)Directory to serve and expose
—methodautoExposure method: auto, tailscale, acme, self-signed, or local
—port443Public-facing listen port
—domainnoneCustom domain name for ACME certificate provisioning
—acme-emailnoneContact email for ACME account registration
—devfalseEnable dev mode with live reload on file changes
—no-qrfalseSuppress QR code output in the connection banner
—no-tuifalseDisable the TUI and use plain log output
—jsonfalseEmit structured JSON lines to stdout for each request event
—timeoutnoneAuto-shutdown after a duration (30s, 5m, etc.)
---

See also

  • elide serve -- Production HTTP server with static files, reverse proxy, TLS, and middleware
  • elide expose -- Expose a local port to the internet with automatic TLS
  • CLI Reference -- Complete reference for all Elide commands