Skip to content

Repository files navigation

tailnet

TypeScript clients for Tailscale, Headscale, the daemon on this machine, and tailcat.

Documentation · API reference

Package Version What it is
@tailnet/headscale npm Headscale control plane client
@tailnet/tailscale npm Tailscale control plane client
@tailnet/tailscaled npm LocalAPI client for the tailscaled daemon on this machine
@tailnet/tailcat npm Client for the tailcat CLI, tunnels with no control plane
@tailnet/core npm The shared contract behind the first two
import { Headscale } from "@tailnet/headscale"

const control = new Headscale({ url, apiKey })

await control.nodes.fetch()
await control.nodes.setTags(id, ["tag:server"])
import { Tailscale } from "@tailnet/tailscale"

const control = new Tailscale({ apiKey })
import { Tailscaled } from "@tailnet/tailscaled"

const daemon = new Tailscaled()

await daemon.status()

Headscale and Tailscale extend one Tailnet class, so code written against it runs on either. Every method that changes something carries a risk line in its TSDoc, write or breaking, shown on hover. No line means it only reads.

apps/panescale is an admin dashboard built on the same packages, for either control plane.

Develop

nix develop
tailnet up
bun run dev

License

MIT

About

Tailscale, tailscaled, Tailnet, Tailcat and Headscale TypeScript Client and Universal Dashboard

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages