TIL that click, my favorite CLI processing toolkit, has a mechanism to determine how a CLI option was provided Context.get_parameter_source
Get the source of a parameter. This indicates the location from which the value of the parameter was obtained.
This can be useful for determining when a user specified a value on the command line that is the same as the default value. It will be DEFAULT only if the value was actually taken from the default.