---
title: luna dev
description: Deploy the app in this folder to your own environment, again on every save, and print the environment's log lines.
related:
  - /develop/develop-with-luna-dev
  - /develop/manage-environments
  - /cli/deploy
---

`luna dev` deploys the app in this folder to the environment the folder uses, deploys again on every save and prints the environment's log lines until you stop it.

```bash
luna dev
```

## Reference

```bash
luna dev [OPTIONS]
```

| Option | Type | Default | Does |
| --- | --- | --- | --- |
| `--env <ENV>` | text | `LUNA_ENV` | The environment to deploy to. `luna env create` and `luna env use` write it to the folder. |
| `--project <PROJECT>` | text | `LUNA_PROJECT` | The project, by name or as `organisation/project`. |
| `--dir <DIR>` | path | `.` | The app's folder: where `luna.config.ts` is, or the folder whose `luna` folder has it. |
| `--yes` | flag | Off | Deploys the changes that preflight would ask you to confirm. |
| `--no-logs` | flag | Off | Leaves out the environment's log lines. |
| `--token <TOKEN>` | text | `LUNA_TOKEN`, then your login | The API token or account key to deploy with. |

## Good to know

- `luna dev` never runs in `production`. It stops when the folder names no environment, and says to run `luna env create dev`.
- It stops when neither `--dir` nor its `luna` folder holds a `luna.config.ts`.
- Each deploy sends the same files as [`luna deploy`](/cli/deploy), and passes the same preflight. `luna dev` does not check types first.
- After a save, it waits for the files to settle, then deploys. A deploy that fails prints its error, and `luna dev` keeps watching for the next save.
- After the first deploy, it writes `LUNA_URL` and `LUNA_KEY` to `.env.local` when the file lacks them.
- When the app has lunas in both TypeScript and Python, it writes `luna_gen.ts` and `luna_gen.py` in the app's folder on every deploy.
- Log lines show the time of day on this machine's clock. [`luna logs`](/cli/logs) reads them with filters.
- Stop it with Ctrl-C.

## Examples

### Develop against the folder's environment

```bash
luna dev
```

### Develop against another environment

```bash
luna dev --env dev-ann
```

### Deploy on every save without log lines

```bash
luna dev --no-logs
```
