smartcat icon indicating copy to clipboard operation
smartcat copied to clipboard

feat: Allow the api_key_command to read from the stdin

Open DenisGorbachev opened this issue 1 year ago • 2 comments

DenisGorbachev avatar Jan 03 '25 08:01 DenisGorbachev

Hey @DenisGorbachev thank you for the contribution! Could you provide an example use case as well so I could update the doc? (or could you please directly add it?)

efugier avatar Feb 24 '25 00:02 efugier

Hey @efugier, I needed to read the Anthropic API key from OnePassword. OnePassword provides op CLI, so I needed to run op signin + op read. Note that op signin reads the password from stdin, which is why I patched smartcat to allow the api_key_command to read from stdin.

BTW, thank you for developing smartcat and adding the api_key_command option!

DenisGorbachev avatar Feb 27 '25 03:02 DenisGorbachev