Metadata-Version: 2.5
Name: frutebox-node
Version: 0.1.0
Summary: The Frutebox node runtime — share your hardware with the Frutebox network.
Project-URL: Homepage, https://frutebox.com
Project-URL: Documentation, https://frutebox.com/docs
Author: Frutebox
License: MIT
Keywords: distributed,frutebox,gpu,inference,node
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: cryptography>=42.0
Requires-Dist: dilithium-py==1.4.0
Requires-Dist: httpx>=0.27
Requires-Dist: pyyaml>=6.0
Requires-Dist: websockets>=12.0
Provides-Extra: cloud
Requires-Dist: runpod>=1.12.0; extra == 'cloud'
Provides-Extra: media
Requires-Dist: diffusers>=0.30; extra == 'media'
Requires-Dist: numpy>=1.24; extra == 'media'
Requires-Dist: pillow>=10.0; extra == 'media'
Requires-Dist: torch>=2.0; extra == 'media'
Provides-Extra: speech
Requires-Dist: chatterbox-tts; extra == 'speech'
Requires-Dist: kokoro; extra == 'speech'
Description-Content-Type: text/markdown

# frutebox-node

The Frutebox **node runtime**: share your hardware with the Frutebox network and get paid for the
work it does.

```bash
pip install "frutebox[node]"        # the SDK plus this runtime
pip install frutebox-node           # just the runtime
```

Then, from the SDK's CLI:

```bash
pbpaste | frutebox login
frutebox share --join               # register this machine and start the node agent
frutebox share --status             # state and earnings
frutebox share --limits             # when this machine will and will not take work
frutebox share --leave              # stop taking work
```

Or run the agent directly:

```bash
python -m frutebox.provider --region eu-west --credential-file ~/.config/frutebox/node-credential
```

Pass the credential **by file, never `--credential`**: `ps` shows argv to every user on the machine,
and a non-zero exit serialises the whole command line into the exception.

## What it installs, and what it does not

This distribution ships 28 modules into the `frutebox` package — the transitive import closure of
`provider.py`, out of the backend package's 100. It is the serving node, not the gateway.

The install is **small on purpose**. Of the twelve third-party packages the runtime mentions, only
four are imported at module level (`cryptography`, `dilithium-py`, `httpx`, `websockets`, plus
`pyyaml` for the registry). Everything heavy is imported inside the function that needs it, so a
node that serves chat never downloads a deep-learning stack:

| extra | pulls in | needed for |
|---|---|---|
| *(none)* | the five above | chat inference, the gateway socket, attestation, earnings |
| `[media]` | torch, diffusers, numpy, pillow | serving image and video jobs |
| `[speech]` | chatterbox-tts, kokoro | serving speech jobs |
| `[cloud]` | runpod | renting capacity rather than offering your own machine |

```bash
pip install "frutebox-node[media]"
```

## It shares the `frutebox` package with the SDK

Both distributions install into `frutebox/`, with disjoint filenames — the SDK owns `__init__.py`,
`_client.py`, `_errors.py`, `_spec.py` and `cli.py`; this one owns `provider.py`, `config.py` and
the rest. That is deliberate: two modules in the runtime use absolute self-imports
(`from frutebox.envvars import …`), so publishing them under a different package name would break
them.

One consequence worth knowing: `pip uninstall frutebox` removes the SDK's files including
`__init__.py`, leaving this runtime in place as a namespace package. `frutebox.provider` still
imports; `frutebox.Frutebox` does not. Reinstall the SDK, or uninstall both.

## The source is not duplicated

There is one copy of the node runtime in the repository. `pyproject.toml` here is a **manifest** over
`../frutebox/`, read directly at build time — not a fork of it. A test recomputes the import closure
from the source and fails if the manifest has drifted, so the two cannot diverge quietly.
