# Quickstart

> Install the CLI, pair a GPU, load a model, and make your first API call.

Go from nothing to your own OpenAI-compatible inference endpoint, running on a GPU
you control. Five steps:

1. Create an account
2. Install the `weave` CLI and sign in
3. Pair a GPU node
4. Load a model
5. Make your first API call

You bring the GPU (a cloud instance or your own hardware); OpenInfer's hub routes
requests to it. There is no separate "host" vs "worker" — every node is symmetric.

## Set up with an AI agent

Let a coding agent (Claude Code, Codex, Cursor) do the steps below for you. Paste this
prompt into it:

```text
Set up Loom for me: https://platform.openinfer.io/agent-setup.md
```

The agent fetches [`/agent-setup.md`](/agent-setup.md), a step-by-step setup prompt
written for agents, and follows it from installing the CLI to making the first API
call. It stops once, for the browser sign-in. The rest of this page covers the same
steps by hand.

> **Just want a hosted API and no GPU?** Skip steps 3–4: create an account, mint a
> `pk_…` key (step 5), and call any model already served by the shared `@oi/…`
> catalog. Steps 3–4 are only for serving models on your own hardware.

## 1. Create an account

Sign up at [https://platform.openinfer.io](https://platform.openinfer.io) with Google or an
email address. This creates your user and your organization. OpenInfer is in invite-only
beta: accept the invitation you were sent to get in. Without one you land on a
"Coming Soon" page.

An **organization** owns your nodes, models, and API keys. You can belong to more
than one; CLI commands act on one organization at a time.

## 2. Install the `weave` CLI and sign in

`weave` is a single public binary. Install it on your workstation — no token,
Docker, or GPU drivers required:

```bash
curl -fsSL https://platform.openinfer.io/install.sh | sh
```

Windows (PowerShell):

```powershell
irm https://platform.openinfer.io/install.ps1 | iex
```

The default install lays down **only the CLI**. The inference runtime (`oi-runtime`)
is installed later, on the GPU box, when you pair it.

Sign in with the browser device flow:

```bash
weave auth login          # prints a URL; approve it in your browser
weave whoami              # confirm the signed-in organization
```

If you belong to multiple organizations:

```bash
weave orgs ls
weave orgs use <organization-id>
```

## 3. Pair a GPU node

You need a machine with a GPU (for example an AWS `g6e`/`g7e` instance, or your own
box). This guide assumes it exists and you can run commands on it. The node must be
**Linux x86_64 with glibc ≥ 2.34** (Ubuntu 22.04-class or newer) and, for a GPU, an NVIDIA
driver ≥ 580 (the runtime is built against CUDA 13). CPU-only works for
small models (see the note in step 4). The workstation you run `weave` from has no
such constraint.

> **Running nodes in Docker or Kubernetes?** The same steps work inside a container.
> See [Deploying with containers](/docs/containers) for a ready-made image and manifests.

**a. Mint a pairing token** on your workstation (you're logged in, so no dashboard
trip):

```bash
weave pairing-tokens mint --label first-node
```

Copy the `weave_pt_…` value. It is shown only once. Owners and admins can also mint one
in Studio under Organization settings → General → **Pairing tokens**.

**b. On the GPU machine**, install the public CLI, pull the runtime with it, then
bring the node online:

```bash
curl -fsSL https://platform.openinfer.io/install.sh | sh   # public CLI only
weave pair <weave_pt_…>        # store the organization's pairing token
weave runtime install          # pull oi-runtime with that token (auto-detects cpu/cuda)
weave up                       # launch the runtime, connect to the hub, and serve
```

`weave up` launches and supervises the local `oi-runtime` inference runtime, connects the box
to the hub, and serves — reconnecting forever and restarting the runtime if it exits,
safe to re-run. A bare `weave up` is a complete serving node. For a boot-persistent
service (systemd / Scheduled Task), add `--service` at install time; there the runtime
runs as its own unit and the agent runs `weave up --no-managed-engine`. On Linux,
`WEAVE_DATA_DIR` moves the runtime's model cache and session store onto another disk, and
`WEAVE_SERVICE_AFTER` names the unit that mounts it; `curl -fsSL https://platform.openinfer.io/install.sh | sh -s -- --help`
lists every option.

**c. Back on your workstation**, wait for it to show up:

```bash
weave nodes               # your node should appear as connected
```

Note the node's id from this list.

## 4. Load a model

List the models your organization can serve:

```bash
weave models
```

If it's empty, your organization has no catalog yet. Import a model from the platform catalog,
picking one that fits your node (owner or admin only):

```bash
weave models available --fits <node-id>
weave models import @oi/Llama-3.2-1B-Instruct
```

If the model you need isn't listed, ask us to publish it.

Assign one to your node at high priority and wait for it to load (the hub requires at
least one high-priority model per node):

```bash
weave push <node-id> --high @oi/Llama-3.2-1B-Instruct --wait
```

Confirm it's loaded and routable:

```bash
weave route @oi/Llama-3.2-1B-Instruct    # lists the nodes now serving it
```

> **CPU-only node?** Not every model runs on CPU — it needs a CPU-executable quant.
> If `weave node <id>` shows the model with `loadState: error` (the runtime reports a
> failed validating warmup forward), it can't execute on CPU; use a GPU node or a
> CPU-built quant. On a GPU node any published `@oi/…` model works.

## 5. Make your first API call

Inference uses an **organization API key** (`pk_…`), separate from your CLI login. Mint one
with the CLI:

```bash
weave keys mint
```

It is printed once. You can also mint keys in Studio under Organization settings →
**API Keys**.

The endpoint is OpenAI-compatible — point any OpenAI SDK at
`https://platform.openinfer.io/v1`:

```bash
curl https://platform.openinfer.io/v1/chat/completions \
  -H "Authorization: Bearer pk_…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "@oi/Llama-3.2-1B-Instruct",
    "messages": [{"role": "user", "content": "Say hello in five words."}]
  }'
```

Python (OpenAI SDK):

```python
from openai import OpenAI

client = OpenAI(
    base_url="https://platform.openinfer.io/v1",
    api_key="pk_…",
)
resp = client.chat.completions.create(
    model="@oi/Llama-3.2-1B-Instruct",
    messages=[{"role": "user", "content": "Say hello in five words."}],
)
print(resp.choices[0].message.content)
```

A `200` with a completion means the full path works. A `503
weave_upstream_unavailable` means no node currently has that model loaded and ready —
re-check step 4 (`weave route <model>`).

## Where to next

- **[Deploying with containers](/docs/containers)**: run nodes with Docker, Docker
  Compose, or Kubernetes instead of a hand-configured box.
- The full **[Command reference](/docs/commands)**, covering every `weave` command and flag.
- Manage nodes on the fly: `weave nodes`, `weave logs <id> -f`, `weave restart <id>`,
  `weave upgrade <id>`.
- Full command list at any time: `weave help`.

---

# Deploying with containers

> Run weave nodes with Docker, Docker Compose, Kubernetes, or any container platform.

A weave node is two processes: the `weave` agent and the `oi-runtime` inference runtime it launches
and supervises. `weave up` runs both, so a node fits in **one container** with
`weave up` as its entrypoint. This page builds that image, then runs it with Docker,
Docker Compose, and Kubernetes. The same image works on any platform that runs OCI
containers with GPU access, such as ECS, Nomad, or Cloud Run with GPUs.

## What a node container needs

| Requirement | Why |
| --- | --- |
| **Linux x86_64, glibc ≥ 2.34** | `oi-runtime` needs glibc 2.34 and libstdc++ from GCC 12 or newer, so use Ubuntu 22.04 or newer. Alpine (musl) will not run it. |
| **GPU passed through** | NVIDIA Container Toolkit on the host, and an NVIDIA driver ≥ 580 (the runtime is built against CUDA 13). The image supplies the CUDA userspace libraries. |
| **A pairing token** | `WEAVE_PAIR_TOKEN=weave_pt_…`, from a secret. Used on first start to pair. |
| **A persistent volume at `/root/.weave`** | Holds the node's identity, the runtime's workflow, and the model weight cache. One volume per node. |
| **Outbound network only** | HTTPS to `https://platform.openinfer.io` and gRPC to the hub at `https://platform.openinfer.io:8443`. The node dials out, so it needs no inbound ports, `Service`, or load balancer. |

**Why the volume matters.** On first start, `weave up` pairs with `WEAVE_PAIR_TOKEN`
and the hub issues a node id, which is saved to `/root/.weave/runner.toml`. On later
starts it reuses that identity and its cached weights. Without the volume, every new
container pairs as a *new* node and downloads every model again. The volume holds a
credential, so treat it as a secret.

## Build the image

The `weave` CLI is a public download. `oi-runtime` is gated by a pairing
token, so pass the token to the build as a
[BuildKit secret](https://docs.docker.com/build/building/secrets/). A secret is
available during the `RUN` step but is never written to an image layer.

```dockerfile
# syntax=docker/dockerfile:1
FROM nvidia/cuda:13.0.0-runtime-ubuntu24.04

# The control plane this node pairs with and downloads the runtime from.
ENV WEAVE_ENDPOINT=https://platform.openinfer.io

# libgomp1: the CPU build of oi-runtime (--accel cpu) links GNU OpenMP.
RUN apt-get update \
    && apt-get install -y --no-install-recommends curl ca-certificates libgomp1 \
    && rm -rf /var/lib/apt/lists/*

# Public CLI. As root it installs to /usr/local/lib/weave/bin.
RUN curl -fsSL https://platform.openinfer.io/install.sh | sh

# Gated runtime. --accel cuda because the build has no GPU to detect.
RUN --mount=type=secret,id=weave_token \
    WEAVE_TOKEN="$(cat /run/secrets/weave_token)" \
    /usr/local/lib/weave/bin/weave runtime install --accel cuda

ENTRYPOINT ["/usr/local/lib/weave/bin/weave"]
CMD ["up"]
```

```bash
WEAVE_TOKEN=weave_pt_… docker build \
  --secret id=weave_token,env=WEAVE_TOKEN \
  -t registry.example.com/weave-node:latest .
docker push registry.example.com/weave-node:latest
```

Replace `registry.example.com` here and below with your own registry. The image
contains the gated runtime, so the registry must be **private**.

For a CPU-only node, build with `--accel cpu` and leave out the GPU request in the
examples below. CPU nodes suit small models only (see
[Quickstart step 4](/docs/quickstart#4-load-a-model)).

## Docker

```bash
docker run -d --name weave-node \
  --gpus all \
  --restart unless-stopped \
  --stop-timeout 30 \
  -e WEAVE_PAIR_TOKEN=weave_pt_… \
  -e WEAVE_NODE_NAME=gpu-box-1 \
  -v weave-state:/root/.weave \
  registry.example.com/weave-node:latest
```

On `SIGTERM`, `weave` stops taking new requests, lets in-flight requests finish for
up to 10 seconds, then disconnects from the hub and stops the runtime.
`--stop-timeout 30` covers that. Docker's default of 10 seconds cuts the drain short.

Check it from your workstation:

```bash
weave nodes                    # the node appears as connected
```

### Logs in a container

The agent and the runtime both write to the container's stdout, so read them with
`docker logs weave-node` or `kubectl logs weave-node-0`. `weave logs <node-id>` tails
journald by default, and containers have no journald. The runtime's structured trace
buffer does work from anywhere, because it is read from the runtime itself:

```bash
weave logs <node-id> --component core --level warn
```

## Docker Compose

```yaml
services:
  weave-node:
    image: registry.example.com/weave-node:latest
    restart: unless-stopped
    stop_grace_period: 30s
    environment:
      WEAVE_PAIR_TOKEN: ${WEAVE_PAIR_TOKEN}
      WEAVE_NODE_NAME: gpu-box-1
    volumes:
      - weave-state:/root/.weave
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

volumes:
  weave-state:
```

```bash
WEAVE_PAIR_TOKEN=weave_pt_… docker compose up -d
```

## Kubernetes

Use a **StatefulSet**, not a Deployment. Each replica is its own weave node and needs
its own identity. `volumeClaimTemplates` gives every pod a dedicated volume that
survives restarts and rescheduling. A Deployment that shares one volume across
replicas would have several pods claiming the same node id.

The cluster needs NVIDIA GPU scheduling: the
[NVIDIA GPU Operator](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/index.html),
or the device plugin on nodes that already have drivers.

```yaml
apiVersion: v1
kind: Secret
metadata:
  name: weave-pairing
type: Opaque
stringData:
  WEAVE_PAIR_TOKEN: weave_pt_…
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: weave-node
spec:
  serviceName: weave-node
  replicas: 2
  selector:
    matchLabels:
      app: weave-node
  template:
    metadata:
      labels:
        app: weave-node
    spec:
      terminationGracePeriodSeconds: 30
      imagePullSecrets:
        - name: registry-credentials
      containers:
        - name: weave
          image: registry.example.com/weave-node:latest
          args: ["up"]
          env:
            - name: WEAVE_PAIR_TOKEN
              valueFrom:
                secretKeyRef:
                  name: weave-pairing
                  key: WEAVE_PAIR_TOKEN
            # Show each pod under its own name (weave-node-0, weave-node-1, …).
            - name: WEAVE_NODE_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          resources:
            limits:
              nvidia.com/gpu: 1
          volumeMounts:
            - name: weave-state
              mountPath: /root/.weave
  volumeClaimTemplates:
    - metadata:
        name: weave-state
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 200Gi
```

- **GPUs per pod.** A pod is one node, and the runtime serves on every GPU the pod is
  given. Request as many as that node should own: `nvidia.com/gpu: 8` for a whole
  8-GPU machine, `1` to split a machine into single-GPU nodes.
- **Volume size.** Model weights are cached on the volume. Size it for the largest
  set of models the node will serve, plus headroom.
- **Scaling.** Raising `replicas` pairs new nodes on their first start. Lowering it
  disconnects the highest-numbered pods and the hub stops routing to them. Their
  claims stay, so scaling back up restores the same node ids. Delete a claim to
  retire that identity for good.
- **Planned maintenance.** Drain first so in-flight work finishes before the pod
  stops: `weave node <node-id> --disable-routing`, then delete or reschedule the pod,
  then `--enable-routing` once it's back.

## Load models

A containerized node is managed like any other. Once it shows up in `weave nodes`,
assign models per node:

```bash
weave push <node-id> --high @oi/Llama-3.2-1B-Instruct --wait
```

Or plan the whole fleet at once:

```bash
weave fleet plan --model @oi/Qwen3.5-27B:40            # dry run
weave fleet plan --model @oi/Qwen3.5-27B:40 --apply    # push the layout
```

A pod that restarts reconnects with the same node id. If it comes back without its
models, re-push the organization's layout with `weave fleet reapply`.

## Upgrading

`weave upgrade <node-id>` swaps binaries inside the running container, and that change
is lost when the container is recreated. For containers, make the image the source of
truth instead: rebuild it (`docker build --pull --no-cache …`) to pick up the latest
published `weave` and `oi-runtime`, push it, and roll the pods. On Kubernetes, roll
with `kubectl rollout restart statefulset/weave-node` when the tag is unchanged. The
volume keeps each node's identity and weight cache across the rollout.

For reproducible rollouts, tag images by build date or version, not only `latest`.

## Environment reference

| Variable | Purpose |
| --- | --- |
| `WEAVE_PAIR_TOKEN` | Pairing token used by `weave up` when no identity exists yet. |
| `WEAVE_NODE_NAME` | Display name shown in `weave nodes` and Studio. |
| `WEAVE_ENGINE_URL` | Runtime address. Defaults to `http://127.0.0.1:1337`. When the host is `127.0.0.1`, `localhost`, or `::1`, `weave up` starts and supervises the runtime unless something already answers there. Any other host is treated as a runtime someone else runs. |
| `WEAVE_ENDPOINT` | Control-plane URL the node pairs with and downloads the runtime from. The image sets it to `https://platform.openinfer.io`; without it, published `weave` builds use production. |
| `WEAVE_TOKEN` | Pairing token for `weave runtime install` when the box isn't paired yet, as in the image build. |

All `weave` flags and their environment variables are in the
[Command reference](/docs/commands#global-options).

---

# Command reference

> Every weave command, grouped by area — authentication, nodes, models, keys, and runtime.

Every `weave` command, grouped by area. This mirrors `weave help`; run
`weave <command> --help` for the authoritative, always-current flag list.

Most commands accept `--json` to emit machine-readable output instead of a table —
handy for scripting and agents.

## Global options

These flags and environment variables apply to every command:

| Flag | Env | Purpose |
| --- | --- | --- |
| `--org <id>` | `WEAVE_ORG` | Organization (object id or name) for operator commands. Defaults to your saved default organization (`weave orgs use`), then your sole compute-owning organization. |
| `--endpoint <url>` | `WEAVE_ENDPOINT` | Control-plane base URL. Defaults to the build's baked endpoint. |
| `--hub <url>` | `WEAVE_HUB` | Explicit gRPC hub override, such as `https://platform.openinfer.io:8443`. Rarely needed — the control plane advertises the hub at pair/connect. |
| `--config <path>` | `WEAVE_CONFIG` | Bootstrap config file. Defaults to `~/.weave/weave.toml`. |
| `--identity <path>` | `WEAVE_IDENTITY` | Identity file (node id + pairing token). Defaults to `~/.weave/runner.toml`. |
| `--name <name>` | `WEAVE_NODE_NAME` | Friendly display name for this node, sent to the hub and saved to `weave.toml`. |
| `--engine-url <url>` | `WEAVE_ENGINE_URL` | Local runtime base URL. Defaults to `http://127.0.0.1:1337`. |

## Authentication

Log in and manage credentials.

```bash
weave auth login            # device-code sign-in, then stores credentials locally
weave auth status           # show stored credentials
weave auth logout           # remove stored credentials
```

`weave auth login` prints a URL and a one-time code. Approve it in a browser on any
machine, so it works over SSH and on headless boxes. If a local browser is available it
opens for you. It accepts `--endpoint <url>` to authenticate against a specific control
plane (defaults to `$WEAVE_ENDPOINT`).

## Pairing & serving

Join a machine to the fleet and serve.

```bash
weave pair <weave_pt_…>     # store the durable pairing token locally, then exit
weave up                    # pair if needed, launch/supervise oi-runtime, connect, serve
weave run                   # connect and reconnect forever (identity must already exist)
```

- **`weave pair [token]`** stores the pairing (refresh) token and exits — no
  connection is opened. The token may come from the argument or `$WEAVE_PAIR_TOKEN`;
  if omitted and you are logged in, one is minted for your organization automatically.
- **`weave up [token]`** is the idempotent entrypoint for unattended/fleet use: pair
  if there's no identity yet, then run. A bare `weave up` supervises the local runtime
  so it's a full serving node. It stops the runtime cleanly on `SIGTERM`, so it works as
  a container entrypoint. Pass `--no-managed-engine` when an external supervisor
  (systemd's `oi-runtime.service`, or a separate runtime container) owns the runtime.
- **`weave run`** exchanges the stored pairing token for an access token, connects,
  and reconnects forever.

## Nodes & fleet

Inspect and operate connected nodes.

```bash
weave nodes                            # list the organization's nodes and their loaded models
weave node <id>                        # inspect one node
weave node <id> --enable-routing       # start routing requests to this node
weave node <id> --disable-routing      # drain: stop routing new requests
weave fleet                            # cluster-wide health: nodes, GPU memory, sessions
weave fleet reapply                    # re-push the organization's committed-topology layout
weave fleet plan --model @oi/Qwen3.5-397B-A17B:44 --model @oi/Qwen3.5-27B:8   # device-level plan (dry run)
weave fleet plan --model @oi/Qwen3.5-27B:8:32768 --apply                         # plan + push (guard-checked)
```

An organization on the **oi-plan planner** is driven with its own verbs, which ask the hub
the same questions the Fleet planner page does and are refused for the same callers:

```bash
weave fleet status                     # source, active run, roll-out (paused? why), waves, recent events
weave fleet plan                       # plan the organization's saved intent as a new run
weave fleet runs [--limit 10]          # the runs, newest first; the active one is marked
weave fleet activate <run>             # move the organization onto a planned run (re-activating an earlier run is the undo)
weave fleet pause                      # no wave starts until resume
weave fleet resume [--accept-floor-gap]
weave fleet waves stop                 # incident switch: stop every organization's waves (admin organization only)
weave fleet waves start
```

`plan`, `activate`, `pause` and `resume` need the owner or admin role in the organization.
`plan` and `activate` wait up to 20 seconds for the hub to answer: a plan or activation check
that takes longer says so and goes on, and `weave fleet runs` / `weave fleet status` show its
outcome. `waves stop` / `start` need an admin of the OpenInfer admin organization (`--org`
names it). The stop switch is fleet-wide and each hub applies it within
30 seconds. `weave fleet plan --model ...` and `weave fleet reapply` are layout commands: the
hub refuses them for an organization on oi-plan. A hub that predates a verb says
"this hub doesn't support `weave fleet <verb>` yet".

`weave fleet plan` takes `--model SLUG:DEMAND[:CONTEXT]` (repeatable): `DEMAND` is
concurrent sessions and `CONTEXT` is tokens per session, defaulting to the model's catalog
average. `--place-by sessions|weight` picks the packing strategy (default `sessions`). It
is a dry run until you pass `--apply`, and the hub refuses a layout that fails its
overcommit guard.

**Logs** — bounded query by default, live tail with `--follow`:

```bash
weave logs <id> --tail 50                       # last 50 lines
weave logs <id> --since 10m --grep cuda         # last 10m, filter for "cuda"
weave logs <id> --since 10m --until 5m          # time window
weave logs <id> --service runtime --follow      # live tail the runtime logs
weave logs <id> --follow --since 5m             # backfill 5m, then follow
weave logs <id> --component core --level warn   # runtime's structured trace buffer (warn+)
```

Services to tail are `runtime`, `agent`, `system` (comma-separated or repeat
`--service`; omit for all). `--component` reads the runtime's structured trace buffer
(`core`, `scheduler`, `session`, `transfer`, `http`) — a bounded snapshot that can't
be combined with `--follow`. Service logs come from journald, so a containerized node
only serves the `--component` buffer (see
[Deploying with containers](/docs/containers#logs-in-a-container)).

**Restart** an in-place service (no download, no version change) — the remedy for a
wedged runtime. Waits for recovery and exits non-zero if it doesn't come back:

```bash
weave restart <id>                     # restart oi-runtime, wait
weave restart <id> --agent             # restart the weave agent instead
weave restart <id> --drain-grace 30    # let in-flight requests finish first
weave restart <id> --reason "oom"      # recorded in the node's logs
weave restart <id> --no-wait           # fire and forget
```

**Upgrade** to the latest published build — the agent downloads, verifies, drains,
swaps, restarts, re-warms, and rolls back if the new build doesn't come up:

```bash
weave upgrade <id>                     # upgrade the weave agent (default)
weave upgrade <id> --runtime           # upgrade oi-runtime instead
weave upgrade <id> --no-wait           # return once the agent accepts
```

"Latest" means the runtime build this Studio currently serves for the node's
platform and accelerator. A node never upgrades on its own. It moves only when you
run `weave upgrade <id> --runtime` or use **Upgrade** on the node's page in Studio,
which appears while the node runs a different build. The node page also shows which
runtime build the node runs.

On a containerized node an upgrade lands in the container's filesystem only, so it is
lost when the container is recreated. Rebuild the image instead (see
[Deploying with containers](/docs/containers#upgrading)).

## Models & routing

Manage the catalog and where models run.

```bash
weave models                           # list the organization's model catalog
weave models available                 # platform models the organization can import
weave models available --fits <node-id>  # only those that fit that node's GPU + RAM
weave models import @oi/Qwen3.5-9B     # import + publish (owner/admin; re-import is a no-op)
weave route @oi/Qwen3.5-27B            # routing state for a model: candidates, health, inflight, ownership
```

**Push** a desired model set to a node. The hub requires at least one high-priority
model in the set:

```bash
weave push <id> --high @oi/Llama-3.2-1B-Instruct --wait
weave push <id> --high @oi/A --medium @oi/B --low @oi/C
```

- `--high` / `--medium` / `--low` set priority; repeat each for multiple models.
  `--model` adds a model with no explicit priority (the hub treats it as medium).
- `--tier <name>` (e.g. `hot`).
- `--wait` polls until each model reaches `hot`; `--timeout <secs>` (default 120)
  bounds the wait and exits non-zero on timeout.

## Keys & tokens

Three distinct credential types — don't mix them up:

- **`pk_…`** inference API keys — `Authorization: Bearer` against `/v1`.
- **`usr_…`** operator CLI tokens — your `weave auth login` sessions.
- **`weave_pt_…`** pairing tokens — reusable, organization-scoped credentials a machine
  presents to `weave pair` / `weave up`.

```bash
weave keys mint                        # mint an inference API key (pk_…), printed once
weave keys mint --name ci              # label the key (default "weave CLI")
```

```bash
weave tokens ls                        # list your CLI tokens
weave tokens revoke <id>               # revoke a CLI token
```

```bash
weave pairing-tokens ls                # list the organization's live pairing tokens (no secrets)
weave pairing-tokens mint --label ci   # mint a weave_pt_… (printed once)
weave pairing-tokens revoke <id>       # revoke; nodes on it must re-pair
```

Every mint prints its secret **once** — capture it immediately.

## Organizations

```bash
weave whoami                           # show the authenticated compute-owning organization
weave orgs ls                          # list the organizations you belong to
weave orgs use <organization>          # set the default organization for operator commands
```

API keys, pairing tokens, and nodes all belong to the organization. Switch organizations
with `weave orgs use`, or pass `--org` to a single command.

## Runtime

Install or update the local `oi-runtime` inference runtime using the pairing token this node
already holds (or `$WEAVE_TOKEN`) — so a box with just the public CLI can become a
full serving node without re-running the install script.

```bash
weave runtime install                  # auto-detect cpu/cuda and install
weave runtime install --accel cuda     # force the CUDA build
weave runtime install --force          # reinstall even if a runtime is present
```

Auto-detection picks `cuda` when `nvidia-smi` finds a GPU and `cpu` otherwise. Pass
`--accel` explicitly when installing where no GPU is visible, such as a `docker build`.
