# Compute

> GPUs by the minute to train and measure your own models, driven from the div CLI. Put data where the hardware can reach it, run something on it, read what it said, and stop it.

Compute is in private beta. It is open to the orgs we have let in, and the commands, flags and prices on these pages can change before it opens to everyone. [Request access](https://tally.so/r/yPOxpB) and we will write back.

## The div CLI

`div` drives the same control plane the dashboard does, with an API key instead of a session. It is one static binary, written in Rust, and it is written for a pipe as much as for a terminal: an agent can drive it without parsing anything but exit codes.

```bash
div login
div run --gpu h100 train.py::run --max-spend 5.00
```

The first line signs this machine in through the browser. The second ships the directory you are in to a volume, places a run on one H100, stops it when it has cost five dollars, and prints the run's log until it ends. `div` then exits with the run's own exit code.

## The commands

| Command | What it does |
| --- | --- |
| [`div login`](https://docs.divergentlabs.xyz/compute/cli/login.md) | signs this machine in through the browser and saves the key it is given |
| [`div whoami`](https://docs.divergentlabs.xyz/compute/cli/whoami.md) | which org, key and control plane this machine uses, and where the key was found |
| [`div run`](https://docs.divergentlabs.xyz/compute/cli/run.md) | places a run, ships the working directory to it, and follows its log |
| [`div logs`](https://docs.divergentlabs.xyz/compute/cli/logs.md) | prints a run's log, or follows it until the run stops |
| [`div result`](https://docs.divergentlabs.xyz/compute/cli/result.md) | prints what a run declared about itself, or one value in it |
| [`div eval`](https://docs.divergentlabs.xyz/compute/cli/eval.md) | measures a model version, and ranks it against the others |
| [`div model`](https://docs.divergentlabs.xyz/compute/cli/model.md) | names weights on a volume as a version to measure, and lists the registry |
| [`div runs`](https://docs.divergentlabs.xyz/compute/cli/runs.md) | lists the org's runs, and what the unfinished ones cost per hour |
| [`div stop`](https://docs.divergentlabs.xyz/compute/cli/stop.md) | stops a run and prints what it spent |
| [`div storage`](https://docs.divergentlabs.xyz/compute/cli/storage.md) | puts files on a volume and gets them back |
| [`div secrets`](https://docs.divergentlabs.xyz/compute/cli/secrets.md) | sets the values every run has in its environment |
| [`div papers`](https://docs.divergentlabs.xyz/compute/cli/papers.md) | searches arXiv, or reads papers whole by id — no key needed |
| [`div catalog`](https://docs.divergentlabs.xyz/compute/cli/catalog.md) | what `--gpu` takes and what an hour of each costs |
| [`div limits`](https://docs.divergentlabs.xyz/compute/cli/limits.md) | what the org holds against what its plan allows, and its spend against its usage limit |
| [`div dashboard`](https://docs.divergentlabs.xyz/compute/cli/dashboard.md) | opens the dashboard in the browser |

Everything else the control plane can do — endpoints, billing, keys with other scopes — is in the dashboard until it earns a command here.

An agent with an MCP client can skip the binary entirely: [the MCP server](https://docs.divergentlabs.xyz/compute/mcp.md) is the same operations, as tools.

## A first run

Sign in once per machine:

```bash
div login
```

It prints a code like `QZHR-LVKG` and opens the dashboard with it. Approve it there if the codes match. The key is saved to `~/.config/divergent/config.json`, readable only by you.

Then, from the directory your code is in:

```bash
cd ~/very-cool-classifier
div run --gpu h100 train.py::run --max-spend 5.00
```

```text
new project very-cool-classifier
14 files, 38.2 KB → very-cool-classifier-code/code/9f31c2ab
run-k4t9  H100  $4.95/h  $5.00 buys 1h 0m
...the run's own output...
run-k4t9 finished in 12m 40s and spent $1.05
```

The first line before the log is the one worth reading: what the run costs an hour, and how long the ceiling buys at that rate. Everything above the run's output is ours and goes to stderr; the output itself goes to stdout untouched.
