Local Dev (Source Mode)
Run an app from source with install / dev — launchfile dev, no container.
What this demonstrates
- `install` / `dev` are the source-mode pair of `build` / `start`
- `launchfile dev` runs from source; `launchfile up` runs the built artifact
- An optional `source` field sets the working directory for source commands
- Only prepare/run are mode-aware — release, bootstrap, seed, test are identical in both modes
When to use this: Add install / dev only when running from source needs a different command than the built artifact.
local-dev.yamlView on GitHub
# yaml-language-server: $schema=../schema/launchfile.schema.json
#
# Minimal source-mode Launchfile — no container, no provisioning.
# `launchfile dev .` runs commands.install (on demand) then commands.dev.
# (A file with only `build` + `start` works too — see SPEC.md § Source-mode commands.)
#
# Swap the commands for any runtime:
# runtime: node with "npm install" / "npm run dev"
# runtime: python with "pip install -r requirements.txt" / "python manage.py runserver"
# runtime: ruby with "bundle install" / "bundle exec rails server"
name: my-app
runtime: bun
commands:
install: "bun install"
dev: "bun run dev"Key lines explained
install:- Source-mode prepare — the counterpart of build. Runs on demand (first launch or dependency change).
dev:- Source-mode run — the counterpart of start. Your dev server, launched by launchfile dev.
See this pattern in real apps — Source mode is for apps you clone and develop locally, alongside their artifact deploy.