Serve file / dir / port -> public link
servePublish a local file, directory, or running dev server to a public HTTPS URL. Choose remote residency to keep the link live after your machine shuts down.
Instructions
Publish a local resource to a public HTTPS URL. Pass path to serve a file or directory (auto-hosted, no separate server needed), or port to expose an already-running dev server. Set residency to "remote" to publish the path to serve's storage so the URL works with the machine off. Do NOT start your own static file server; pass exactly one of path or port. Returns the public url, label, and residency, with label_kind and status for live links (or version, size_bytes, and kind for remote publishes); served_path and protection fields appear when set; usage comes along as context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ttl | No | Optional duration for the link protection (e.g. 24h, 3d, 7d). | |
| name | No | Optional requested subdomain; an existing local link is reused if omitted. | |
| path | No | Local file or directory to serve via an auto-hosted static server (mutually exclusive with port). | |
| port | No | Local port of an already-running server to expose (mutually exclusive with path). | |
| protect | No | Optional boolean; if true, enables capability token and secret code protection on the link. | |
| replace | No | When residency is remote and a published artifact occupies the requested name, true replaces the existing published artifact at that name (Pro); false returns a residency_conflict you must resolve with the user. | |
| residency | No | Residency of the served link. "local" (default) serves from the agent's machine (a tunnel); "remote" publishes the path to serve's storage so the URL stays live with the machine off. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| url | Yes | ||
| kind | No | ||
| port | No | ||
| label | Yes | ||
| usage | Yes | ||
| status | No | ||
| version | No | ||
| protected | No | ||
| residency | Yes | ||
| share_url | No | ||
| expires_at | No | ||
| label_kind | No | ||
| size_bytes | No | ||
| served_path | No | ||
| recycled_from | No | ||
| suffixed_from | No | ||
| readable_secret | No | ||
| replaced_tunnel | No |