Introduce a config file?

Author: meejahCreated Dec 9, 2025Updated Dec 10, 2025
Labelsenhancementhelp wantedquestion

Comments like https://github.com/magic-wormhole/magic-wormhole/issues/609#issuecomment-3512128734 indicate a user desire to set different defaults.

For some options, there are environment variables which offer one option.

The above comment suggests a config-file.

I'm not aware of a general solution for Click-based TUIs, but the idea would be to use the "default map" in Click to pull defaults from a config-file (if available). The platformdirs package provides a way to learn what a good platform-specific directory for where to look for this file is.

It would likely be best if there was an automated / predictable mapping from CLI option to config-file variable, so that e.g. new releases with new options do not "forget" to add them.

(Added the "question" tag until we determine a good approach and definite end-goal here).

Source: magic-wormhole/magic-wormhole