Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview
On this page

luna dev

Deploy the app in this folder to your own environment, again on every save, and print the environment's log lines.

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.

luna dev

Reference

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, 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 reads them with filters.
  • Stop it with Ctrl-C.

Examples

Develop against the folder’s environment

luna dev

Develop against another environment

luna dev --env dev-ann

Deploy on every save without log lines

luna dev --no-logs

Was this page helpful?