# elelem-hub

> Signs in to an elelem hub with /login and sends your prompts through it to the models on your own nodes.

Maturity: alpha. Install: `gem install elelem-hub`. Source: https://github.com/elelem-sh/hub/


Sends your prompts through an elelem hub to the models on your own nodes.
The hub speaks the OpenAI chat API, so this plugin builds on
[elelem-openai](https://elelem.sh/plugins/openai/).

## Install

```bash
gem install elelem-hub
mkdir -p ~/.agents/plugins
echo 'require "elelem/hub"' > ~/.agents/plugins/hub.rb
```

[`elelem-shell`](https://elelem.sh/plugins/shell/) installs and loads it.

## Use

```bash
elelem
/login
```

`/login` prints a link and a code. Open the link, confirm the code, and the
session switches to the hub, using the first model on your nodes.
`/provider hub MODEL` picks another. `elelem -p hub` starts on the hub.
`/logout` signs out and revokes the sign-in.

The sign-in is saved to `~/.config/elelem/hub.json`, readable by you alone.
Signing in accepts the [terms](https://elelem.sh/terms/) and the [privacy policy](https://elelem.sh/privacy/).

## Limits

- It picks the first model on your nodes; `/login` names the others.
- One hub at a time, set by `ELELEM_HUB_URL`.


## Environment

| Variable | Default | Description |
|---|---|---|
| `ELELEM_HUB_URL` | `https://hub.elelem.sh` | Hub to sign in to. https, or http on loopback. |

Canonical: https://elelem.sh/plugins/hub/

