Documentation


PowerShell users use single dashes in all parameters. Instead of --add use -add.

Add/Edit Password

Syntax

rpass --add --name [name] --token [token] --key [key]

--add | -a

--name | -n Required A unique name for your password that will be used to identify it locally.
--token | -t Required The automatically generated token provided for your password.
--key | -k Optional The GPG fingerprint of the key to use for automatic decryption. If this is omitted then GPG encrypted string will be returned instead of the plain password.

Examples

rpass --add --name "MySQL Password" --token AaAaAaAaAaAaAaA --key FEDEFEDE
rpass --add --name sudo --token AaAaAaAaAaAaAaA

To edit a password simply run the --add command and use an existing name to update it.

Delete Password

Syntax

rpass --delete --name [name]

--delete | -d

--name | -n Required A unique name for your password that will be used to identify it locally.

Examples

rpass --delete --name "MySQL Password"

List Passwords

Syntax

rpass --list

View Password

Syntax

rpass --view --name [name]

--view | -v

--name | -n Required A unique name for your password that will be used to identify it locally.

Examples

rpass --view --name "MySQL Password"

Get Password

Syntax

rpass --get --name [name] --token [token] --key [key]

--get | -g

--name | -n Required A unique name for your password that will be used to identify it locally.
--token | -t Optional The automatically generated token provided for your password.
--key | -k Optional The GPG fingerprint of the key to use for automatic decryption. If this is omitted then GPG encrypted string will be returned instead of the plain password.

Examples

Fetch the token and use FEDEFEDE key to decrypt it.

rpass --get --token AaAaAaAaAaAa --key FEDEFEDE

Fetch the token under the 'MySQL Password' token without decrypting it.

rpass --get --name "MySQL Password"

Only fetch the token.

rpass AaAaAaAaAaAa

Only fetch the token using its name.

rpass "MySQL Password"

Linux Examples

# Add password to local storage
rpass.sh --add --name "sudo" --token AaAaAaAaAaAaA --key FEFEFEFE

# Run a sudo command by passing the password to it.
user@workstation:~$ echo $(rpass.sh sudo) | sudo -S whoami
root

# Reload a service.
echo $(rpass.sh sudo) | sudo service apache2 reload

# Add the MySQL password to local storage
rpass.sh --add --name "MySQL-BackUp" --token AaAaAaAaAaAaA --key FEFEFEFE

# Run the backup.
mysqldump -ubackup -p$(rpass.sh MySQL-BackUp) mydb > /var/backups/latest.sql

# Mount a remote share in RPi.
sudo mount -o username=pi,password=$(rpass.sh rpi) //192.168.0.1/storage /mnt

Windows Examples

# Add password to local storage
rpass.ps1 -add -name "remoteShare" -token AaAaAaAaAaAaA -key FEFEFEFE

# Mount a remote share in RPi.
net use \\192.168.0.1\storage /user:pi $(.\rpass remoteShare)