Convert GNU pass password store to CSV
Project description
GNU GPG Password Exporter
gnu-pass-to-csv is a Python tool designed to decrypt and export your GPG-encrypted passwords stored in a pass-compatible directory to a CSV file. This tool is ideal for users who manage their passwords using pass and need to export them for backup, migration, or integration purposes.
Features
- Automatic GPG Decryption: Seamlessly decrypts
.gpgfiles in your password store directory. - Parallel Processing: Leverages concurrent processing to accelerate the decryption and export operations.
- Customizable Output: Easily export password data to a CSV file with a customizable structure.
Requirements
- Python 3.12 or higher
- GnuPG (GPG): Ensure GPG is installed and properly configured on your system.
Installation
You can install gnu-pass-to-csv directly from PyPI:
pip install gnu-pass-to-csv
Alternatively, if you prefer using the source code:
-
Clone the repository:
git clone git@gitlab.com:fbossiere/gnu-pass-to-csv.git cd gnu-pass-to-csv
-
Install dependencies with Poetry:
Make sure Poetry is installed. If not, install it using the Poetry Installation Guide.
poetry installThis command sets up a virtual environment and installs all required dependencies.
CSV File Structure
The tool exports your passwords to a CSV file with the following structure:
{
"name": "relative/path/to/password/file",
"url": "",
"email": "",
"username": "",
"password": "first line of the decrypted file (usually the password)",
"note": "additional lines concatenated as a single string",
"totp": "",
"vault": "Personal"
}
Field Descriptions
- name: Relative path to the password file from the base password store directory.
- url: URL associated with the password (if available).
- email: Email address associated with the password (if available).
- username: Username associated with the password (if available).
- password: The first line of the decrypted file, typically the password.
- note: Additional lines from the decrypted file concatenated into a single string.
- totp: Field for storing Time-based One-Time Passwords (TOTP) (if available).
- vault: The vault category to which the password belongs (default is "Personal").
Usage
After installing the package, you can use the tool to decrypt your GPG-encrypted passwords and export them to a CSV file.
Option 1: Using the Installed Script Directly
Simply run the installed script:
gnu-pass-to-csv
This command processes the .gpg files in your password store directory and generates a CSV file according to the structure described above.
Option 2: Running with Poetry
If you've installed the dependencies using Poetry, you can run the script as follows:
poetry run gnu-pass-to-csv
Additional Options
The script supports several options to customize its behavior:
--password-store-dir: Specify a custom password store directory (default:~/.password-store).--output-csv: Specify the output CSV file path (default:~/Documents/passwords_export.csv).--max-workers: Define the number of concurrent workers to speed up processing (default: 4).--passphrase: Provide the GPG passphrase directly as an argument. If omitted, the script will use theGPG_PASSPHRASEenvironment variable.--vault: Define the vault category for the exported passwords (default: "Personal").
To see all available options, use the --help flag:
gnu-pass-to-csv --help
Contributing
Contributions are highly encouraged! Please feel free to submit a Pull Request or open an issue to discuss any improvements or feature requests.
License
This project is licensed under the MIT License. See the LICENSE file for full details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gnu_pass_to_csv-1.0.8.tar.gz.
File metadata
- Download URL: gnu_pass_to_csv-1.0.8.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.8.0-41-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
647cdf57af891127372d4e21579122608a69f21bf3b6aeff0037d4759cd1d2a3
|
|
| MD5 |
ed90f486114666a6abe0bc660a92d5cb
|
|
| BLAKE2b-256 |
a0072996287a0f7c7426c17fd60b94a5b5e87f7512e7f2aff1e882cbde41f92e
|
File details
Details for the file gnu_pass_to_csv-1.0.8-py3-none-any.whl.
File metadata
- Download URL: gnu_pass_to_csv-1.0.8-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.8.0-41-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a89925e9c5c43b7eb09adb919692d1b3fdd55ccb724e5c8ce30b44d686ee3320
|
|
| MD5 |
6076e67b1ff13b5574ff9e56288678a8
|
|
| BLAKE2b-256 |
9ea5c6bc9385b302b9282182443ad3a55da5053ee5c01b0adf95a6e60c7d6433
|