Create a template
Use mvmctl init to create a reusable project directory:
mvmctl init my-worker --preset workercd my-workerThe generated directory contains mvm.toml and flake.nix. Commit both.
They are the reproducible source for future builds.
Presets
Section titled “Presets”mvmctl init my-vm --preset minimalmvmctl init my-api --preset pythonmvmctl init my-web --preset httpmvmctl init my-job --preset workermvmctl init my-db --preset postgresPresets choose a starting flake and conservative resources. Edit the files after scaffolding; the next build reads the current contents from disk.
Manifest fields
Section titled “Manifest fields”flake = "."profile = "default"vcpus = 2mem = "1024M"data_disk = "0"name = "my-worker"Use the flake for guest content and services. Use the manifest for the build input pointer, profile selector, and local runtime sizing.
Prompt-assisted scaffolding
Section titled “Prompt-assisted scaffolding”When available, mvmctl init --prompt turns a short description into a fixed
preset plan:
mvmctl init my-api --prompt "Python HTTP API with a background worker"The prompt planner should choose from known scaffolds. It should not emit free-form shell or unreviewed Nix that bypasses the security model.
Security checklist
Section titled “Security checklist”- Review generated files before running
mvmctl build. - Keep
flake.lockpinned and committed. - Do not put credentials in
mvm.toml,flake.nix, or source examples. - Prefer secret references and explicit runtime grants.
- Keep initial resources small; increase only when the workload needs it.