create attachment
The create attachment
command attaches a file to an existing item.
Unlike other create operations, you do not need to use a JSON processor or encode to create an attachment. Instead, use the --file
option to specify the file to attach and the -- itemid
option to specify the item to attach it to. For example:
bsafe create attachment --file ./path/to/file --itemid 16b15b89-65b3-4639-ad2a-95052a6d8f66
If you do not know the exact itemid
you want to use, use bsafe get item <search term>
(get) to return the item, including its id.
The get
command retrieves a single object from your safe:
bsafe get (item|username|password|uri|totp|exposed|attachment|folder|collection|team|team-collection|template|fingerprint) <id> [options]
The get command takes an item id or string for its argument. If you use anything other than an exact id; for example, a string, get will search your safe objects for one with a value that matches. For example, the following command would return a Github password:
bsafe get password Github
Note
The get
command can only return one result, so you should use specific search terms. If multiple results are found, the CLI will return an error.