Step 1: Install 1Password CLI
Requirements
Requirements
- Mac
- Windows
- Linux
- 1Password subscription
- 1Password for Mac*
- macOS Big Sur 11.0.0 or later
- Mac
- Windows
- Linux
- homebrew
- Manual
- Use Homebrew to install 1Password CLI:
- Check that 1Password CLI installed successfully:
Step 2: Turn on the 1Password desktop 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. Open Developer settings if 1Password is installed on this device.
- Select Integrate with 1Password CLI.
- If you want to authenticate 1Password CLI with your fingerprint, turn on Touch ID in the app.
Step 3: Enter any command to sign in
If you have multiple accounts
If you’ve added multiple 1Password accounts to your desktop app, you can useop 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.
Learn more about using multiple accounts with 1Password CLI.
If the app integration doesn’t turn on
A few things can block the Integrate with 1Password CLI toggle or the fingerprint prompt:- Managed device policies: If your 1Password account is managed by your organization, an administrator may need to turn on the CLI integration for your team before the toggle is available to you. Check with your 1Password administrator, or see Set up your team to use 1Password developer tools.
- You’re prompted for your Secret Key instead of a fingerprint: This means the CLI is trying to sign in directly (
op signin) instead of using the desktop app integration. Confirm the app integration toggle is turned on in Settings > Developer, then run a command again — you should see a fingerprint or system authentication prompt instead of a Secret Key field. - No prompt appears at all: Make sure the 1Password app is open and unlocked, and that you’re running the command from the same user account the app is signed in to.
Next steps
- Get started with basic 1Password CLI commands.
- Set up 1Password Shell Plugins to handle authentication for your other command-line tools.
- Learn how to securely load secrets from your 1Password account without putting any plaintext secrets in code.