Metadata-Version: 2.4
Name: hugpy-fleet
Version: 0.2.17
Summary: Headless fleet control arm for Hugpy Core with a shared optional terminal
License-Expression: LicenseRef-Proprietary
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: hugpy-terminal<0.2,>=0.1.39.2
Requires-Dist: hugpy-resources<0.2,>=0.1.18.2

# hugpy-fleet

Hugpy Fleet is the terminal and headless client for Hugpy Core. It discovers a Core endpoint and uses it to inspect workers, browse models and operate worker-specific controls.

## Installation

Use Python 3.11 or later and a reachable Hugpy Core service.

```sh
python -m pip install hugpy-fleet
```

## Quick start

Inspect the selected endpoint. This reads local configuration and returns a JSON object containing the role and URL.

```sh
hugpy-fleet endpoint
```

Open Compute directly, or read the same worker and model data as JSON. Replace `NAME` with a worker name from `hugpy-fleet workers`. An explicit `--base` selects Core for one invocation.

```sh
hugpy-fleet compute --tui
hugpy-fleet compute --base http://127.0.0.1:7002
hugpy-fleet compute --worker NAME --query gguf
```

Compute reads the worker feed and serving catalog used by the web console. Connected workers appear as tabs. Saved connections include disconnected workers. Each model variation has its own identity, routing state and load state. Set `HUGPY_FLEET_API_KEY` when a remote Core requires a bearer key. [Web Compute panel](https://dev.hugpy.ai/console#compute)

![Worker GPU usage, memory and model placement in the web Compute panel](https://hugpy.ai/downloads/gallery/hugpy/hugpy-console.png)

## Worker controls

Use the full `model_key` returned by Compute, including the variation after `::`. The following commands inspect placement options, the worker’s storage configuration and its test-fire history.

```sh
hugpy-fleet compute options --worker NAME --model 'org/model::variation'
hugpy-fleet compute settings --worker NAME --component storage
hugpy-fleet compute test-history --worker NAME
```

`compute assign` gives a worker a routing allocation. `compute pin` protects that allocation. `compute load` and `compute unload` change residency on the worker. For example, `hugpy-fleet compute assign --worker NAME --model 'org/model::variation'` adds one allocation. Use `compute --help` for block, wildcard, static residency, context and test-fire operations. A context edit that returns `pending: true` is queued for the worker.

`hugpy-fleet tui` opens the terminal workspace. Enter `/compute` there to inspect GPUs, RAM, swap, CPU, storage, activity and models. `hugpy-fleet chat` opens chat, and `hugpy-fleet sessions` and `hugpy-fleet serve` use the shared named-session runtime. Fleet journals default to `.hugpy_fleet/chat`.

## Python client

```python
from hugpy_fleet import Fleet

fleet = Fleet()
print(fleet.workers())
```

For direct control of one Wrapper, use `hugpy-harness`.
