README.md in mpw-3.2.1 vs README.md in mpw-4.0.0

- old
+ new

@@ -1,128 +1,147 @@ -# Manage your passwords! +# MPW: Manage your passwords! +[![Version](https://img.shields.io/badge/latest_version-4.0.0-green.svg)](https://github.com/nishiki/manage-password/releases) +[![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password) +[![License](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE) -MPW is a little software which stores your passwords in an GPG encrypted file. -MPW can synchronize your password with SSH or FTP. +mpw is a little software which stores your passwords in [GnuPG](http://www.gnupg.org/) encrypted files. -# Installation +## Features -This program work with ruby >= 2.0 + * generate random password + * generate OTP code + * copy your login, password or otp in clipboard + * manage many wallets + * synchronize your passwords with SSH or FTP. + * share a wallet with others GPG keys -* install ruby and rubygems on your computer -* install xclip -* gem install mpw +## Install -# How to use +On debian or ubuntu: +``` +apt install ruby ruby-dev xclip +gem install mpw +``` -* Show help +## How to use +### First steps + +Initialize your first wallet: ``` -mpw --help +mpw config --init user@host.com ``` -* Setup a new config file +Add your first item: ``` -mpw --setup -mpw --setup --config /path/conf/file.cfg +mpw add ``` -* Create and setup a new wallet +And list your items: ``` -mpw --setup-wallet --wallet new_wallet_name -mpw --setup-wallet --wallet new_wallet_name --config /path/conf/file.cfg +mpw list ``` +or search an item with +``` +mpw list --pattern Da +mpw list --group bank +``` -* Add a GPG key in wallet +Output: ``` -mpw --add --key root@localhost.local -mpw --add --key root@localhost.local --config /path/conf/file.cfg -mpw --add --key root@localhost.local --wallet wallet_name -mpw --add --key root@localhost.local --config /path/conf/file.cfg --wallet wallet_name +Bank + ============================================================================== + ID | Host | User | Protocol | Port | OTP | Comment + ============================================================================== + 1 | bank.com | 1234456 | https | | X | + +Linux + ============================================================================== + ID | Host | User | Protocol | Port | OTP | Comment + ============================================================================== + 2 | linuxfr.org | example | https | | | Da Linux French Site + ``` -* Add a new GPG key in wallet +Copy a password, login or OTP code: ``` -mpw --add --key root@localhost.local --file /path/gpg/file.pub -mpw --add --key root@localhost.local --file /path/gpg/file.pub --config /path/conf/file.cfg -mpw --add --key root@localhost.local --file /path/gpg/file.pub --wallet wallet_name -mpw --add --key root@localhost.local --file /path/gpg/file.pub --config /path/conf/file.cfg --wallet wallet_name +mpw copy -p linuxfr ``` -* Delete a GPG key in wallet +Update an item: ``` -mpw --delete --key root@localhost.local -mpw --delete --key root@localhost.local --wallet wallet_name -mpw --delete --key root@localhost.local --wallet wallet_name --config /path/conf/file.cfg +mpw update -p linuxfr ``` -* Add a new item in wallet +Delete an item: ``` -mpw --add -mpw --add --config /path/conf/file.cfg -mpw --add --wallet wallet_name -mpw --add --config /path/conf/file.cfg --wallet wallet_name +mpw delete -p linuxfr ``` -* Update an item +### Manage wallets + +List all available wallets: ``` -mpw --update --id uniq_id -mpw --update --id uniq_id --config /path/conf/file.cfg -mpw --update --id uniq_id --wallet wallet_name -mpw --update --id uniq_id --config /path/conf/file.cfg --wallet wallet_name +mpw wallet --list ``` -* Delete an item +Create an other wallet: ``` -mpw --delete --id uniq_id -mpw --delete --id uniq_id --config /path/conf/file.cfg -mpw --delete --id uniq_id --wallet wallet_name -mpw --delete --id uniq_id --config /path/conf/file.cfg --wallet wallet_name +mpw config --wallet work --init user@host.com ``` -* Show an item +List all GPG keys in wallet: ``` -mpw --show 'string to search' -mpw --show 'string to search' --config /path/conf/file.cfg -mpw --show 'string to search' --wallet wallet_name -mpw --show 'string to search' --config /path/conf/file.cfg --wallet wallet_name -mpw --show 'string to search' --group group_name -mpw --show 'string to search' --group group_name --config /path/conf/file.cfg -mpw --show 'string to search' --group group_name --wallet wallet_name -mpw --show 'string to search' --group group_name --config /path/conf/file.cfg --wallet wallet_name +mpw wallet --list-keys [--wallet NAME] ``` -* Export data in YAML file +Share with an other GPG key: ``` -mpw --export --file /path/file/to/export.yml -mpw --export --file /path/file/to/export.yml --config /path/conf/file.cfg -mpw --export --file /path/file/to/export.yml --wallet wallet_name -mpw --export --file /path/file/to/export.yml --config /path/conf/file.cfg --wallet wallet_name +mpw wallet --add-gpg-key test42@localhost.com + or +mpw wallet --add-gpg-key /path/to/file ``` -* Import data from YAML file +Remove a GPG key: ``` -mpw --import --file /path/file/to/export.yml -mpw --import --file /path/file/to/export.yml --config /path/conf/file.cfg -mpw --import --file /path/file/to/export.yml --wallet wallet_name -mpw --import --file /path/file/to/export.yml --config /path/conf/file.cfg --wallet wallet_name +mpw wallet --delete-gpg-key test42@localhost.com ``` -Format file to import: +Add synchronize: ``` +mpw wallet --protocol ssh --host example.com --user test --path /remote/path --password +``` + +### Export and import data + +You can export your data in yaml file with your passwords in clear text: +``` +mpw export --file export.yml +``` + +Import data from an yaml file: +``` +mpw import --file import.yml +``` + +Example yaml file for mpw: + +``` +--- 1: - name: Website perso - group: Perso - host: localhost.local - protocol: ftp - user: test - password: letoortue - port: 21 - comment: Mysuper website -2: - name: Linuxfr - group: Pro - host: Linuxfr.org + host: bank.com + user: 123456 + group: Bank + password: secret protocol: https - user: test - password: coucou port: + otp_key: 1afg34 comment: +2: + host: linuxfr.org + user: example + group: + password: 'complex %- password' + protocol: https + port: + otp_key: + comment: Da Linux French Site ```