Docs Packages
@procedures/tailscale
The tailscale CLI as one procedure. It starts tailscale with argv, never through a shell.
Install#
pnpm add @procedures/tailscale @procedures/client
A host registers the procedures with createRegistry(tailscaleModule), or with import "@procedures/tailscale/register" for the global registry. The package root and ./module register nothing.
Procedures#
| Procedure | Effects | What it does |
|---|---|---|
tailscale.run | reads network, writes network and process, destructive | Runs a tailscale command (status, ip, serve, up, down). It gives the login address when tailscale prints one. |
Example#
const { json } = await client.exec(["tailscale", "run"], { path: ["status"], json: true });
The program#
The program comes from the host, never from the input. The procedure uses the executable option of createTailscaleModule(), then TAILSCALE_EXE, then the Windows install folder, then tailscale on the PATH. The Windows installer does not put tailscale on the PATH.
const registry = createRegistry(createTailscaleModule({ executable: "/opt/tailscale/bin/tailscale" }));
An input with executable gets a validation error. Before this change, the input executable let the caller start any program.