Forum Discussion

adrianbj's avatar
adrianbj
New Contributor
5 years ago

anyone have examples of editing existing Vault entries from CLI?

I have several vaults within our company's division where we would like to add more entries for all.
I am looking for a path that I can follow to automate this.
I understand the limitation, but are there any proven solutions?

I was expecting to be able to op get item(s) and pull the data in json format, modify this data to include the new entries that I wanted to add, and then import this in as a new item.

What would be the correct commands to accomplish this?


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided

11 Replies

  • Former Member's avatar
    Former Member

    Hey adrianbj,

    Just for clarification, do you mean adding new entries to a vault, or editing the information of existing entries?

    For the former, you can add new items to a vault with json using op encode < file.json with op create item as shown in the https://support.1password.com/command-line-reference/#create-item.

    For the latter, op edit item doesn't take json templates, but uses key-value assignment pairs like section.field=value. There are also unfortunately some limitations here, namely that you can't add a new field this way.