---
title: dev
sidebarTitle: dev
---

# `prefect.cli.dev`



Command line interface for working with Prefect Server


## Functions

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

```python
exit_with_error_if_not_editable_install() -> None
```

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

```python
build_docs(schema_path: Optional[str] = None)
```


Builds REST API reference documentation for static display.


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

```python
build_ui(no_install: bool = False)
```

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

```python
ui()
```


Starts a hot-reloading development UI.


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

```python
api(host: str = SettingsOption(PREFECT_SERVER_API_HOST), port: int = SettingsOption(PREFECT_SERVER_API_PORT), log_level: str = 'DEBUG', services: bool = True)
```


Starts a hot-reloading development API.


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

```python
start(exclude_api: bool = typer.Option(False, '--no-api'), exclude_ui: bool = typer.Option(False, '--no-ui'))
```


Starts a hot-reloading development server with API, UI, and agent processes.

Each service has an individual command if you wish to start them separately.
Each service can be excluded here as well.


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

```python
build_image(arch: str = typer.Option(None, help=f'The architecture to build the container for. Defaults to the architecture of the host Python. [default: {platform.machine()}]'), python_version: str = typer.Option(None, help=f'The Python version to build the container for. Defaults to the version of the host Python. [default: {python_version_minor()}]'), flavor: str = typer.Option(None, help="An alternative flavor to build, for example 'conda'. Defaults to the standard Python base image"), build_arg: list[str] = typer.Option([], help='This will directly pass a --build-arg into the docker build process. Can be added to the command line multiple times.'), dry_run: bool = False)
```


Build a docker image for development.


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

```python
container(bg: bool = False, name = 'prefect-dev', api: bool = True, tag: Optional[str] = None)
```


Run a docker container with local code mounted and installed.

