Use the 1Password desktop app to sign in to 1Password CLI
You can use the 1Password desktop app integration to quickly and securely sign in to 1Password CLI. The app integration allows you to:
- Seamlessly sign to the 1Password accounts you've added to the app in your terminal.
- Authenticate 1Password CLI the same way you unlock your device, like with your fingerprint, face, Apple Watch, Windows Hello PIN, or device user password.
- Track recent 1Password CLI activity from your 1Password app.
Requirements
- Mac
- Windows
- Linux
- 1Password subscription
- 1Password for Linux
- PolKit (included in many popular distributions)
- A PolKit authentication agent running
Set up the app integration
Step 1: Turn on the app integration
- Mac
- Windows
- Linux
- Open and unlock the 1Password app.
- Select your account or collection at the top of the sidebar.
- Navigate to Settings > Developer.
- Select Integrate with 1Password CLI.
- If you want to authenticate 1Password CLI with your fingerprint, turn on Touch ID in the app.


- Open and unlock the 1Password app.
- Select your account or collection at the top of the sidebar.
- Turn on Windows Hello in the app.
- Navigate to Settings > Developer.
- Select Integrate with 1Password CLI.


- Open and unlock the 1Password app.
- Select your account or collection at the top of the sidebar.
- Navigate to Settings > Security.
- Turn on Unlock using system authentication.
- Navigate to Settings > Developer.
- Select Integrate with 1Password CLI.


Step 2: Enter any command to sign in
After you've turned on the app integration, enter any command and you'll be prompted to authenticate. For example, run this command to see all the vaults in your account:
If you have multiple accounts
If you've added multiple 1Password accounts to your desktop app, you can use op signin
to select an account to sign in to with 1Password CLI. Use the arrow keys to choose from the list of all accounts added to your 1Password app.
See result...
You can also select an account on a per-command basis using the --account
flag with your account's sign-in address or ID.
If you're signed in to multiple accounts in the app but only want to use a specific account with 1Password CLI, you can set the OP_ACCOUNT
environment variable to your account's sign-in address or ID.
Optional: Remove previously added account details
Make sure you have access to your Secret Key and account password before removing account details from your configuration file.
If you previously added an account to 1Password CLI manually and now want to exclusively use the 1Password app to sign in, you can remove your account details from your configuration file.
Your configuration file is in one of the following locations:
~/.op/config
~/.config/op/config
~/.config/.op/config
Use the account forget command to remove all existing account information from your configuration file. This won't impact the accounts added to your 1Password app.
Optional: Set the biometric unlock environment variable
You can use the OP_BIOMETRIC_UNLOCK_ENABLED
environment variable to temporarily toggle the app integration on or off.
- Bash, Zsh, sh
- fish
- PowerShell
To turn on the integration:
To turn off the integration:
To turn on the integration:
To turn off the integration:
To turn on the integration:
To turn off the integration:
Track 1Password CLI activity
You can track 1Password CLI activity authenticated with the 1Password app, including the command, when it was run, the application where it was run, and the name of the account accessed.
To see your 1Password CLI activity log:
- Open and unlock the 1Password desktop app.
- Select your account or collection at the top of the sidebar and choose Settings > Developer.
- Turn on Show 1Password Developer in Sidebar.
- Close the settings window, then select Developer in the sidebar.
- Select View CLI.


You'll see a table with your recent 1Password CLI activity.
Learn more about 1Password Developer.
Troubleshooting
If op signin
doesn't list your account
op signin
returns a list of all accounts you've added to the 1Password desktop app. To sign in to 1Password CLI with a new 1Password account, you'll need to add the account to the app.
If you see a connection error
If you see a connectionreset
error, or an error that 1Password CLI couldn't connect to the 1Password desktop app, try the following:
- Mac
- Windows
- Linux
Open System Settings > General > Login Items and make sure Allow in background is turned on for 1Password.
If you still see an error, try the following:
- Make sure you're using the latest version of the 1Password desktop app.
- Restart the app.
If you're using 1Password for Mac version 8.10.12 or earlier, the 1Password CLI binary must be located in the /usr/local/bin/
directory.
- Make sure you're using the latest version of the 1Password desktop app.
- Restart the app.
- Make sure you're using the latest version of the 1Password desktop app.
- Restart the app.
If you see a LostConnectionToApp
error when you try to authenticate:
- Mac
- Windows
- Linux
Make sure the option to keep 1Password in the menu bar is turned on:
- Open and unlock the 1Password desktop app.
- Select your account or collection at the top of the sidebar.
- Select Settings > General.
- Make sure "Keep 1Password in the menu bar" is selected.
Make sure the option to keep 1Password in the notification area is turned on:
- Open and unlock the 1Password desktop app.
- Select your account or collection at the top of the sidebar.
- Select Settings > General.
- Make sure "Keep 1Password in the notification area" is selected.
Make sure the option to keep 1Password in the system tray is turned on:
- Open and unlock the 1Password desktop app.
- Select your account or collection at the top of the sidebar.
- Select Settings > General.
- Make sure "Keep 1Password in the system tray" is selected.
If you aren't prompted to authenticate with your preferred method
If you've turned on the app integration, but aren't prompted to sign in to 1Password CLI with your expected authentication method:
- Mac
- Windows
- Linux
Make sure you've set up Touch ID or an Apple Watch to unlock 1Password on your Mac.
Make sure you've set up Windows Hello to unlock 1Password on your Windows PC.
- Make sure you've set up system authentication to unlock 1Password on your Linux computer.
- Update the authentication method in your Linux settings to use a fingerprint or other biometrics instead of your Linux user password.