Why does the 1P CLI not access the local 1P store?
👋
I have a shell script with lots of "secret references"...
export EXAMPLE1_API_KEY=$(op read "op://<VAULT_NAME>/<ENTRY_NAME>/<SECTION_NAME>/<FIELD_NAME>")
export EXAMPLE2_API_KEY=$(op read "op://<VAULT_NAME>/<ENTRY_NAME>/<SECTION_NAME>/<FIELD_NAME>")
export EXAMPLE3_API_KEY=$(op read "op://<VAULT_NAME>/<ENTRY_NAME>/<SECTION_NAME>/<FIELD_NAME>")
Every time I load my terminal shell it takes an age for each secret to load.
I was then told by someone that the 1P CLI doesn't actually communicate with the local 1Password app, but instead it goes remotely to fetch the data (which in the case of my friend, they couldn't load their shell once when 1Password had remote access issues, hence they discovered what was happening).
But for me, I'm wondering, is this why it can be so slow to load a terminal shell when you have lots of secret references? each secret, is a new CLI invocation, and then that has to be individually making remote calls with authorization etc etc.
Is there any way to speed this up?
Is there a reason for not consulting the local 1Password app data? Or does that 1P app not actually store any data and any time you're logging into that you're actually just doing a bunch of remote calls to pull data down?
Thanks!