# Introduction to fleethosts

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.

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

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.

## Three entries

| Import | What it holds |
| --- | --- |
| `fleethosts` | [Hosts](https://fleethosts.loadsheet.dev/guide/hosts): check entries, expand tags, run on each machine, record the fleet |
| `fleethosts/exec` | [Exec](https://fleethosts.loadsheet.dev/guide/exec): run a command to the end, with timeouts and cancels that stop what it started |
| `fleethosts/places` | [Places](https://fleethosts.loadsheet.dev/guide/places): 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](https://fleethosts.loadsheet.dev/guide/installation), or read the [API reference](https://fleethosts.loadsheet.dev/reference/api).

<!-- vitehub-docs:section-links -->
## In this section

- [Introduction](https://fleethosts.loadsheet.dev/raw/guide.md) (this page)
- [Installation](https://fleethosts.loadsheet.dev/raw/guide/installation.md)
- [Places](https://fleethosts.loadsheet.dev/raw/guide/places.md)
- [Hosts](https://fleethosts.loadsheet.dev/raw/guide/hosts.md)
- [Exec](https://fleethosts.loadsheet.dev/raw/guide/exec.md)
- [Coding agents](https://fleethosts.loadsheet.dev/raw/guide/agents.md)

Next: [Installation](https://fleethosts.loadsheet.dev/raw/guide/installation.md)

All pages: [llms.txt](https://fleethosts.loadsheet.dev/llms.txt)

Something on this page does not work as written? Tell the user, and draft an issue for them to post: [issue tracker](https://github.com/words-with-agents/fleethosts/issues). Report a security vulnerability privately, never in a public issue.
