feature(cli): allow multiple template sources on command line#4557
Open
jkylling wants to merge 1 commit intolima-vm:masterfrom
Open
feature(cli): allow multiple template sources on command line#4557jkylling wants to merge 1 commit intolima-vm:masterfrom
jkylling wants to merge 1 commit intolima-vm:masterfrom
Conversation
ac6523c to
2583061
Compare
Enable passing multiple template files/URLs to `limactl create` and `limactl start`. Example usage: limactl create template:docker my-overrides.yaml limactl create https://example.com/base.yaml secrets.yaml This is equivalent to using the `base:` property in YAML: base: [https://example.com/template.yaml, $PWD/secrets.yaml] Fixes lima-vm#3404 Signed-off-by: Jonas Irgens Kylling <jkylling@gmail.com>
2583061 to
e9b3042
Compare
jandubois
requested changes
Feb 20, 2026
Member
There was a problem hiding this comment.
This PR drops most of the special cases for specifying templates on the command line. Even the simple single-arg case no longer works:
❯ limactl start template:alpine
FATA[0000] cannot derive instance name from "template:alpine": filename "template:alpine" is invalid: identifier "template:alpine" must match ^[A-Za-z0-9]+(?:[._-](?:[A-Za-z0-9]+))*$Using an image URL no longer creates a short instance name:
❯ limactl start https://dl-cdn.alpinelinux.org/alpine/v3.23/releases/cloud/nocloud_alpine-3.23.2-aarch64-uefi-cloudinit-r0.qcow2
? Creating an instance "nocloud_alpine-3.23.2-aarch64-uefi-cloudinit-r0.qcow2" Proceed with the current configuration
...It looks like the special handling for - (stdin) only works for the first argument.
I haven't reviewed the code yet, but we should probably start by creating a bunch of BATS tests for the current behaviour, so we can be sure refactoring to implement multiple input templates is not breaking any of them.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enable passing multiple template files/URLs to
limactl createandlimactl start.Example usage:
limactl create template:docker my-overrides.yaml
limactl create https://example.com/base.yaml secrets.yaml
This is equivalent to using the
base:property in YAML:base: [https://example.com/template.yaml, $PWD/secrets.yaml]
Fixes #3404