> For the complete documentation index, see [llms.txt](https://fleet.hackmap.win/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fleet.hackmap.win/reference/cli.md).

# CLI

Installed as `fleet` by `fleet-core`. Three subcommands.

## `fleet master`

Starts the master process. Binds to `0.0.0.0:8000` by default.

```
fleet master [--host HOST] [--port PORT] [--redis-url URL]
```

Options:

`--host` — bind address. Default `0.0.0.0`. Use `127.0.0.1` if you're putting a reverse proxy in front.

`--port` — bind port. Default `8000`.

`--redis-url` — Redis connection URL. Default from `$REDIS_URL` or `redis://localhost:6379/0`.

Environment:

`REDIS_URL`, `FLEET_ADMIN_TOKEN`, `FLEET_WORKER_TOKEN`, `LOG_LEVEL`.

The master prints loaded automation types on startup. If a plugin is installed but doesn't appear, check the entry-point in its `pyproject.toml`.

## `fleet worker`

Starts a worker pinned to one automation type.

```
fleet worker --type TYPE [--id ID] [--master-url URL] [--worker-token TOKEN] [--redis-url URL]
```

Options:

`--type` — automation type name. Required. Must match a plugin's entry-point name.

`--id` — worker ID. Defaults to the host's `hostname`. Must be unique across the fleet for this type.

`--master-url` — master URL. Default from `$MASTER_URL`.

`--worker-token` — auth token. Default from `$FLEET_WORKER_TOKEN`.

`--redis-url` — Redis URL, passed through to `Context._r` for stream and event-bus operations. Default from `$REDIS_URL`. Note: workers connect to Redis directly only for `ctx.stream(...)` and `ctx.events` calls inside slot code. The control plane (config, state, output) all goes through the master.

The worker logs `agent up` and `ws connected` on startup. If neither appears, the WS connection is being rejected (check the token) or the master is unreachable.

## `fleet info`

Lists installed automations. No master or Redis needed.

```
fleet info
```

Output:

```
url-pinger                     url_pinger.UrlPinger    (ContinuousAutomation)
hello-world                    hello_world.HelloWorld  (ContinuousAutomation)
echo-consumer                  echo_consumer.EchoConsumer (ContinuousAutomation)
```

Useful for confirming a plugin install actually registered its entry-point. If a plugin is installed (`pip show <name>` returns it) but doesn't show in `fleet info`, the entry-point line in `pyproject.toml` is wrong.

## Exit codes

The master and worker exit on SIGINT or SIGTERM with code 0 after a graceful shutdown. Unexpected exits return non-zero; the exact code depends on the cause (usually a Python traceback to stderr).

There's no `fleet stop`, `fleet restart`, or `fleet status`. Those are deployment concerns — use `systemctl`, `docker compose`, or whatever orchestrator you're using.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://fleet.hackmap.win/reference/cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
