Skip to main content
1Password CLI supports item JSON templates that you can use to take control of how you create items in 1Password. Item JSON templates allow you to create an item with all of its details specified, including custom sections and fields. Item templates are formatted similarly to the JSON output for op item get, so you can easily create new items based on existing items. Each item category has its own template. You can get a list of all item categories with op item template list. And you can retrieve the template for an item category with op item template get <category>.

Item template keys

Item JSON templates have common language keys that allow you to identify how the fields in the template correspond to the item in 1Password.
Item Section To add a custom section, insert a section JSON object into the sections array.
Field To add a custom field to the template, insert a new field JSON object into the fields array.

Example JSON representation

This is an item mysql in the 1Password app, and the same item represented in an item JSON template.
MySQL item in 1Password

Learn more