account
Subcommands
- account add: Add an account to sign in to for the first time
- account forget: Remove a 1Password account from this device
- account get: Get details about your account
- account list: List users and accounts set up on this device
account add
Add a new 1Password account to 1Password CLI manually with your account password and Secret Key, instead of signing in using your 1Password app.
Flags
To sign in to manually-added accounts:
- Bash, Zsh, sh, fish
- PowerShell
Learn more about signing in manually.
When you sign in manually, 1Password CLI creates a session token and
sets the OP_SESSION
environment variable to it. Session tokens expire
after 30 minutes of inactivity, after which you’ll need to sign in again.
If you add multiple 1Password accounts, 1Password CLI determines which
to use in this order:
- An account specified with the
--account
flag. - An account specified with the
OP_ACCOUNT
environment variable. - The account most recently signed in to with
op signin
in the current terminal window.
Examples
Add an account using flags to specify account details:
Add an account and immediately sign in to it:
- Bash, Zsh, sh, fish
- PowerShell
Sign in to a specific account:
- Bash, Zsh, sh, fish
- PowerShell
account forget
Remove a 1Password account from this device.
Flags
account get
Get details about your account.
account list
List users and accounts set up on this device.