lima-vm/lima · error
option --quiet can only be used with '--format table'
Error message
option --quiet can only be used with '--format table'
What it means
--quiet is implemented only for the table format, where it prints just the instance names. With any other format it has no defined behavior, so listAction requires format == "table" (the default) when --quiet is set.
Source
Thrown at cmd/limactl/list.go:182
if listFields && cmd.Flags().Changed("format") {
return errors.New("option --list-fields conflicts with option --format")
}
if len(yq) != 0 {
if cmd.Flags().Changed("format") && format != "json" && format != "yaml" {
return errors.New("option --yq only works with --format json or yaml")
}
if listFields {
return errors.New("option --list-fields conflicts with option --yq")
}
}
if len(filter) != 0 {
if listFields {
return errors.New("option --list-fields conflicts with option --filter")
}
}
if quiet && format != "table" {
return errors.New("option --quiet can only be used with '--format table'")
}
if listFields {
names := fieldNames()
slices.Sort(names)
fmt.Fprintln(cmd.OutOrStdout(), strings.Join(names, "\n"))
return nil
}
if err := store.Validate(); err != nil {
logrus.Warnf("The directory %#q does not look like a valid Lima directory: %v", store.Directory(), err)
}
allInstances, err := store.Instances()
if err != nil {
return err
}
if len(args) == 0 && len(allInstances) == 0 {View on GitHub (pinned to dd909d0973)
Solutions
- Use `--quiet` with the default table format when you only need instance names
- For machine-readable output, drop --quiet and use `--format json` (filter fields with --yq if needed)
Example fix
// before limactl list --quiet --format json // after limactl list --format json --yq '.[].name'
Defensive patterns
Strategy: validation
Validate before calling
args := os.Args[1:]
if slices.Contains(args, "--quiet") && hasNonTableFormat(args) {
args = slices.DeleteFunc(args, func(a string) bool { return a == "--quiet" })
}
func hasNonTableFormat(args []string) bool {
for i, a := range args {
if a == "--format" && i+1 < len(args) && args[i+1] != "table" { return true }
if a == "--json" { return true } // implies format json
}
return false
} Try / catch
if err := runList(); err != nil {
if strings.Contains(err.Error(), "--quiet can only be used with") { /* retry with --format json and yq */ }
return err
} Prevention
- Use --quiet only with the default table format
- For scripts, prefer --format json --yq '.[].name' over --quiet
- Check flag combinations before composing list commands
When it happens
Trigger: Running `limactl list --quiet --format json` (or yaml/custom) — quiet is true and format is not "table". Note --quiet with --json also fails because --json sets format to "json".
Common situations: Scripts that previously used plain `--quiet` later gaining a --format flag for machine output; users expecting --quiet to strip output in every format.
Related errors
- option --json conflicts with option --format
- option --list-fields conflicts with option --format
- option --yq only works with --format json or yaml
- option --list-fields conflicts with option --yq
- option --list-fields conflicts with option --filter
AI-assisted analysis of lima-vm/lima@dd909d0973 (2026-09-01).
Data as JSON: /api/errors/8545fb0a570e8a10.
Report an issue: GitHub.