lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 292 forks source link

The show command's JSON output doesn't include attachments #547

Open Michael-F-Bryan opened 4 years ago

Michael-F-Bryan commented 4 years ago

When running lpass show --json, there's no way to see which files are attached.

Ideally, you could do something like this:

$ lpass show "SSH Keys" --json
[
  {
    "id": "123456789",
    "name": "SSH Keys",
    "fullname": "Dev/SSH Keys",
    ...
    "attachments": [
        { "filename": "id_rsa.pub", "id": "123456789", "size": 100 },
         "filename": "id_rsa", "id": "123456789", "size": 200 }
    ]
  }
]

So the "attachments" key would contain a list of objects, where each object has the filename, attachment ID, and size in bytes.