# Installation

```sh pm
pnpm add fleethosts
```

Requires Node 22.20 or later, and `ssh` on `PATH`. Tags also need the Tailscale CLI.

## First run

### Name your program

```ts
import { standardPlaces } from "fleethosts";

const places = standardPlaces("mytool");
```

### Check the entries

```ts
import { fleetEntryProblem } from "fleethosts";

const entries = ["vps", "tag:servers"];
const problems = entries.map(fleetEntryProblem).filter(Boolean);
```

### Run a command

```ts
import { resolveHosts, runOnHosts } from "fleethosts";

const runs = await runOnHosts(places, async (remoteCommand) =>
  (await resolveHosts(places, entries, { remoteCommand })).targets,
  ["uname", "-a"],
);
```

ssh runs in batch mode, so a host that asks for a password is unreachable. Load your key into an agent first.

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

- [Introduction](https://fleethosts.loadsheet.dev/raw/guide.md)
- [Installation](https://fleethosts.loadsheet.dev/raw/guide/installation.md) (this page)
- [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: [Places](https://fleethosts.loadsheet.dev/raw/guide/places.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.
