# `fastflow` CLI reference

`fastflow` is the native runtime CLI in every FastFlow SDK release: the `fastflow-sdk` wheels put it on `PATH`, and the standalone archives ship it as `bin/fastflow`. It needs no Python. This page is generated from the CLI's source; [Runtime CLI behavior](<https://rocm.github.io/FastFlow-SDK/runtime-cli/index.md>) explains what each command does and does not change on the system.

## Help

```
Usage: fastflow [global-options] <command> [global-options]

Commands:
  version    Report product, build, manifest, and HRX library information
  probe      Collect platform, driver, firmware, device, and HRX facts
  powermode [mode]
             Report or set NPU power mode
  doctor     Evaluate package, runtime, and device health
  self-test  Dispatch the packaged bounded deterministic XADX test
  plugin list
             Discover external fastflow-* plugin executables without running them
  <name>     Execute the external fastflow-<name> plugin

Global options:
  --json             Emit exactly one JSON report to stdout
  --runtime <path>   Use an explicit HRX library file or directory
  --verbose          Include additional diagnostics
  --help, -h         Show this help

Power modes:
  default, powersaver, balanced, performance, turbo
```

## Commands

| Command | Description | Checks in its report |
| --- | --- | --- |
| `fastflow version` | Report product, build, manifest, and HRX library information | none |
| `fastflow probe` | Collect platform, driver, firmware, device, and HRX facts | [`device.enumeration`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-enumeration>) |
| `fastflow powermode [mode]` | Report or set NPU power mode | [`powermode.arguments`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#powermode-arguments>), [`powermode.support`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#powermode-support>), [`powermode.device_present`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#powermode-device-present>), [`powermode.query`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#powermode-query>), [`powermode.set`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#powermode-set>) |
| `fastflow doctor` | Evaluate package, runtime, and device health | [`package.manifest`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#package-manifest>), [`device.enumeration`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-enumeration>), [`device.present`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-present>), [`device.access`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-access>), [`device.ioctl`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-ioctl>), [`runtime.library.present`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-library-present>), [`runtime.library.load`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-library-load>), [`runtime.symbols`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-symbols>), [`runtime.abi`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-abi>), [`runtime.initialize`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-initialize>), [`runtime.device_count`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-device-count>), [`runtime.shutdown`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-shutdown>) |
| `fastflow self-test` | Dispatch the packaged bounded deterministic XADX test | [`package.manifest`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#package-manifest>), [`device.enumeration`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-enumeration>), [`device.present`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-present>), [`device.access`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-access>), [`device.ioctl`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#device-ioctl>), [`runtime.library.present`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-library-present>), [`runtime.library.load`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-library-load>), [`runtime.symbols`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-symbols>), [`runtime.abi`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-abi>), [`runtime.initialize`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-initialize>), [`runtime.device_count`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-device-count>), [`runtime.shutdown`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#runtime-shutdown>), [`self_test.prerequisites`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-prerequisites>), [`self_test.fixture`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-fixture>), [`self_test.load`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-load>), [`self_test.dispatch`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-dispatch>), [`self_test.cleanup`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-cleanup>), [`self_test.output`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#self-test-output>) |
| `fastflow plugin list` | Discover external fastflow-\* plugin executables without running them | [`plugin.discovery`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#plugin-discovery>) |

Every command can also report [`invocation.arguments`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#invocation-arguments>), [`internal.error`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#internal-error>), [`plugin.dispatch`](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md#plugin-dispatch>).

## Exit status

| Status | Meaning |
| --- | --- |
| `0` | The command completed and every required check passed. |
| `1` | A health check or the self-test failed. |
| `2` | Invalid input or an internal execution error. |

## Machine-readable output

For a built-in command, `fastflow --json <command>` writes exactly one JSON report to standard output, with `schema_version`, `command`, `status`, `product`, `checks`, and, when the command has any, `data`. Invalid arguments also produce a report. `--help` prints the usage text even with `--json`. An external plugin writes its own output and sets the exit status; `fastflow` reports only when it cannot start one (`plugin.dispatch`).

Parse the report instead of the human output; the [JSON contract](<https://rocm.github.io/FastFlow-SDK/contracts/runtime-cli-json/index.md>) defines it. For each check whose `status` is not `pass`, look up its `id` in [Troubleshooting](<https://rocm.github.io/FastFlow-SDK/reference/troubleshooting/index.md>).

```
fastflow doctor --json
```
