---
title: " "
sidebarTitle: prefect task-runs
---

# `prefect task-runs`



```command
prefect task-runs [OPTIONS] COMMAND [ARGS]...
```



<Info>
View and inspect task runs.
</Info>








## `prefect task-runs inspect`



```command
prefect task-runs inspect [OPTIONS] ID
```



<Info>
View details about a task run.
</Info>






<AccordionGroup>


<Accordion title="Arguments" defaultOpen>
<ResponseField name="ID" type="string" required>
    \[required]
</ResponseField>
</Accordion>



<Accordion title="Options" defaultOpen>

<ResponseField name="--web">
    Open the task run in a web browser.
</ResponseField>

<ResponseField name="--output">
    Specify an output format. Currently supports: json
</ResponseField>

</Accordion>

</AccordionGroup>



## `prefect task-runs ls`



```command
prefect task-runs ls [OPTIONS]
```



<Info>
View recent task runs
</Info>






<AccordionGroup>




<Accordion title="Options" defaultOpen>

<ResponseField name="--task-run-name">
    Name of the task
</ResponseField>

<ResponseField name="--limit">
    Maximum number of task runs to list
</ResponseField>

<ResponseField name="--state">
    Name of the task run's state
</ResponseField>

<ResponseField name="--state-type">
    Type of the task run's state
</ResponseField>

</Accordion>

</AccordionGroup>



## `prefect task-runs logs`



```command
prefect task-runs logs [OPTIONS] ID
```



<Info>
View logs for a task run.
</Info>






<AccordionGroup>


<Accordion title="Arguments" defaultOpen>
<ResponseField name="ID" type="string" required>
    \[required]
</ResponseField>
</Accordion>



<Accordion title="Options" defaultOpen>

<ResponseField name="--head">
    Show the first 20 logs instead of all logs.
</ResponseField>

<ResponseField name="--num-logs">
    Number of logs to show when using the --head or --tail flag. If None, defaults to 20.
</ResponseField>

<ResponseField name="--reverse">
    Reverse the logs order to print the most recent logs first
</ResponseField>

<ResponseField name="--tail">
    Show the last 20 logs instead of all logs.
</ResponseField>

</Accordion>

</AccordionGroup>
