gws share
Make the current deployment's HTTP services publicly reachable through the GetWebstack relay, so you can hand a teammate (or show off an agent's overnight work) a live preview URL. Run gws share --off to revoke it.
This is project-wide and HTTP-only: the API decides which services are shareable (enabled + has a port), returns their public hostnames + a tunnel token, and the CLI writes a public route per host, opens the tunnel, and persists the share state.
A shared URL is reachable by anyone with the link — no token, no login. gws share --off is the revocation. Don't share a deployment holding sensitive data.
Usage
gws share [worktree] [options]
| Argument | Description |
|---|---|
[worktree] | Worktree name (defaults to the current worktree). |
| Flag | Description |
|---|---|
--off | Turn the public share off (un-share all services). |
-p, --project <name> | Project name (auto-detected from the current directory by default). |
-e, --env <environment> | Environment name. |
--json | Output as JSON ({ deploymentId, hosts, urls }). |
Requires an active deployment — run gws up (while logged in) first, then gws share.
Behaviour
- Asks the API to share — it picks the HTTP services, writes DNS + a certificate, and mints (or reuses) a tunnel token.
- Writes a public route per host so the local
gws-routercan resolve it. - Opens the relay tunnel and persists the share state.
The printed URLs include a ?namespace=<deploymentId> query so teammates hit your specific deployment.
Examples
# Share the current deployment publicly
gws share
# Share a specific worktree
gws share feature-payments
# Stop sharing (revoke all public URLs)
gws share --off
# Machine-readable output
gws share --json
See also
gws expose— forward a single port to your local machine (private, not public)gws status— check tunnel health after sharinggws up— deploy before sharing