> ## 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 deploy

> Load a trained policy and run it on hardware.

<CodeGroup>
  ```bash saved checkpoint theme={null}
  rfx deploy runs/my-policy --robot so101
  ```

  ```bash hub theme={null}
  rfx deploy hf://rfx-community/go2-walk-v1 --robot go2
  ```

  ```bash python file theme={null}
  rfx deploy my_policy.py --robot so101
  ```

  ```bash mock theme={null}
  rfx deploy runs/my-policy --robot so101 --mock
  ```

  ```bash options theme={null}
  rfx deploy runs/my-policy --robot so101 \
    --duration 60 --rate-hz 50 --port /dev/ttyACM0
  ```
</CodeGroup>

## Flags

| Flag         | Default  | Description                                                                   |
| ------------ | -------- | ----------------------------------------------------------------------------- |
| `policy`     | required | Path to policy dir, `hf://org/repo`, or `.py` file.                           |
| `--robot`    | auto     | Robot type (`so101`, `go2`, `g1`). Auto-detected from policy config if saved. |
| `--config`   | none     | Path to robot YAML config (overrides `--robot`).                              |
| `--port`     | auto     | Serial port or IP override.                                                   |
| `--rate-hz`  | auto     | Control loop frequency (defaults to robot config).                            |
| `--duration` | infinite | Run time in seconds. Ctrl+C to stop if not set.                               |
| `--mock`     | `false`  | Use `MockRobot` instead of real hardware.                                     |
| `--device`   | `cpu`    | Torch device for inference.                                                   |
| `--warmup`   | `0.5`    | Seconds to sleep after reset before starting.                                 |

Deploy handles: load weights, resolve robot config, connect hardware, run
the control loop with rate control and jitter tracking, clean shutdown on
Ctrl+C.
