Skip to main content

Get started with 1Password CLI

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

Requirements

Supported shells: Bash, Zsh, sh, fish

*Required to integrate 1Password CLI with the 1Password app.
  1. To install 1Password CLI with homebrew:

  2. Check that 1Password CLI installed successfully:

Step 2: Turn on the 1Password desktop app integration

  1. Open and unlock the 1Password app.
  2. Click your account or collection at the top of the sidebar.
  3. Navigate to Settings > Developer.
  4. Select Integrate with 1Password CLI.
  5. If you want to authenticate 1Password CLI with your fingerprint, turn on Touch ID in the app.
The 1Password Developer settings pane with the Integrate with 1Password CLI option selected.The 1Password Developer settings pane with the Integrate with 1Password CLI option selected.
If you don't want to use 1Password CLI with the 1Password desktop app, learn how to sign in to your 1Password account manually instead.

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.

Run this command to see all the vaults in your account:

If you use multiple accounts, enter op signin to switch between accounts. You can also specify an account to sign in to with the --account flag or by setting the OP_ACCOUNT environment variable.

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.

Was this page helpful?