A simple password manager with synchronization
Project description
Passmate — A simple, secure password manager with multi-device synchronization
Passmate is a command-line password manager that keeps your passwords encrypted and synchronized across multiple devices using a shared folder (like Syncthing, Dropbox or any cloud storage).
✨ Features
- 🔒 Strong Encryption: All databases encrypted with scrypt. By using a single-file database, metadata leakage is minimzed.
- 🔄 Automatic Sync: Conflict-free synchronization across devices
- 💻 Interactive Shell: User-friendly command-line interface with tab completion
- 🌳 Hierarchical Organization: Organize passwords in folder-like paths
- 🎲 Password Generator: Built-in cryptographically strong password generator
- 🔍 Smart Search: Case-insensitive filtering across all records
📦 Installation
Using pip:
pip install passmate
From source:
git clone https://github.com/TobiasKaiser/passmate.git
cd passmate
pip3 install .
🚀 Quick Start
Simply run:
passmate
If this is your first time, passmate will automatically create a new encrypted database at ~/.local/share/passmate/local.pmdb and prompt you to set a master passphrase.
For subsequent uses, just run passmate again and enter your passphrase.
📖 Usage
Interactive Shell Commands
Once in the shell, you can use these commands:
Managing Records
new work/email/gmail Create a new record
open work/email/gmail Open an existing record
rename work/email/google Rename current record
del Delete current record
close Close current record
Editing Fields
set username Set a field value
set password Set password field
gen password Generate secure password
unset password Remove a field
show Display all fields
Navigation & Organization
ls List all records
ls gmail Search for records matching "gmail"
Synchronization
sync Sync with other devices
change_passphrase Change master passphrase
Other
exit Exit passmate
Example Session
passmate> new work/email/gmail
Record "work/email/gmail" created.
passmate:work/email/gmail> set username
Value: myemail@gmail.com
passmate:work/email/gmail> gen password
Template: Aaaaaaaaaaaaaa5
Settings: 15 characters including a-z, A-Z, 0-9
Generated password: xK9mPqR2nFwLyJa
passmate:work/email/gmail> show
username: myemail@gmail.com
password: xK9mPqR2nFwLyJa
passmate:work/email/gmail> close
passmate> exit
🔧 Configuration
Default configuration file: ~/.local/share/passmate/config.toml
primary_db = "~/.local/share/passmate/local.pmdb"
shared_folder = "~/.local/share/passmate/sync/"
host_id = "laptop"
Configuration Options
- primary_db: Path to your encrypted password database
- shared_folder: Path to folder for synchronization (e.g., Dropbox folder)
- host_id: Unique identifier for this device (defaults to hostname)
🔄 Multi-Device Synchronization
Passmate uses a conflict-free synchronization strategy based on timestamps (Last-Write-Wins strategy).
Setup Instructions
-
On Device 1:
passmate
-
Configure shared folder (edit
~/.local/share/passmate/config.toml):shared_folder = "~/Dropbox/passmate/" host_id = "laptop"
-
In the shell, run sync:
passmate> sync -
On Device 2:
Copy the configuration and set a different host_id:
shared_folder = "~/Dropbox/passmate/" host_id = "desktop"
-
On Device 2, start passmate:
passmate
It will create a new database, then sync to pull data from Device 1.
Master passphrase in multi-device setup: For synchronization to work, you must use the same master passphrase on each device. If you change your master passphrase, you must do so on each device individually.
How Sync Works
- Each device writes a sync copy to the shared folder.
- When you run
sync, passmate reads all sync copies and merges changes. - Conflicts are resolved automatically using modification timestamps.
- All changes are encrypted with your master passphrase.
🔐 Security
- All databases are encrypted using the scrypt key derivation function (maxtime=1.0s, maxmem=16MB).
- Data is padded to 4KB increments to reduce metadata leakage.
- Password generation uses Python's
secretsmodule (CSPRNG).
🔨 Development
There are some rudimentary tests:
pytest-3 .
To build the package's .whl and .tar.gz files, run:
python3 -m build
🔗 Links
- Source Code: https://github.com/TobiasKaiser/passmate
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 passmate-0.3.tar.gz.
File metadata
- Download URL: passmate-0.3.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22416103fcb49f89f30ad86cefe06982410af225ee3562171b16af4423c77798
|
|
| MD5 |
4b009d917923af81e7882b1464d20f25
|
|
| BLAKE2b-256 |
1932b68c7959dac74c42d80cd079ce9504ab7de64827ee653557a44935ddf445
|
File details
Details for the file passmate-0.3-py3-none-any.whl.
File metadata
- Download URL: passmate-0.3-py3-none-any.whl
- Upload date:
- Size: 25.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68362cf6f2b2ef3d615fbe5394f7b4c049b36d317a368cb1d2782fb2076639f3
|
|
| MD5 |
8ea3ed3d8d35f418aaf3bca794839113
|
|
| BLAKE2b-256 |
49a3b398abc1eb25f1989cf96c26284b1607bbe0a2954c93dbc25a909f7824ee
|