Closed mohammedTalukder closed 2 months ago
I just discovered this,
SL_API_KEY=$(slcli --apikey $(op item get ITEM --vault VAULT_NAME --fields FIELD)
$ export SL_API_KEY
$ slcli --really hw detail ...
so, that's an alternative
Yeah, SL_API_KEY
would be the way to do that, having a CLI option isn't ideal since it would put your api key into the bash_history.
If you have any other suggestions though please let me know, always happy to hear them.
What are you trying to do? Hi, I'm currently using
slcli
with a config file, so the credentials and endpoint are read from there. However, I'm wondering if it's possible to pass the credentials at runtime, such as:This would be useful because we manage multiple accounts, and we frequently change API keys. Our team uses 1Password to manage secrets, and our internal tool integrates with it.
If the
--apikey
parameter could be supplied directly, we could retrieve the API key from 1Password like this:That would make life a little simpler :-)