Features
Foreground CLI sharing, QR codes, access control, paused/offline guidance, and AI agent integration are built around the way local previews actually behave. Use --port for a single app, or a .sharnix.yaml manifest when your preview spans multiple ports.
A stable public URL for your local app.
The tunnel ID is derived from your working directory, so the same project can keep the same URL. The URL is live while your local app and foreground Sharnix agent are running; when either stops, visitors see a helpful paused/offline state instead of a raw connection error.
npx @sharnix/agent --port 3000Foreground CLI is ready on macOS, Windows, and Linux.
The supported path today is the foreground CLI across macOS, Windows, and Linux. Windows service/background mode is in beta. macOS and Linux background services are not fully shipped yet, so the UI and docs guide users toward the CLI path.
npx @sharnix/agent --port 3000 --shareScoped, revocable URLs with per-link settings.
Each share link is independent — different permissions, different expiry, different restrictions. You can have ten links for the same tunnel: one for the client (read-only, 48h), one for QA (full access), one for the CEO (one-time view). Revoking one doesn't affect the others.
create_share_link(tunnel_id, "read-only", expires_in_hours=48)Read-only, full access, or completely blocked.
Read-only rewrites response HTML to disable all forms and write operations — viewers browse but can't interact. Full gives complete interactive access. Blocked returns 403 immediately, useful for temporarily suspending a link without revoking it.
Links that self-destruct on schedule or after one view.
Set an exact expiry date/time — the link 410s automatically when it expires. Or use one-time view mode: the link works exactly once, then burns. Perfect for sending a preview to someone you only want to access it once.
create_share_link(tunnel_id, "read-only", one_time_view=true)Gate access to specific emails or domains — no login needed.
Restrict a link to alice@acme.com, or to everyone at @acme.com. Visitors enter their email address and receive a one-time code. They don't need a Sharnix account — just access to their inbox. Available on all plans.
create_share_link(tunnel_id, "full", allowed_emails=["@acme.com"])Force visitors to authenticate with their Sharnix account.
Stronger than email restrictions — viewers must log in with a Sharnix account. You can combine this with allowed_emails to restrict to specific accounts. Use when you need a verifiable identity, not just email access.
create_share_link(tunnel_id, "read-only", require_auth=true)Lock links to specific IP ranges or countries.
Specify CIDR ranges (203.0.113.0/24) or country codes (US, GB, DE). Visitors outside the allowlist get a 403 with no details — they can't even see the "Preview paused" page. Combine with email restrictions for layered access control.
Know exactly who saw your work and when.
Per-link analytics: total visits, unique visitors, average session duration, hourly time-series, top countries, and top referrers. Pro and Team plans also track downtime visits — requests that came in while the link was paused — so you see demand even when the preview was offline.
Links explain what happened when you go offline.
When your agent disconnects (Ctrl+C, crash, machine sleeps), active links pause within seconds. Visitors see a branded "Preview paused" or offline page, and they can notify the owner from that page. When you reconnect, links can be reactivated with one click or one MCP tool call. Pro/Team sends an email when the agent disconnects.
Your agent manages tunnels without you touching the dashboard.
The MCP server gives your AI agent (Claude, Cursor, Windsurf, etc.) control to create links, check tunnel status, read analytics, and reactivate suspended links. First setup usually takes 10 seconds to 1 minute while skills and auth are installed. After that, future shares are usually ready in seconds.
"Share my app with the client, read-only, expires in 48 hours"--port for simple apps, .sharnix.yaml for multi-port apps.
Most local apps can be shared with a single --port value. If your preview needs multiple local services, add a .sharnix.yaml manifest so the agent knows which ports and routes belong together.
npx @sharnix/agent --port 3000 --shareMap your own domain to a tunnel.
Point previews.acme.com at a tunnel with a CNAME record. Visitors see your domain, not relay.sharnix.com. TLS is provisioned automatically. All share link features — permissions, auth, analytics — work the same on custom domains.
Every access event logged with full context.
Every request to every link is logged: visitor email (if authenticated), IP address, country, timestamp, and result (allowed, denied, or blocked). The log is append-only and cannot be edited or deleted. Pro plan retains 30 days; Team retains 1 year.
Tunnels, share links, permissions, email restrictions, expiry, one-time view, paused/offline pages, owner notifications, and MCP access are all available to start. Pro adds analytics and auth-gating. Team adds IP restrictions, geo allowlists, custom domains, and team roles.