Skip to content

feat: vm name, mount_project, ubuntu-24.04, provision scripts, copy command, workdir#4

Open
saeta-eth wants to merge 1 commit into
mainfrom
feat/vm-config-enhancements
Open

feat: vm name, mount_project, ubuntu-24.04, provision scripts, copy command, workdir#4
saeta-eth wants to merge 1 commit into
mainfrom
feat/vm-config-enhancements

Conversation

@saeta-eth
Copy link
Copy Markdown
Collaborator

Summary

  • [vm] name — fixed VM name overriding the hash-derived watermelon-{project}-{hash} default; enables targeting the same VM from any directory
  • [vm] mount_project — opt-out of bind-mounting the project dir into /project (defaults true via *bool); needed for VM-as-environment setups like the dev Docker host
  • [vm] image — adds ubuntu-24.04 support alongside the existing ubuntu-22.04 default
  • [provision] scripts — shell scripts to embed and run as root during provisioning; paths relative to project dir or absolute
  • [ide] workdir — override the remote directory opened by watermelon code
  • watermelon copy — new command wrapping limactl copy for host↔VM file transfer (-r for recursive)
  • --name flag on all commands (run, exec, stop, destroy, status, code, logs)
  • --workdir flag on watermelon run
  • VM name resolution order: --name flag → [vm] name in config → hash-derived fallback

Test plan

  • go test ./... passes (all new behaviour covered by unit tests)
  • watermelon run --name somospollo-vm targets a fixed-name VM without a config file
  • Config with mount_project = false generates Lima YAML with mounts: []
  • Config with image = "ubuntu-24.04" generates correct Lima image URLs
  • [provision] scripts content is embedded verbatim into Lima YAML provision blocks
  • watermelon copy ./file.txt myvm:/tmp/ and watermelon copy -r ./dir/ myvm:/tmp/ work end-to-end
  • watermelon code opens IDE at [ide] workdir when set

…py command, and workdir

New config fields:
- [vm] name: fixed VM name overriding the hash-derived default
- [vm] mount_project: opt out of bind-mounting the project dir (bool*, defaults true)
- [vm] image: ubuntu-24.04 support alongside existing ubuntu-22.04
- [provision] scripts: shell scripts embedded and run as root during provisioning
- [ide] workdir: override the remote directory opened by `watermelon code`

New command:
- watermelon copy <src> <dst> [-r]: wraps `limactl copy` for host↔VM file transfer

CLI changes:
- --name flag on all commands (run, exec, stop, destroy, status, code, logs)
- --workdir flag on `watermelon run`
- VM name resolution order: --name flag → [vm] name → hash-derived fallback

Docs updated: COMMANDS.md, CONFIG_SPEC.md, examples/monorepo, examples/ai-coding-assistants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant