Skip to main content
1Password CLI brings 1Password to your terminal. Learn how to install the CLI, then integrate it with your 1Password app and sign in with Touch ID, Windows Hello, or another system authentication option.

Step 1: Install 1Password CLI

Supported shells: Bash, Zsh, sh, fish*Required to integrate 1Password CLI with the 1Password app.
  1. Use Homebrew to install 1Password CLI:
  2. Check that 1Password CLI installed successfully:
The1Password Homebrew caskis maintained by both Homebrew and 1Password developers in the open-sourceHomebrew Cask repository.1Password CLI downloads from our CDN on agilebits.net/.com domains.
Installing inside WSL? The desktop app integration authenticates over a local connection to the 1Password app on your Windows host, so it isn’t available to a CLI binary installed inside the Linux side of WSL. Install 1Password CLI on Windows, then call the Windows op.exe from your WSL shell (or add it to your WSL PATH) — the same approach used by the 1Password SSH agent WSL integration.

Step 2: Turn on the 1Password desktop app integration

  1. Open and unlock the 1Password app.
  2. Select your account or collection at the top of the sidebar.
  3. Navigate to Settings > Developer. Open Developer settings if 1Password is installed on this device.
  4. Select Integrate with 1Password CLI.
  5. If you want to authenticate 1Password CLI with your fingerprint, turn on Touch ID in the app.
Learn more about the 1Password desktop app integration.
You can also authenticate 1Password CLI using a service account token scoped to specific vaults or Environments. We recommend using service accounts for shared building, automated access, and headless server authentication.

Step 3: 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. 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

  1. Get started with basic 1Password CLI commands.
  2. Set up 1Password Shell Plugins to handle authentication for your other command-line tools.
  3. Learn how to securely load secrets from your 1Password account without putting any plaintext secrets in code.

Learn more