`multipass get` command

See also: set

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

In order to get a list of all available keys, the --keys option can be used.

$ multipass get --keys

In order to set the value of setting, see set.
You can read more about settings in the reference.

The full multipass help get output explains the available options:

$ multipass help get
Usage: multipass get [options] [<arg>]
Get the configuration setting corresponding to the given key, or all settings if no key is specified.
(Support for multiple keys and wildcards coming...)

Some common settings keys are:
  - client.gui.autostart
  - local.driver
  - local.privileged-mounts

Use `multipass get --keys` to obtain the full list of available settings at any given time.

  -h, --help     Displays help on commandline options
  -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>").
  --keys         List available settings keys. This outputs the whole list of
                 currently available settings keys, or just <arg>, if provided
                 and a valid key.

  arg            Setting key, i.e. path to the intended setting.

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