Package: pass-import
pass importApassextension for importing data from most existing password managersDescriptionpass importis a password store extension allowing you to import your password database to a password store repository conveniently. It natively supports import from 62 different password managers. More manager support can easily be added.Passwords are imported into the existing default password store, therefore the password store must have been initialized before withpass init.By default, pass imports entries at the root of the password store and only keeps the main data (password, login, email, URL, group). This behaviour can be changed using the provided options.Pass import handles duplicates and is compatible withbrowserpass. It imports OTP secret in a way that is compatible withpass-otp.pass-import also provides apimportscript that allows importing passwords to other password managers. For instance, you can import passwords from Lastpass to a Keepass database. It currently supports password export from 8 managers.The following password managers are supported:Password ManagerFormatsHow to export DataCommand line1passwordcsv v8Seethis guidepass import 1password file.csv1pif v4Seethis guidepass import 1password file.1pifcsv v4Seethis guidepass import 1password file.csvcsv v6Seethis guidepass import 1password file.csvaegisjsonSettings> Tools: Export Plainpass import aegis file.jsonjsonSettings> Tools: Export encryptedpass import aegis file.jsonandotpjsonBackups> Backup plainpass import andotp file.jsonapple-keychainkeychainSeethis guidepass import applekeychain file.txtbitwardencsvTools> Export Vault> File Format: .csvpass import bitwarden file.csvcsvTools> Export Vault> File Format: .csvpass import bitwarden file.csvjsonTools> Export Vault> File Format: .jsonpass import bitwarden file.jsonjsonTools> Export Vault> File Format: .jsonpass import bitwarden file.jsonblurjsonSettings: Export Data: Export Blur Datapass import blur file.jsoncsvSettings: Export Data: Export CSV: Accounts: Export CSVpass import blur file.csvbuttercupcsvFile > Export > Export File to CSVpass import buttercup file.csvchromecsvIn chrome://password-manager/settings under 2Export passwordsDownload Filepass import chrome file.csvcsvSeethis guidepass import chrome file.csvclipperzhtmlSettings > Data > Export: HTML + JSONpass import clipperz file.htmlcsvcsvNothing to dopass import csv file.csv --cols 'url,login,,password'dashlanecsvFile > Export > Unsecured Archive in CSVpass import dashlane file.csvjsonFile > Export > Unsecured Archive in JSONpass import dashlane file.jsonencryptrcsvCompile from source and follow instructions fromthis guidepass import encryptr file.csvenpassjson v6Menu > File > Export > As JSONpass import enpass file.jsoncsvFile > Export > As CSVpass import enpass file.csvfirefoxcsvIn about:logins Menu: Export loginspass import firefox file.csvcsvAdd-ons Prefs: Export Passwords: CSVpass import firefox file.csvfpmxmlFile > Export Passwords: Plain XMLpass import fpm file.xmlfreeotp+jsonSettings> Export> Export JSON Formatpass import freeotp+ file.jsongnomelibsecretNothing to dopass import gnome-keyring <label>gnome-authjsonBackup > in a plain-text JSON filepass import gnome-authenticator file.jsongopassgopassNothing to dopass import gopass path/to/storegorillacsvFile > Export: Yes: CSV Filespass import gorilla file.csvkedpmxmlFile > Export Passwords: Plain XMLpass import kedpm file.xmlkeepasskdbxNothing to dopass import keepass file.kdbxcsvFile > Export > Keepass (CSV)pass import keepass file.csvxmlFile > Export > Keepass (XML)pass import keepass file.xmlkeepassxxmlFile > Export to > Keepass XML Filepass import keepassx file.xmlkeepassx2kdbxNothing to dopass import keepassx2 file.kdbxcsvDatabase > Export to CSV Filepass import keepassx2 file.csvkeepassxckdbxNothing to dopass import keepassxc file.kdbxcsvDatabase > Export to CSV Filepass import keepassxc file.csvkeepercsvSettings > Export : Export to CSV Filepass import keeper file.csvlastpasscliNothing to dopass import lastpass <login>csvMore Options > Advanced > Exportpass import lastpass file.csvmykicsvSeethis guidepass import myki file.csvnetwork-managernmAlso support specific networkmanager dir and ini filepass import networkmanagernordpasscsvSettings > Export Itemspass import nordpass file.csvpadlockcsvSettings > Export Data and copy text into a .csv filepass import padlock file.csvpasspassNothing to dopass import pass path/to/storepassmancsvSettings > Export credentials  > Export type: CSVpass import passman file.csvjsonSettings > Export credentials  > Export type: JSONpass import passman file.jsonpasspackcsvSettings > Export > Save to CSVpass import passpack file.csvpasspieyaml v1.0`passpie export file.yml`pass import passpie file.ymlpwsafexmlFile > Export To > XML Formatpass import pwsafe file.xmlrevelationxmlFile > Export: XMLpass import revelation file.xmlroboformcsvRoboform > Options > Data & Sync > Export To: CSV filepass import roboform file.csvsafeincloudcsvFile > Export > Comma-Separated Values (CSV)pass import safeincloud file.csvsaferpasscsvSettings > Export Data: Export datapass import saferpass file.csvupmcsvDatabase > Exportpass import upm file.csvzohocsvTools > Export Secrets: Zoho Vault Format CSVpass import zoho file.csvcsvTools > Export Secrets: Zoho Vault Format CSVpass import zoho file.csvThe following destination password managers are supported:Exporters Password ManagerFormatCommand linecsvcsvpimport csv src [src]gopassgopasspimport gopass src [src]keepasskdbxpimport keepass src [src]keepassx2kdbxpimport keepassx2 src [src]keepassxckdbxpimport keepassxc src [src]lastpassclipimport lastpass src [src]passpasspimport pass src [src]sphinxpimport sphinx src [src]UsageBasic useTo import password from any supported password manager simply run:passimportpath/to/passwordsIfpass-importis not able to detect the format, you need to provide the password manager<pm>you want to import data from:passimport<pm>path/to/passwordsIf you want to import data to a password manager other thanpass, run:pimport<new_pm><former_pm>path/to/passwords--outpath/to/destination/pmHelpusage: pass import [-r path] [-p path] [-k KEY] [-a] [-f] [-c] [-C] [-P] [-d] [--sep CHAR] [--del CHAR] [--cols COLS] [--filter FILTER] [--config CONFIG]
                   [-l] [-h] [-V] [-v | -q]
                   [src ...]

  Import data from most of the password manager. Passwords are imported into
  the existing default password store; therefore, the password store must have
  been initialised before with 'pass init'.

Password managers:
  src                   Path to the data to import. Can also be the password manager name followed by the path to the data to import. The password manager
                        name can be: 1password, aegis, andotp, apple-keychain, bitwarden, blur, buttercup, chrome, clipperz, csv, dashlane, encryptr,
                        enpass, firefox, fpm, freeotp+, gnome, gnome-auth, gopass, gorilla, kedpm, keepass, keepassx, keepassx2, keepassxc, keeper,
                        lastpass, myki, network-manager, nordpass, padlock, pass, passman, passpack, passpie, pwsafe, revelation, roboform, safeincloud,
                        saferpass, upm, zoho.

Common optional arguments:
  -r path, --root path  Only import the password from a specific subfolder.
  -p path, --path path  Import the passwords to a specific subfolder.
  -k KEY, --key KEY     Path to a keyfile if required by a manager.
  -a, --all             Also import all the extra data present.
  -f, --force           Overwrite existing passwords.
  -c, --clean           Make the paths more command line friendly.
  -C, --convert         Convert invalid characters present in the paths.
  -P, --pwned           Check imported passwords against haveibeenpwned.com.
  -d, --dry-run         Do not import passwords, only show what would be imported.

Extra optional arguments:
  --sep CHAR            Provide a characters of replacement for the path separator. Default: '-'
  --del CHAR            Provide an alternative CSV delimiter character. Default: ','
  --cols COLS           CSV expected columns to map columns to credential attributes. Only used by the csv importer.
  --filter FILTER       Export whole entries matching a JSONPath filter expression. Default: (none) This field can be: - a string JSONPath expression - an
                        absolute path to a file containing a JSONPath filter expression. List of supported filter: https://github.com/h2non/jsonpath-ng
                        Example: - '$.entries[*].tags[?@="Defaults"]' : Export only entries with a tag matching 'Defaults'
  --config CONFIG       Set a config file. Default: '.import'

Help related optional arguments:
  -l, --list            List the supported password managers.
  -h, --help            Show this help message and exit.
  -V, --version         Show the program version and exit.
  -v, --verbose         Set verbosity level, can be used more than once.
  -q, --quiet           Be quiet.

More information may be found in the pass-import(1) man page.Usage forpimportcan been seen withpimport -horman pimport.ExamplesImport password from KeePasspass import keepass.xml
(*) Importing passwords from keepass to pass
 .  Passwords imported from: keepass.xml
 .  Passwords exported to: ~/.password-store
 .  Number of password imported: 6
 .  Passwords imported:
       Social/mastodon.social
       Social/twitter.com
       Social/news.ycombinator.com
       Servers/ovh.com/bynbyjhqjz
       Servers/ovh.com/jsdkyvbwjn
       Bank/aibThis is the same than:pimport pass keepass.xml --out ~/.password-storeImport password to a different password storeexport PASSWORD_STORE_DIR="~/.mypassword-store"
pass init <gpg-id>
pass import keepass.kdbxImport password to a subfolderpass import bitwarden.json -p Import/
(*) Importing passwords from bitwarden to pass
 .  Passwords imported from: bitwarden.json
 .  Passwords exported to: ~/.password-store
 .  Root path: Import
 .  Number of password imported: 6
 .  Passwords imported:
      Import/Social/mastodon.social
      Import/Social/twitter.com
      Import/Social/news.ycombinator.com
      Import/Servers/ovh.com/bynbyjhqjz
      Import/Servers/ovh.com/jsdkyvbwjn
      Import/Bank/aibOther examples:If the manager is not correctly detected, you can pass it at source argument:pass import dashlane dashlane.csvImport NetworkManager password on default dir:pass import networkmanagerImport a NetworkManager INI file:pass import nm.iniImport a One password 1PIF:pass import 1password.1pifImport a One password CSV:pass import 1password.csvImport a Passman JSON file:pass import passman.jsonImport Lastpass file to a keepass db:pimport keepass lastpass.csv --out keepass.kdbxImport a password store to a CSV file:pimport csv ~/.password-store --out file.csvExport Bitwarden to SPHINX: pimport sphinx bitwarden.json -o sphinx.cfgGPG keyringBefore importing data to pass, your password-store repository must exist and your GPG keyring must be usable. In order words you need to ensure that:All the public gpgids are present in the keyring.All the public gpgids are trusted enough.At least one private key is present in the keyring.Otherwise, you will get the following error:invalid credentials, password encryption/decryption aborted.To set the trust on a GPG key, one can rungpg --edit-key <gpgid>thentrust.Security considerationDirect importPasswords should not be written in plain text form on the drive. Therefore, when possible, you should import it directly from the encrypted data. For instance, with an encrypted keepass database:passimportkeepassfile.kdbxSecure erasureOtherwise, if your password manager does not support it, you should take care of securely removing the plain text password database:passimportlastpassdata.csv
shred-udata.csvEncrypted fileAlternatively, pass-import can decrypt gpg encrypted file before importing it. For example:passimportlastpasslastpass.csv.gpgMandatory Access Control (MAC)AppArmor profiles forpassandpass-importare available inapparmor.d. If your distribution support AppArmor, you can clone theapparmor.dand run:make && sudo make install pass pass-importto only install these apparmor security profiles.Networkpass-import only needs to establish network connection to support cloud based password manager. If you do not use these importers you can ensure pass-import is not using the network by removing thenetworkrules in the apparmor profile of pass-import.Password UpdateYou might also want to update the passwords imported usingpass-update.Configuration fileSome configurations can be read from a configuration file called.importif it is present at the root of the password repository. The configuration read from this file will be overwritten by their corresponding command-line option if present.Example of the.importconfiguration file for the default password repository in~/.password-store/.import:---# Separator stringseparator:'-'# The list of string that should be replaced by other string. Only activated# if the `clean` option is enabled.cleans:'':'-''&':'and''@':At"'":'''[':''']':''# The list of protocols. To be removed from the title.protocols:-http://-https://# The list of invalid characters. Replaced by the separator.invalids:-'<'-'>'-':'-'"'-'/'-'\\'-'|'-'?'-'*'-'\0'InstallationRequirementspass 1.7.0or greater.Python 3.8+python3-setuptoolsto build and install it.python3-yaml(apt install python3-yamlorpip3 install pyaml, orpython3 -m pip install pyamlif on MacOS running python installed viabrew)Optional RequirementsDependencyRequired foraptpippassPassword Store import/exportapt install passN/AlpassLastpass cli based import/exportapt install lpassN/AdefusedxmlRecommended XML libraryapt install python3-defusedxmlpip3 install defusedxmlpykeepassKeepass import from KDBX fileN/Apip3 install pykeepasssecretstorageGnome Keyring importapt install python3-secretstoragepip3 install secretstoragecryptographyAndOTP or Aegis encrypted importapt install python3-cryptographypip3 install cryptographyfile-magicDetection of file decryptionapt install python-magicpip3 install file-magicpwdsphinxExport to SPHINXN/A(coming soon)pip3 install pwdsphinxfilterFilter exportsN/Apip3 install jsonpath-ngArchLinuxpass-importis available in theArch User Repository.yay-Spass-import# or your preferred AUR install methodDebian/Ubuntupass-importis available undermy own debian repositorywith the package namepass-extension-import. Both the repository and the package are signed with my GPG key:06A26D531D56C42D66805049C5469996F0DF68EC.wget-qO-https://pkg.pujol.io/debian/gpgkey|gpg--dearmor|sudotee/usr/share/keyrings/pujol.io.gpg>/dev/nullecho'deb [arch=amd64 signed-by=/usr/share/keyrings/pujol.io.gpg] https://pkg.pujol.io/debian/repo all main'|sudotee/etc/apt/sources.list.d/pkg.pujol.io.list
sudoapt-getupdate
sudoapt-getinstallpass-extension-importNixOSnix-env-iAnixos.passExtensions.pass-importUsing pippipinstallpass-importFrom gitgitclonehttps://github.com/roddhjav/pass-import/cdpass-import
python3setup.pyinstallStable versionwgethttps://github.com/roddhjav/pass-import/releases/download/v3.5/pass-import-3.5.tar.gz
tarxzfpass-import-3.5.tar.gzcdpass-import-3.5
python3setup.pyinstallReleasesand commits are signed using06A26D531D56C42D66805049C5469996F0DF68EC.
You should check the key's fingerprint and verify the signature:wgethttps://github.com/roddhjav/pass-import/releases/download/v3.5/pass-import-3.5.tar.gz.asc
gpg--recv-keys06A26D531D56C42D66805049C5469996F0DF68EC
gpg--verifypass-import-3.5.tar.gz.ascLocal installAlternatively, from git or from a stable version you can do a local install with:cdpass-import
python3setup.pyinstall--user[!IMPORTANT]For local install you need to:SetPASSWORD_STORE_ENABLE_EXTENSIONStotruefor the local extension to be enabled.SetPASSWORD_STORE_EXTENSIONS_DIRto local the install path of pythonExample:exportPASSWORD_STORE_ENABLE_EXTENSIONS=trueexportPASSWORD_STORE_EXTENSIONS_DIR="$(python-msite--user-site)/usr/lib/password-store/extensions/"The import LibraryOne can use pass-import as a python library. Simply import the classes of the password manager you want to import and export. Then use them in a context manager. For instance, to import password from a cvs Lastpass exported file to password-store:frompass_import.managers.lastpassimportLastpassCSVfrompass_import.managers.passwordstoreimportPasswordStorewithLastpassCSV('lastpass-export.csv')asimporter:importer.parse()withPasswordStore('~/.password-store')asexporter:exporter.data=importer.dataexporter.clean(True,True)forentryinexporter.data:exporter.insert(entry)Alternatively, you can import the same Lastpass file to a Keepass database:frompass_import.managers.keepassimportKeepassfrompass_import.managers.lastpassimportLastpassCSVwithLastpassCSV('lastpass-export.csv')asimporter:importer.parse()withKeepass('keepass.kdbx')asexporter:exporter.data=importer.dataexporter.clean(True,True)forentryinexporter.data:exporter.insert(entry)ContributionFeedback, contributors, pull requests are all very welcome. Please read theCONTRIBUTING.rstfile for more details on the contribution  process.