Skip to content

A Python script to export data from pass in Bitwarden CSV format.

License

Notifications You must be signed in to change notification settings

quulah/pass2bitwarden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pass2bitwarden

A Python script to export data from pass in Bitwarden CSV format. This started as a quick and dirty script to move my passwords to Bitwarden, but it turned out worthy of being shared.

Inspired by reinefjord/pass2csv, but rewritten from scratch. There's probably some similarities.

Like pass2csv, this script needs python-gnupg and Python 3.

Config

Currently, the parsed fields and any resulting formatting with regexp group matches or functions can be done in a config.py file.

By default the script exports data in the Bitwarden Generic CSV Individual Account format.

The GPG encrypted password store data is decrypted and processed. As an example: login_password is grabbed from the first line of the data, login_uri is matched with ^url ?: ?(.*)$ and the type is always login. Check out the defaults.py file if you have any other requirements and create the config.py file.

Most likely, the fields and notes parsing could be implemented in some nice way by default. Feel free to create pull requests.

Usage

$ ./pass2bw.py -h
usage: pass2bw.py [-h] [--directory DIRECTORY] [--gpg-binary BINARY]
                  [--output-file OUTPUT] [--gpg-agent]

Export password-store data to Bitwarden CSV format.

optional arguments:
  -h, --help            show this help message and exit
  --directory DIRECTORY, -d DIRECTORY
                        Directory of the password store.
  --gpg-binary BINARY, -b BINARY
                        Path to the GPG binary.
  --output-file OUTPUT, -o OUTPUT
                        File to write the CSV in.
  --gpg-agent, -a       Use GPG agent.

Example:

$ ./pass2bw.py -d ~/.password-store/subdir -a -o only_subdir.csv

About

A Python script to export data from pass in Bitwarden CSV format.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages