Sign in or out
To sign in to an account and get a session token:--shorthand option.
Hyphens (-) in a subdomain will be changed to an underscore (_).
See also Appendix: Session management.
Sign out
Sessions automatically expire after 30 minutes of inactivity. You can sign out manually using thesignout command:
List objects
To list objects in a 1Password account:List Activity Log events
1Password BusinessThe Activity Log is only available for 1Password Business accounts.
List events after a specific log entry
You can provide an event ID (eid) as a starting point for listing entries by using the --eventid option. A maximum of 100 events will be returned, starting after, but not including, the provided event.
List events before a specific log entry
The--older option can be used with the --eventid option to list entries that occurred before the provided event ID.
Manage objects
Get details
To get details about an object:--include-archive option will allow for items in the Archive to be returned.
To get the UUID of an object, look it up by name, email address, or domain. See also Appendix: Specifying objects.
Get details of an item
By default,op get item gets details of all fields. You can get details of just the fields you want instead. For one field, 1Password CLI returns a simple string:
--format option.
Create or edit an item
To create an item:If you can’t trust other users or processes on your system, use
op create item <category> --template=file.json instead.name or n).
--generate-password option. By default, it will create a 32-character password made up of letters, numbers, and symbols.
See also Appendix: Categories for a list of categories.
See also Appendix: Specifying objects.
When you create an item, its UUID is returned.
Delete an item
To delete an item:--archive option to move it to the Archive instead.
See also Appendix: Specifying objects.
Create or remove a vault
To create a vault:--allow-admins-to-manage option to specify whether administrators can manage access to the vault or not. If not provided, the default policy for the account applies.
To remove a vault:
Work with documents
To create a document:stdout) by default. Use the --output option to save the document to a file directly. It won’t overwrite an existing file unless it’s empty.
To delete a document:
--archive option to move it to the Archive instead.
See also Appendix: Specifying objects.
Manage users and groups
Invite and confirm users
To create and invite a new user:--all option confirms all users pending confirmation.
Get user details
To get details about a user:--publickey or --fingerprint options are used, only the user’s public key or public key fingerprint is returned.
Edit users and groups
To edit a user’s name:Suspend or reactivate a user
To suspend or reactivate a user:Remove a user
To completely remove a user:Manage individual access
To grant a user access to a vault or group:Manage group access
To grant a group access to a vault:Create or remove a group
To create a group:Appendix: Checking for updates
To check for updates to 1Password CLI:--directory option.
Appendix: Specifying objects
Every object can be specified by UUID or name. Users and items can also be specified by email address and domain, respectively.
When specifying by UUID, the item or its details will be returned, even if the item is in the Archive. You don’t need to specify
--include-archive.
Appendix: Categories
- API Credential
- Bank Account
- Credit Card
- Database
- Document
- Driver License
- Email Account
- Identity
- Login
- Membership
- Outdoor License
- Passport
- Password
- Reward Program
- Secure Note
- Server
- Social Security Number
- Software License
- Wireless Router
Appendix: Session management
op signin will prompt you for your 1Password account password and output a command that can save your session token to an environment variable:
export command manually, or use eval (Mac, Linux) or Invoke-Expression (Windows) to set it automatically.
On Mac and Linux:
Use with multiple accounts
Commands that you run will use the account you signed in to most recently. To run a command using a specific account, use--account <shorthand>:
--raw option to get the token. Then use --session <session_token> with any command: