New! Use the 1Password Credential Broker to give CI/CD and other machine workflows short-lived access to secrets, without managing service account tokens.
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.
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’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.You can also select an account on a per-command basis using the --account flag with your account’s sign-in address or ID.
op vault ls --account my.1password.com
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.
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.
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 Developer in the sidebar.
Select View CLI.
You’ll see a table with your recent 1Password CLI activity.Your activity log data is encrypted on your device. Older entries get purged regularly, and you can manually clear your activity log data at any time. If you don’t want to use activity logging, turn off Record and display activity in the 1Password Developer settings.
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 “No accounts configured” on macOS 27 Golden Gate
If you updated to macOS 27 Golden Gate and 1Password CLI commands return No accounts configured for use with 1Password CLI, even though you’ve turned on the app integration, macOS may be blocking your terminal from accessing data from the 1Password app. To allow access:
Open System Settings > Privacy & Security > Files & Folders.
Select the app you use to run commands, like Terminal, iTerm, or Ghostty. If you use a terminal built into an editor, like Visual Studio Code or Cursor, select the editor.
Turn on the setting that starts with “Data shared by 1Password”. The rest of the name depends on which 1Password apps you’ve installed.
Quit and reopen your terminal, then try your command again.
If you don’t see the “Data shared by 1Password” setting, run a 1Password CLI or SSH command in that terminal and select Allow when macOS asks to access data from other apps. Then check again.If you use more than one terminal, turn on the setting for each one.