Skip to main content
January 24, 2023
Question

Time frame for "Create a 1Pass LOGIN ITEM from CLI with attached files/documents"

  • January 24, 2023
  • 3 replies
  • 97 views

There is a post from June of 22, discussion closed. Its been 7 months...
You documentation seems to indicate it is possible, but it doesn't seem to work yet from your latest CLI release as of 24 Jan 2023


1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Browser:_ Not Provided
Referrer: forum-search:https://1password.community/search?Search=op%20item%20create%20file

3 replies

Jack_P_1P
1Password Employee
January 31, 2023

Hi @RtotheK:

Thanks for reaching out about this! I just checked with the team, and it appears we may have missed it in the documentation. I've flagged it so we can get it added, but in the mean time, the syntax should look something like this:


op item create --category=login --title='My Example Item' --vault='Test' \
--url=https://www.acme.com/login --generate-password=20,letters,digits \
username=jane@acme.com \
'Test Field 1=my test secret' \
'Test Section 1.Test Field2[text]=Jane Doe' \
'Test Section 1.Test Field3[date]=1995-02-23' \
'My Attachment[file]=./path/to/file/'

Let me know how you get on with that.

Jack

February 1, 2023

Hey Jack, I've used similar invocations but I was omitting the [file]. That made the difference! Thank you!

Jack_P_1P
1Password Employee
February 3, 2023

Hi @RtotheK:

Glad to hear that helped! Feel free to get in touch if there's anything else we can help you with.

Jack