`multipass get` command

See also: get & set keys

The multipass get command retrieves the value of a single setting specified by a “key” argument. This key takes the form of a dot-separated path in a hierarchical settings tree:

$ multipass get client.gui.autostart
true

Available settings are documented in the reference.


The full multipass help get output explains the available options:

$ multipass help get
Usage: multipass get [options] <key>
Get the configuration setting corresponding to the given key.

Keys:
  client.gui.autostart
  client.gui.hotkey
  client.primary-name
  local.bridged-network
  local.driver
  local.privileged-mounts

Options:
  -h, --help     Display this help
  -v, --verbose  Increase logging verbosity. Repeat the 'v' in the short option
                 for more detail. Maximum verbosity is obtained with 4 (or more)
                 v's, i.e. -vvvv.
  --raw          Output in raw format. For now, this affects only the
                 representation of empty values (i.e. "" instead of "<empty>").

Arguments:
  key            Path to the setting whose configured value should be obtained.

Am I missing it, or is there no means to get this list of available properties via a multipass subcommand? I tried multipass get ---all but that was not recognized. :slight_smile:

Hi @carehart, the list of available settings is currently only in the help text and in documentation (e.g. in the post above).

This will soon change, with Multipass gaining some dynamic settings. When that lands, you’ll be able to find what settings are available at any point in time with a --keys flag: multipass get --keys. Not just yet, though.

Ah, ok. Thanks. It wasn’t clear if either was indeed the complete list of all available keys.

Indeed, it may interest someone there to hear that the list in the docs here shows only 4 keys (as of today):

  • client.gui.autostart
  • client.gui.hotkey
  • client.primary-name
  • local.driver

…while the list offered in the help shows 7:

  • client.apps.windows-terminal.profiles
  • client.gui.autostart
  • client.gui.hotkey
  • client.primary-name
  • local.bridged-network
  • local.driver
  • local.privileged-mounts

I’ll assume the latter is accurate and that the docs for now have just not been updated. And rather than propose a doc change, I’ll leave this for someone there to consider, as perhaps there are environmental factors that explain the differences, and you may prefer your own way to document that. (I’m on Windows, for example, and the first one is clearly windows-specific. FWIW, my multipass version reports 1.8.0+win.)

Hope that’s helpful.

Thanks @carehart. You’re right, the help text there is indeed outdated. All settings were documented here when I replied (above the help text), but I have since extracted them into their own documents. They are now grouped under “Settings” in our reference.

BTW, those docs are generated from the discourse posts, but provide a hopefully better format for consumption :slight_smile: And the get command is also changing soon. If you’re interested, here is a preview of what we’re planing.

Thanks for that, and yep, for that new discussion in the preview for GET, which does look nice. :slight_smile:

1 Like

Help text is now fixed too.

1 Like