# Tailshare

> Publish static files (HTML pages, reports, demos, build output) to the tailnet with the `tailshare` CLI. Use when the user says "tailshare this", "host this on the tailnet", "put this on cachy", "share this page", "publish this html", or wants a shareable https URL for a local directory. Also covers listing and removing existing shares. Not for GitHub gists (use /gist) or Claude Artifacts.

- Skill: `kellymears/tailshare` (Agent Skill)
- Install (CLI): `npx skillmds@latest add kellymears/tailshare`
- Raw SKILL.md: https://api.skillmd.com/api/skills/kellymears/tailshare/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: kellymears (https://skillmd.com/u/kellymears)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/kellymears/tailshare

---


# tailshare

`tailshare` is a home-brewed CLI that serves directories over HTTPS on the Tailscale
node's hostname. Shares live under `share/` and get a URL like
`https://cachy.tail46c968.ts.net/share/<name>/`.

## Quick reference

```bash
tailshare list                                  # what is published, sizes, URLs
tailshare publish --src <dir> --dist share/<path>   # publish (prints the URL)
tailshare rm share/<path>                       # unpublish
tailshare where                                 # config + data paths
tailshare funnel status                         # is it also on the public internet?
```

## Publishing

1. **`--src` is a directory, never a file.** To share a single page, put it in its own
   directory as `index.html` first (a scratch dir is fine — tailshare copies the
   contents, it does not symlink).
2. **`--dist` must start with `share/`.** Anything else is rejected with
   "destination must be below share/". Use two levels — `share/<project>/<page>` —
   so related pages group in `tailshare list` (existing convention:
   `share/cake/cost-scaling-estimate`, `share/cachy/keys`).
3. The command prints the final URL. Relay it to the user verbatim.
4. Republishing to the same `--dist` replaces the contents in place; the URL is stable.

```bash
mkdir -p /tmp/keys && cp cheatsheet.html /tmp/keys/index.html
tailshare publish --src /tmp/keys --dist share/cachy/keys
```

## HTML that will be served raw

Unlike the Artifact tool, tailshare does no wrapping. A page needs its own
`<!doctype html>`, `<html>`, `<head>` (charset, viewport, `<title>`), and `<body>`.
When converting an Artifact-style fragment, wrap it before publishing. Keep assets
self-contained (inline CSS/JS, data-URI images) or place them in the same `--src`
directory with relative paths.

## Removing

`tailshare rm share/<path>` is immediate and irreversible. Confirm with the user
before removing a share you did not create in the current session.

## Visibility

Shares are reachable by anyone on the tailnet. If `tailshare funnel status` reports
the Funnel is running, they are reachable by **anyone on the internet** at the same
URL — say so before publishing anything sensitive, and never publish secrets, tokens,
or private customer data.

## Service plumbing (rarely needed)

- `tailshare stack` — control the container stack behind the server
- `tailshare service` — manage the user systemd units
- `tailshare api` — loopback metadata endpoint used by the share widget
- `tailshare init` — first-time config; already done on cachy

If `publish` fails with a connection error, check `tailshare service` / `stack`
status before retrying.

