what is ~/.op/config and how onepassword cli is going to use those details?

Just now I got to know about ~/.op/config file where user credentials are stored including shorthand.
1) What is the use of this file and how op cli is going to use?
2) If the user wants to use those details, what is the appropriate workflow?

Please attach links where I can go through along with your response.


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided

Comments

  • cohixcohix

    Team Member

    The config file essentially saves the information that the CLI needs to connect to your account, minus your master password. The CLI will use it automatically, there's no interaction needed on your part. The shorthand is generated the first time you use the CLI and is edited automatically as you use the tool.

    If you want to use the accounts in the config file, simply reference them by their shorthand: op signin [shorthand], and you will be prompted for your master password.

    There is also a latest_signin in the config file, which means that the account you signed into most recently can be used without specifying a shorthand: op signin.

    Please let me know if you have any further questions!

  • Hey If I want to disable that saving details into the file. Can I do it? I don't want to store the details in that file.

  • cohixcohix

    Team Member

    @sandeepmachiraju currently there is no way to disable use of the file. What is your use-case for having no file?

  • I am using CLI in automation. I really don't require the file to be there. Because everything will be provided runtime. I will be using the same syntax which expects every credential of op signin all the time.

    Anyways I can delete the file right? Will it be created every time?

  • cohixcohix

    Team Member

    You can indeed delete the file.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file