---
title: flow
sidebarTitle: flow
---

# `prefect.cli.flow`



Command line interface for working with flows.


## Functions

### `ls` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow.py#L27" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
ls(limit: int = 15)
```


View flows.


### `serve` <sup><a href="https://github.com/PrefectHQ/prefect/blob/main/src/prefect/cli/flow.py#L55" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python
serve(entrypoint: str = typer.Argument(..., help='The path to a file containing a flow and the name of the flow function in the format `./path/to/file.py:flow_func_name`.'), name: str = typer.Option(..., '--name', '-n', help='The name to give the deployment created for the flow.'), description: Optional[str] = typer.Option(None, '--description', '-d', help="The description to give the created deployment. If not provided, the description will be populated from the flow's description."), version: Optional[str] = typer.Option(None, '-v', '--version', help='A version to give the created deployment.'), tags: Optional[List[str]] = typer.Option(None, '-t', '--tag', help='One or more optional tags to apply to the created deployment.'), cron: Optional[str] = typer.Option(None, '--cron', help='A cron string that will be used to set a schedule for the created deployment.'), interval: Optional[int] = typer.Option(None, '--interval', help='An integer specifying an interval (in seconds) between scheduled runs of the flow.'), interval_anchor: Optional[str] = typer.Option(None, '--anchor-date', help='The start date for an interval schedule.'), rrule: Optional[str] = typer.Option(None, '--rrule', help='An RRule that will be used to set a schedule for the created deployment.'), timezone: Optional[str] = typer.Option(None, '--timezone', help="Timezone to used scheduling flow runs e.g. 'America/New_York'"), pause_on_shutdown: bool = typer.Option(True, help='If set, provided schedule will be paused when the serve command is stopped. If not set, the schedules will continue running.'), limit: Optional[int] = typer.Option(None, help='The maximum number of runs that can be executed concurrently by the created runner; only applies to this served flow. To apply a limit across multiple served flows, use global_limit.'), global_limit: Optional[int] = typer.Option(None, help='The maximum number of concurrent runs allowed across all served flow instances associated with the same deployment.'))
```


Serve a flow via an entrypoint.

