Subject: Allow changing configuration options with environment variables
From: Ryan Delaney
Date: Tue, 7 Jan 2020 18:43:56 -0800
Hello,

Reading secrets from environment variables is generally safer than reading
them from plain text files on disk. Reading secrets from command-line
arguments is also contraindicated because:

1. It is likely to be stored in the shell history
2. It is certain that all arguments are leaked to the process table
<https://www.netmeister.org/blog/passing-passwords.html>

Also, allowing configuration options to be set with environment variables
would enable convenient integration with direnv <https://direnv.net> for
using per-directory settings.

Possible options might include:

MEGA_CONFIG_FILE Path to read the megarc from. All other configs ignored.
MEGA_USERNAME
MEGA_PASSWORD
MEGA_SPEED_LIMIT Set both the upload and download speed limits
MEGA_DOWNLOAD_LIMIT Override other settings for the download speed limit
MEGA_UPLOAD_LIMIT Override other settings for the download speed limit
MEGA_CREATE_PREVIEWS If set, create previews
MEGA_NOCREATE_PREVIEWS If set, do not create previews
MEGA_PROXY Proxy URL, e.g. for SOCKS/tor etc
MEGA_CACHE_TIMEOUT Cache timeout in seconds (default: 6000)

Etc.
--
Regards,
Ryan Delaney
ryan.delaney@gmail.com