config
Read and change CLI settings (config file, keys masked). The `machinemail config` commands: arguments, flags, examples and the API routes they call.
Read and change CLI settings (config file, keys masked).
| Command | Summary |
|---|---|
config get | Print the value of a config key in effect |
config list | Print the config file, keys masked |
config path | Print the config file path |
config set | Set a config key |
config unset | Remove a config key (back to its default) |
Every command also takes the global flags.
config get
Print the value of a config key in effect.
Prints the value the CLI will actually use, after flags and environment variables (so base_url is the default when nothing is set). api_key is always masked. With —json it also says where the value came from.
Arguments
<key>stringRequiredExamples
config list
Print the config file, keys masked.
Also: machinemail config ls, machinemail config show.
Every value stored in the config file as key=value lines, with API keys masked. Use machinemail config get <key> for the value in effect after flags and environment variables.
Examples
config path
Print the config file path.
The config file is $XDG_CONFIG_HOME/machinemail/config.json (or ~/.config/machinemail/config.json), written with mode 0600. MACHINEMAIL_CLI_CONFIG points at another file.
Examples
config set
Set a config key.
Per-profile keys (base_url, api_key) go to the current profile, or the one named with —profile, which is created if needed. For api_key pass - to read it from stdin; machinemail login is better, since it checks the key first.
Arguments
<key>stringRequired<value>stringRequiredExamples
config unset
Remove a config key (back to its default).
Arguments
<key>stringRequired