Accessing your Vault

Accessing your Vault

For now accessing your vault is read only.

Get a password

Return any entry for which either the url or the title matches mywebsite
dcli p mywebsite
Copy the login of the selected entry for which either the url or the title matches mywebsite to the clipboard
dcli p mywebsite -f login
Print the email of the selected entry for which either the url or the title matches mywebsite to the console
dcli p mywebsite -f email -o console
Print the json of the entry for which either the url or the title matches mywebsite to the console
dcli p mywebsite -o json
Return any entry for which the id matches xxxxxx
dcli p id=xxxxxx
Return any entry for which the url matches someurl, or the title matches mytitle
dcli p url=someurl title=mytitle
Return any entry for which either the url or the title matches mywebsite
dcli p url,title=mywebsite

Note: You can select a different output for passwords among clipboard, console, json. The JSON option outputs all the matching credentials.

Dashlane CLI copy password

Get the email or login of a password

You can get the email or username of a password by using the --field or -f parameter:

dcli password -f email mywebsite
dcli password -f login mywebsite

Generate an OTP code

You can get an OTP code from your vault as well as the remaining time before it expires.

dcli password -f otp mywebsite

Get a secure note

In order to get a secure note, just use the note or n command and define some filters (similarly to the password command). You can also select a different output for notes among text, json. The JSON option outputs all the matching notes.

dcli note [filters]
 
# Example with a JSON output
dcli note title=sample.md -o json

Get a secret

Dashlane introduced the secret content type. You can use it to store any kind of secret data in your vault.

In order to get a secret, just use the secret command and define some filters (similarly to the secure note command). You can also select a different output for notes among text, json. The JSON option outputs all the matching notes.

dcli secret [filters]
Example: get the secret with the title api_keys and a JSON output
dcli secret title=api_keys -o json

Options

By default an automatic synchronization is performed once per hour. You can change this behavior with the following command:

dcli configure disable-auto-sync true

Use cases

Use SSH Keys from your vault

This use case shows you how to use Dashlane to store your SSH keys and use them to connect to your servers. This could be useful if you want to share SSH keys with your team.

Let's say you have generated a new SSH key pair and you want to store it in Dashlane.

This is an example, use the parameters you want
ssh-keygen -t rsa -b 4096 -C "Dashlane SSH demo key"

Copy the private key to your clipboard and store it in a new secure note (named SSH_DEMO_KEY in our example) in Dashlane via the extension. It is important to include the headers of the key (-----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY-----) in the secure note.

Now, make sure your CLI is synchronized:

dcli sync

Once done, you can retrieve the private key from your vault and inject it in your SSH agent:

dcli n SSH_DEMO_KEY | ssh-add -