> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryreflex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# rfx record

> Collect robot observations into a LeRobot dataset.

```bash theme={null}
rfx record --robot so101 --repo-id my-org/demos --episodes 10 --duration 30
```

More examples:

```bash theme={null}
rfx record --robot so101 --repo-id demos --duration 15 --fps 30 --port /dev/ttyACM0
rfx record --robot so101 --repo-id demos --mock --duration 5
rfx record --robot go2 --repo-id demos --duration 20 --push
```

## Flags

| Flag          | Default     | Description                                            |
| ------------- | ----------- | ------------------------------------------------------ |
| `--robot`     | required    | Robot type (`so101`, `go2`, `g1`).                     |
| `--repo-id`   | required    | Dataset name or HuggingFace repo ID.                   |
| `--episodes`  | `1`         | Number of episodes to record.                          |
| `--duration`  | interactive | Episode duration in seconds. Omit to stop with Ctrl+C. |
| `--fps`       | `30`        | Recording frame rate.                                  |
| `--rate-hz`   | `fps`       | Sampling rate override for `robot.observe()`.          |
| `--config`    | none        | Robot YAML config override.                            |
| `--port`      | auto        | Serial port or IP override.                            |
| `--camera-id` | config      | Camera device id override (repeatable).                |
| `--mock`      | `false`     | Use `MockRobot` for dry-run recording.                 |
| `--push`      | `false`     | Push dataset to HuggingFace Hub after recording.       |
| `--mcap`      | `false`     | Write MCAP sidecar alongside dataset.                  |
| `--state-dim` | config      | Override state dimension.                              |
