Metadata-Version: 2.4
Name: pipelabs-bridge
Version: 0.1.0
Summary: Pipelabs bridge — connects your local ComfyUI server to Pipelabs.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31
Requires-Dist: pillow>=10.0

# pipelabs-bridge

The Pipelabs bridge runs on your ComfyUI server. It connects **outbound** to
Pipelabs (no inbound ports needed, so it works behind Vast.ai's NAT), polls for
jobs, talks to your local ComfyUI API, and reports status back.

## Install & run

```bash
pip install pipelabs-bridge
pipelabs-bridge --token <YOUR_TOKEN> --app-url https://your-pipelabs-app
```

Options (all can also be set via environment variables):

| Flag          | Env var             | Default                 |
| ------------- | ------------------- | ----------------------- |
| `--token`     | `PIPELABS_TOKEN`    | (required)              |
| `--app-url`   | `PIPELABS_APP_URL`  | `http://localhost:3000` |
| `--comfy-url` | `COMFY_URL`         | `http://127.0.0.1:8188` |
| `--interval`  | —                   | `3.0` (seconds)         |
| `--max-interval` | —                | `20.0` (seconds, capped at 25) |

Keep it running in `tmux` or `screen` so your server stays "online" in the app.

The bridge polls every `--interval` seconds, then slows to `--max-interval` after
2 minutes with no jobs, so a new job can take up to that long to start when idle.

Handles every Pipelabs job: health checks, images, reference boards, clips and
stitching.
