sops icon indicating copy to clipboard operation
sops copied to clipboard

Missing cli option for SOPS_AGE_KEY_FILE

Open sspreitzer opened this issue 6 months ago • 3 comments

sops misses a cli option for the SOPS_AGE_KEY_FILE environment variable.

sspreitzer avatar Jul 06 '25 12:07 sspreitzer

There are also CLI options missing for various other environment variables supported by the age store, and other stores. I'm not sure whether it's feasible / a good idea to add CLI options for all of these.

Out of curiosity, why do you need a CLI option (instead of setting the env variable) for this specific setting?

felixfontein avatar Aug 30 '25 08:08 felixfontein

Out of curiosity, why do you need a CLI option (instead of setting the env variable) for this specific setting?

I am working with Unix based systems since 1996. POSIX applications mainly use cli parameters instead of environment variables to control their cli based user calling behaviour. This is a widespread standard, which has established itself over decades. Insofar it is unexpected in the Unix, Linux sphere for an application to mainly rely on environment variables for controlling the application's behaviour, without offering a cli parameter alongside. But there are cases that make sense and it is afaik not mandatory.

You are twisting the historical expectations upside down by mainly relying on environment variables and not providing application parameters to control the behaviour. This is today rather unexpected, if there is not a use-case justification. Which I do not see to apply on sops.

References:

sspreitzer avatar Aug 30 '25 08:08 sspreitzer

I tend to agree, it is very unconventional for a CLI program to only offer env var as the mode of configuration.

Ramblurr avatar Oct 03 '25 08:10 Ramblurr