Skip to content

Conversation

@jandubois
Copy link
Member

Before:

l ls --yq 'env(HOME)'
/Users/janl ls --yq 'load("/usr/local/share/lima/templates/ubuntu.yaml")'
{
    "minimumLimaVersion": "2.0.0",
    "base": [
        "template:_images/ubuntu-25.10",
        "template:_default/mounts"
    ]
}

After:

l ls --yq 'env(HOME)'
FATA[0000] env operations have been disabledl ls --yq 'load("/usr/local/share/lima/templates/ubuntu.yaml")'
FATA[0000] file operations have been disabled

Addresses objections to using YQ expressions for limactl list --filter in #4187.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
@jandubois jandubois marked this pull request as draft January 16, 2026 02:40
@jandubois
Copy link
Member Author

Let's merge this PR after:

  • Add test for the yq multi-call binary

I've rebased the PR on latest master and added tests for the multi-call functionality.

  • Add a document to explain our "dialect" of yq language

I'm struggling to find a good place in the documentation for this. Like a place users would actually find.

I feel like we also need more documentation for the create --set option, including examples. This could go in the limactl create --help output, and could then mention the limitation on env and file operators in our YQ dialect. Other options could then point to it.

This might still be a bit unwieldy, so maybe we should start having "concept guides" the way git does it:

git help -g
The Git concept guides are:
   core-tutorial    A Git core tutorial for developers
   credentials      Providing usernames and passwords to Git
   cvs-migration    Git for CVS users
   diffcore         Tweaking diff output
   everyday         A useful minimum set of commands for Everyday Git
   faq              Frequently asked questions about using Git
   glossary         A Git Glossary
   namespaces       Git namespaces
   remote-helpers   Helper programs to interact with remote repositories
   submodules       Mounting one repository inside another
   tutorial         A tutorial introduction to Git
   tutorial-2       A tutorial introduction to Git: part two
   workflows        An overview of recommended workflows with Git

'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.

There is also kubectl options as another precedent; not sure if it has other meta commands.

Anyways, this is quickly becoming out-of-scope for this PR and should be in a separate docs PR.

@AkihiroSuda
Copy link
Member

Is this PR still a draft?

concept guides

This can be probably implemented using https://pkg.go.dev/github.com/spf13/cobra#Command.IsAdditionalHelpTopicCommand

@jandubois
Copy link
Member Author

Is this PR still a draft?

I turned it into a draft because we said yesterday it needs documentation before it can be merged, and the documentation is still outstanding (see my comments above).

The code is complete, if you are willing to create an issue for the docs and merge the code as-is.

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

@AkihiroSuda AkihiroSuda marked this pull request as ready for review January 16, 2026 04:40
@AkihiroSuda AkihiroSuda merged commit a4e47ed into lima-vm:master Jan 16, 2026
37 checks passed
@jandubois jandubois deleted the yqlib-security branch January 16, 2026 04:43
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.

2 participants