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.
elide share ./distThat 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:
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:
elide share ./distShare with live reload while you are still working:
elide share ./dist --devFile 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 serve | elide expose | elide share | |
|---|---|---|---|
| Input | Directory, JS/TS file, or Pkl config | Local port or address | Directory |
| TLS | Manual or via config | Auto (Tailscale, ACME, self-signed) | Auto (Tailscale, ACME, self-signed) |
| Public URL | No (local only by default) | Yes | Yes |
| Configuration | Full Pkl config supported | CLI flags | CLI flags |
| Use case | Production servers, dev servers | Exposing existing services | Quick directory sharing |
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:
elide share ./dist --timeout 30mThe 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:
elide share ./site/build --method tailscaleTailscale Funnel gives you a public https:// 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:
elide share ./mockups --devWith --dev, the browser reloads automatically as the designer updates files.
CI artifact inspection
Pipe structured logs to stdout for scripting or CI integration:
elide share --json --no-qr ./artifactsEach request emits a JSON line:
{"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.
| Method | What it does |
|---|---|
auto | Tries Tailscale Funnel first, then ACME if —domain is provided, otherwise falls back to self-signed |
tailscale | Exposes via Tailscale Funnel. Requires tailscaled running. Instant DNS and TLS with zero config |
acme | Provisions a TLS certificate via ACME (Let's Encrypt). Requires a public domain pointing at this machine and —acme-email |
self-signed | Generates an ephemeral self-signed TLS certificate. Quick local testing when a trusted cert is not needed |
local | Plain HTTP on the local network, no TLS |
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>| Flag | Default | Description |
|---|---|---|
DIR | (required) | Directory to serve and expose |
—method | auto | Exposure method: auto, tailscale, acme, self-signed, or local |
—port | 443 | Public-facing listen port |
—domain | none | Custom domain name for ACME certificate provisioning |
—acme-email | none | Contact email for ACME account registration |
—dev | false | Enable dev mode with live reload on file changes |
—no-qr | false | Suppress QR code output in the connection banner |
—no-tui | false | Disable the TUI and use plain log output |
—json | false | Emit structured JSON lines to stdout for each request event |
—timeout | none | Auto-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