Skip to content

Conversation

jandubois
Copy link
Member

@jandubois jandubois commented Sep 7, 2025

Fixes #3984

It makes sure YAML uses the same key names as JSON for the 4 host properties, and it inlines the instance properties into the root object:

l ls default --format json | yq .HostOS
darwinl ls default --format yaml | yq .HostOS
darwinl ls default --format json | yq .config.user
{"name": "jan", "comment": "Jan Dubois", "home": "/home/jan.linux", "shell": "/bin/bash", "uid": 501}l ls default --format yaml | yq .config.user
name: jan
comment: Jan Dubois
home: /home/jan.linux
shell: /bin/bash
uid: 501

@jandubois
Copy link
Member Author

Just noticed that this PR does not include this part of my suggested solution:

  • We add the 4 host settings to limactl info output

I would still like to hear some feedback if that is what we want to do. I can add it to this PR, or create a separate one...

@jandubois
Copy link
Member Author

  • We add the 4 host settings to limactl info output

I've added hostArch, hostOS, and identityFile to limactl info (it already has limaHome).

I lower-cased the key names to match the existing naming scheme for limactl info output.

@jandubois
Copy link
Member Author

I've added one more commit to "deprecate" the host fields, so they don't show up in limactl ls --list-fields, but still exist in the JSON object:

l ls default --json | yq .HostOS
darwinl ls --list-fields | grep HostOS

@jandubois jandubois requested a review from a team September 7, 2025 19:48
AkihiroSuda
AkihiroSuda previously approved these changes Sep 8, 2025
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

These fields are added in `limactl ls` to each instance, but they are
global values and don't belong there. The LimaHome field already existed
in `limactl info`.

The field names start with lowercase to match the existing naming scheme.

Signed-off-by: Jan Dubois <[email protected]>
The fields still exist, but are no longer list by `limactl ls --list-fields`.

Signed-off-by: Jan Dubois <[email protected]>
@AkihiroSuda AkihiroSuda merged commit 02934b9 into lima-vm:master Sep 8, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

limactl list produces different data for json vs. yaml output
2 participants