Documentation Index Fetch the complete documentation index at: https://www.1password.dev/llms.txt
Use this file to discover all available pages before exploring further.
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 Supported shells: PowerShell Supported shells: Bash, Zsh, sh, fish
To install 1Password CLI with homebrew :
brew install 1password-cli
Check that 1Password CLI installed successfully:
To manually install 1Password CLI on macOS:
Download the latest release of 1Password CLI .
Package file : Open op.pkg and install 1Password CLI in the default location (usr/local/bin).
ZIP file : Open op.zip and unzip the file, then move op to usr/local/bin.
Check that 1Password CLI was installed successfully:
To install 1Password CLI with winget:
winget install 1password - cli
Check that 1Password CLI installed successfully:
To manually install 1Password CLI on Windows:
Download the latest release of 1Password CLI and extract op.exe.
Open PowerShell as an administrator .
Create a folder to move op.exe into. For example, C:\Program Files\1Password CLI.
mkdir "C:\Program Files\1Password CLI"
Move the op.exe file to the new folder.
mv ".\op.exe" "C:\Program Files\1Password CLI"
Add the folder containing the op.exe file to your PATH.
Windows 10 and later Search for Advanced System Settings in the Start menu. Select Environment Variables . In the System Variables section, select the PATH environment variable and select Edit . In the prompt, select New and add the directory where op.exe is located. Sign out and back in to Windows for the change to take effect.
Check that 1Password CLI installed successfully:
If you’d rather install 1Password CLI with a single block of commands, run the following in PowerShell as administrator: $arch = ( Get-CimInstance Win32_OperatingSystem).OSArchitecture
switch ( $arch ) {
'64-bit' { $opArch = 'amd64' ; break }
'32-bit' { $opArch = '386' ; break }
Default { Write-Error "Sorry, your operating system architecture ' $arch ' is unsupported" - ErrorAction Stop }
}
$installDir = Join-Path - Path $ env: ProgramFiles - ChildPath '1Password CLI'
Invoke-WebRequest - Uri "https://cache.agilebits.com/dist/1P/op2/pkg/v2.33.1/op_windows_ $( $opArch ) _v2.33.1.zip" - OutFile op.zip
Expand-Archive - Path op.zip - DestinationPath $installDir - Force
$envMachinePath = [ System.Environment ]::GetEnvironmentVariable( 'PATH' , 'machine' )
if ( $envMachinePath -split ';' -notcontains $installDir ){
[ Environment ]::SetEnvironmentVariable( 'PATH' , " $envMachinePath ; $installDir " , 'Machine' )
}
Remove-Item - Path op.zip
APT
YUM
Alpine
NixOS
Manual
To install 1Password CLI using APT on Debian- and Ubuntu-based distributions:
Run the following command:
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
sudo gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg && \
echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$( dpkg --print-architecture ) stable main" | \
sudo tee /etc/apt/sources.list.d/1password.list && \
sudo mkdir -p /etc/debsig/policies/AC2D62742012EA22/ && \
curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | \
sudo tee /etc/debsig/policies/AC2D62742012EA22/1password.pol && \
sudo mkdir -p /usr/share/debsig/keyrings/AC2D62742012EA22 && \
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
sudo gpg --dearmor --output /usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg && \
sudo apt update && sudo apt install 1password-cli
See a step-by-step version of the script
Add the key for the 1Password apt repository:
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
sudo gpg --dearmor --output /usr/share/keyrings/1password-archive-keyring.gpg
Add the 1Password apt repository:
echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/1password-archive-keyring.gpg] https://downloads.1password.com/linux/debian/$( dpkg --print-architecture ) stable main" |
sudo tee /etc/apt/sources.list.d/1password.list
Add the debsig-verify policy:
sudo mkdir -p /etc/debsig/policies/AC2D62742012EA22/
curl -sS https://downloads.1password.com/linux/debian/debsig/1password.pol | \
sudo tee /etc/debsig/policies/AC2D62742012EA22/1password.pol && \
sudo mkdir -p /usr/share/debsig/keyrings/AC2D62742012EA22 && \
curl -sS https://downloads.1password.com/linux/keys/1password.asc | \
sudo gpg --dearmor --output /usr/share/debsig/keyrings/AC2D62742012EA22/debsig.gpg
Install 1Password CLI:
sudo apt update && sudo apt install 1password-cli
Check that 1Password CLI installed successfully:
Alternatively, download the latest 1Password CLI .deb package directly from one of the following links: To install 1Password CLI using YUM on RPM-based distributions:
Run the following commands:
sudo rpm --import https://downloads.1password.com/linux/keys/1password.asc
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
sudo dnf check-update -y 1password-cli && sudo dnf install 1password-cli
The above script is comprised of the following steps
Import the public key:
sudo rpm --import https://downloads.1password.com/linux/keys/1password.asc
Configure the repository information:
sudo sh -c 'echo -e "[1password]\nname=1Password Stable Channel\nbaseurl=https://downloads.1password.com/linux/rpm/stable/\$basearch\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=\"https://downloads.1password.com/linux/keys/1password.asc\"" > /etc/yum.repos.d/1password.repo'
Install 1Password CLI:
sudo dnf check-update -y 1password-cli && sudo dnf install 1password-cli
Check that 1Password CLI installed successfully:
Alternatively, download the latest 1Password CLI .rpm package directly from one of the following links: To install 1Password CLI on Alpine x86_64 distributions:
Run the following commands:
echo https://downloads.1password.com/linux/alpinelinux/stable/ >> /etc/apk/repositories
wget https://downloads.1password.com/linux/keys/alpinelinux/support@1password.com-61ddfc31.rsa.pub -P /etc/apk/keys
apk update && apk add 1password-cli
The above script is comprised of the following steps
Add Password CLI to your list of repositories:
echo https://downloads.1password.com/linux/alpinelinux/stable/ >> /etc/apk/repositories
Add the public key to validate the APK to your keys directory:
wget https://downloads.1password.com/linux/keys/alpinelinux/support@1password.com-61ddfc31.rsa.pub -P /etc/apk/keys
Install 1Password CLI:
apk update && apk add 1password-cli
Check that 1Password CLI installed successfully:
The Nix package is available from the NixOS open source community.
To install 1Password CLI on your NixOS system:
Add 1Password to your /etc/nixos/configuration.nix file, or flake.nix if you’re using a flake. For example, the following snippet includes 1Password CLI and the 1Password app:
# NixOS has built-in modules to enable 1Password
# along with some pre-packaged configuration to make
# it work nicely. You can search what options exist
# in NixOS at https://search.nixos.org/options
# Enables the 1Password CLI
programs . _1password = { enable = true ; } ;
# Enables the 1Password desktop app
programs . _1password-gui = {
enable = true ;
# this makes system auth etc. work properly
polkitPolicyOwners = [ "<your-linux-username>" ];
} ;
After you make changes to your configuration file, apply them:
If you added 1Password to /etc.nixos/configuration.nix, run:
sudo nixos-rebuild switch
If you added 1Password to flake.nix, replace <flake-directory-path> with the directory your flake is in and <output-name> with the name of the flake output containing your system configuration, then run the command.
sudo nixos-rebuild switch --flake < flake-directory-pat h > .# < output-nam e >
Check that 1Password CLI installed successfully:
Learn more about using 1Password on NixOS. To install 1Password CLI on Linux without a package manager: ARCH = "<choose between 386/amd64/arm/arm64>" && \
wget "https://cache.agilebits.com/dist/1P/op2/pkg/v2.33.1/op_linux_${ ARCH }_v2.33.1.zip" -O op.zip && \
unzip -d op op.zip && \
sudo mv op/op /usr/local/bin/ && \
rm -r op.zip op && \
sudo groupadd -f onepassword-cli && \
sudo chgrp onepassword-cli /usr/local/bin/op && \
sudo chmod g+s /usr/local/bin/op
Or follow the extended guide
Download the latest release of 1Password CLI and extract it. To verify its authenticity:
gpg --keyserver keyserver.ubuntu.com --receive-keys 3FEF9748469ADBE15DA7CA80AC2D62742012EA22
gpg --verify op.sig op
Move op to /usr/local/bin, or another directory in your $PATH.
Check that 1Password CLI installed successfully:
Create the onepassword-cli group if it doesn’t yet exist:
sudo groupadd onepassword-cli
Set the correct permissions on the op binary:
sudo chgrp onepassword-cli /usr/local/bin/op && \
sudo chmod g+s /usr/local/bin/op
Step 2: Turn on the 1Password desktop app integration
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 .
Learn more about the 1Password desktop app integration.
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.
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.
Learn more