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

#  

# `prefect task-run`

```command theme={null}
prefect task-run [OPTIONS] COMMAND [ARGS]...
```

> [!NOTE]
>
> View and inspect task runs.

## `prefect task-run inspect`

```command theme={null}
prefect task-run inspect [OPTIONS] ID
```

> [!NOTE]
>
> View details about a task run.

> **Arguments**
>
> **ID** `string` *required*

> **Options**
>
> **--web**
>
> Open the task run in a web browser.
>
> **--output**
>
> Specify an output format. Currently supports: json

## `prefect task-run ls`

```command theme={null}
prefect task-run ls [OPTIONS]
```

> [!NOTE]
>
> View recent task runs.

> **Options**
>
> **--task-run-name**
>
> Name of the task
>
> **--limit**
>
> Maximum number of task runs to list
>
> **--state**
>
> Name of the task run's state
>
> **--state-type**
>
> Type of the task run's state
>
> **--output**
>
> Specify an output format. Currently supports: json

## `prefect task-run logs`

```command theme={null}
prefect task-run logs [OPTIONS] ID
```

> [!NOTE]
>
> View logs for a task run.

> **Arguments**
>
> **ID** `string` *required*

> **Options**
>
> **--head**
>
> Show the first 20 logs instead of all logs.
>
> **--num-logs**
>
> Number of logs to show when using the --head or --tail flag. If None, defaults to 20.
>
> **--reverse**
>
> Reverse the logs order to print the most recent logs first
>
> **--tail**
>
> Show the last 20 logs instead of all logs.
>
> **--output**
>
> Specify an output format. Currently supports: json
