Skip to main content

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.

Open by design

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]
ArgumentDescription
[worktree]Worktree name (defaults to the current worktree).
FlagDescription
--offTurn 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.
--jsonOutput as JSON ({ deploymentId, hosts, urls }).

Requires an active deployment — run gws up (while logged in) first, then gws share.

Behaviour

  1. Asks the API to share — it picks the HTTP services, writes DNS + a certificate, and mints (or reuses) a tunnel token.
  2. Writes a public route per host so the local gws-router can resolve it.
  3. 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 sharing
  • gws up — deploy before sharing