# Command line

> The rayform command: upload, inspect, search, slice, export and pull from a terminal.

Source: https://rayform.world/docs/sdk/cli
Last updated: 2026-10-18
Status: Rayform is in private preview. APIs, formats and the SDK described here may change before general availability.

The `rayform` command installs with the Python package. It uses the same configuration as the SDK, and every command accepts `--json` for scripting.

```bash
pip install rayform
rayform --help
```

## Commands

| Command | Does |
| --- | --- |
| `rayform login` | Store an API key in `~/.config/rayform/credentials` for interactive use |
| `rayform whoami` | Show the organisation and key in use |
| `rayform upload PATH --site SITE [--wait] [--recursive]` | Upload a file or folder |
| `rayform sessions list [--site SITE] [--status STATUS]` | List sessions |
| `rayform sessions show ID` | Show a session, its issues and segments |
| `rayform sessions delete ID` | Delete a session and everything derived from it |
| `rayform search [FILTERS]` | Search segments |
| `rayform slice create [FILTERS] --name NAME` | Freeze a slice |
| `rayform export SLICE --format FORMAT [--out DIR \| --to URI]` | Export a slice |
| `rayform pull SLICE` | Download a slice into the local cache |
| `rayform verify PATH --expect HASH` | Check a file against a content hash |
| `rayform calibration upload FILE` | Store a device calibration |

## Examples

Upload everything recorded today and wait for processing:

```bash
rayform upload ~/recordings/2026-10-14/ --site lab-2 --recursive --wait
```

Search and freeze in one line:

```bash
rayform slice create --site lab-2 --event grasp --object mug --quality-min psnr=28 --name "mug grasps"
```

```text
slc_7c1e04aa  mug grasps  412 segments  47.9 min
```

Export to LeRobot on local disk:

```bash
rayform export slc_7c1e04aa --format lerobot --fps 15 --camera cam0/rgb --camera wrist/rgb --out ./data/mug-grasps
```

Machine-readable output:

```bash
rayform sessions list --status failed --json | jq -r '.[].id'
```

## Exit codes

| Code | Meaning |
| --- | --- |
| `0` | Success |
| `1` | The API returned an error; the message includes the request ID |
| `2` | Invalid arguments |
| `3` | Processing or export failed (with `--wait`) |
| `4` | Integrity check failed |
