Deal with linked files

Xat
Xat
Community Member
edited October 2021 in CLI

Hello Team,

From the macOS app I've created a secret that stores a password and private files. Files are linked with the item using the "Add a new file" button.

Now, I am trying to retrieve these files from the CLI.

I though I could be able to get them playing with documents, but actually these files are not document :

$ op list documents --vault myvault
[]

So I've looked at items that seems more relevant :

$ op get item 7es2m2yr5bh2hpbkjz7tjpxbli --vault myvault

{
"uuid": "7es2m2yr5bh2hpbkjz7tjpxbli",
"templateUuid": "001",
"trashed": "N",
"createdAt": "2021-10-16T09:38:18Z",
"updatedAt": "2021-10-16T09:54:43Z",
"changerUuid": "KSQCVM7WXNEL7NH63HICSNPJL4",
"itemVersion": 7,
"vaultUuid": "lomdseaojjc7vhc4757piqmkti",
"details": {
"fields": [
{
"designation": "username",
"name": "username",
"type": "T",
"value": ""
},
{
"designation": "password",
"name": "password",
"type": "P",
"value": "xxxxxxxxx"
}
],
"notesPlain": "",
"passwordHistory": [],
"sections": [
{
"fields": [
{
"k": "reference",
"n": "141DEE586EE449F89D55FE39080E43D7",
"t": ""
}
],
"name": "linked items",
"title": "Éléments liés"
},
{
"fields": [
{
"k": "file",
"n": "4A6C13A5D4C04DD4A57AEB82260F31EA",
"t": "",
"v": {
"documentId": "bmfvpzsn5rhvvfgtmdlmsq5tqq",
"encryptedSize": 613807,
"encryptionKey": {
"alg": "A256GCM",
"kid": "5spq7fnwdfbwtj7omk74uz45fy",
"k": "MeeEoZmNaT6qf0eepibqhrvTJDsXSUoAIxPuB5UucOo",
"key_ops": [
"encrypt",
"decrypt"
],
"ext": true,
"kty": "oct"
},
"fileName": "ids.pdf",
"integrityHash": "azbZ4EdpostqPncrFVXO48_QrtMs-2ycRrscYMtzUxQ",
"nonce": "53iJZMj0G17AY0Om",
"signingKey": {
"alg": "A256GCM",
"kid": "QVIXC4Q5FNDJPBBS6A7AQ5BZQM",
"k": "dgKkZBojQpmjLdtcsDgmdVsZIHwqamkn-vEVkQLaM7c",
"key_ops": [
"encrypt",
"decrypt"
],
"ext": true,
"kty": "oct"
},
"unencryptedSize": 613791,
"uti": "com.adobe.pdf"
}
}
],
"name": "add more",
"title": ""
}
]
},
"overview": {
"ainfo": "—",
"ps": 0,
"title": "test"
}
}

Here I can see the file, but I am not able to get it from the CLI.

Of course, using the GUI I am able to retrieve it. But not using the CLI.
So my need is to retrieve files from item using the CLI.

Is there a way to do this ?

Thanks a lot.
Regards,
JD


1Password Version: 1.12.2
Extension Version: Not Provided
OS Version: macOS Big Sur

Comments

  • Hello @Xat

    I am a developer in the team responsible for working on the 1Password CLI tool.

    We have recently introduced files as item fields in many of our clients. We haven't yet introduced the ability to create, edit, or retrieve file fields in the CLI yet.

    We do have an open issue to implement support for creating, and editing items with file field types, and also the ability to download a file specified by a file field.

    Please let us know if there are any other features regarding item field types you would like to see introduced in the CLI and I'd be happy to pitch it to the team on your behalf!

  • Xat
    Xat
    Community Member

    Hello @Justin.Yoon_1P , I am new with 1password and for now I would want to handle (list, get, delete, create) files within an item.

    With the possiblity to create a local file on the workstation when getting the file which is in an item.

    Thanks team.

  • Will keep those in mind, Thanks @Xat !

  • mwean
    mwean
    Community Member

    I need this too. I use it for things like adding license files to new computers (so I don't have to store them in plaintext in my dotfiles).

  • Hey @mwean -

    Thanks for letting us know this is functionality that would be useful to you as well. I will be sure to pass that along to the team.

    April

  • Xat
    Xat
    Community Member

    Guys,

    can I follow the development of this feature somewhere ? Plus, want to be on touch when it will become available.

    Thanks

  • ag_ana
    ag_ana
    1Password Alumni

    @Xat:

    You can mark this forum discussion as favorite if you want to be notified of any future messages here:

    You can also keep an eye out on the release notes on our website, we publish all changes there when a new version becomes available :+1:

This discussion has been closed.