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

# flow_run

# `prefect.cli.flow_run`

Flow run command — native cyclopts implementation.

Interact with flow runs.

## Functions

### `inspect` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L157](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L157)</sup>

```python theme={null}
inspect(id: UUID)
```

View details about a flow run.

### `ls` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L208](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L208)</sup>

```python theme={null}
ls()
```

View recent flow runs or flow runs for specific flows.

**Examples:**

```bash theme={null}
$ prefect flow-runs ls --state Running
$ prefect flow-runs ls --state Running --state late
$ prefect flow-runs ls --state-type RUNNING
$ prefect flow-runs ls --state-type RUNNING --state-type FAILED
```

### `delete` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L344](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L344)</sup>

```python theme={null}
delete(id: UUID)
```

Delete a flow run by ID.

### `cancel` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L364](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L364)</sup>

```python theme={null}
cancel(id: UUID)
```

Cancel a flow run by ID.

### `retry` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L386](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L386)</sup>

```python theme={null}
retry(id_or_name: str)
```

Retry a failed or completed flow run.

The flow run can be specified by either its UUID or its name. If multiple
flow runs have the same name, you must use the UUID to disambiguate.

If the flow run has an associated deployment, it will be scheduled for retry
and a worker will pick it up. If there is no deployment, you must provide
an --entrypoint to the flow code, and the flow will execute locally.

**Examples:**

```bash theme={null}
$ prefect flow-run retry abc123-def456-7890-...
$ prefect flow-run retry my-flow-run-name
$ prefect flow-run retry abc123 --entrypoint ./flows/my_flow.py:my_flow
```

### `logs` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L560](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L560)</sup>

```python theme={null}
logs(id: UUID)
```

View logs for a flow run.

### `watch` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L735](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L735)</sup>

```python theme={null}
watch(id: UUID)
```

Watch a flow run until it reaches a terminal state.

### `execute` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow\_run.py#L770](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow_run.py#L770)</sup>

```python theme={null}
execute(id: Optional[UUID] = None)
```

Execute a flow run by ID.
