GitHub 0
Skip to content

Introduction to fleethosts

fleethosts reaches machines over ssh and Tailscale from Node, with no runtime dependencies.

fleethosts runs one command on many machines from a Node program. You list the machines as fleet entries, and fleethosts turns them into ssh targets, runs the command on each at once, and returns what every machine gave back.

const entries = ["vps", "me@100.64.0.7", "ssh://deploy@build.example.com:2222", "tag:servers"];
ts

A fleet entry is a host, user@host, an IP address, an ssh_config alias, an ssh:// URL, or a Tailscale tag:. A tag stands for every machine on your tailnet with that tag.

fleethosts has no runtime dependencies. It runs ssh, tailscale, sh and node from the machine, so your ~/.ssh/config applies as it does in a shell.

ImportWhat it holds
fleethostsHosts: check entries, expand tags, run on each machine, record the fleet
fleethosts/execExec: run a command to the end, with timeouts and cancels that stop what it started
fleethosts/placesPlaces: your program's folders and the names it writes under

Every function that reads or writes your program's files takes a Places. fleethosts names no program of its own: the files it writes and the environment variables it reads all take your program's name.

Start with Installation, or read the API reference.