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

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

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

Possible options might include:

MEGA_CONFIG_FILE Path to read the megarc from. All other configs ignored.
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)

Ryan Delaney