Skip to main content

๐Ÿ” Python Password Manager

A modular, secure, and easy-to-use password manager featuring a professional CLI interface, an interactive menu (TUI) with arrow-key navigation, full test coverage, and CI/CD.

PyPI version Python CLI TUI Encryption KDF

License Tests CD


๐Ÿš€ Key Features

  • Modular Architecture: Full separation between the cryptographic logic (core) and the CLI/storage interface.
  • Interactive Menu (TUI): Running passmgr with no arguments opens an arrow-key navigation menu built with questionary and rich, offering List / Get / Add / Delete / Generate options directly from the menu.
  • Strong Security: Key derivation via PBKDF2-HMAC-SHA256 (390,000 iterations by default) and Fernet symmetric encryption (AES-128-CBC + HMAC-SHA256).
  • Local Encrypted Storage: The vault is stored in a single encrypted file (vault.json).
  • Dedicated CLI Shortcut: Run the passmgr command directly from the terminal, with or without subcommands.
  • Clipboard Integration: Quick password copying with a single keypress or a CLI flag (using pyperclip).
  • Testing & CI/CD: Unit test coverage with pytest and automated PyPI deployment via GitHub Actions.

Project Structure ๐Ÿ“‚

PASSWORD_MANAGER/
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ”œโ”€โ”€ publish.yml
โ”‚       โ””โ”€โ”€ test.yml
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ password_manager/
โ”‚       โ”œโ”€โ”€ cli/
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ””โ”€โ”€ main.py
โ”‚       โ”œโ”€โ”€ core/
โ”‚       โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚       โ”‚   โ”œโ”€โ”€ crypto.py
โ”‚       โ”‚   โ””โ”€โ”€ vault.py
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ interactive.py
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ test_crypto.py
โ”‚   โ””โ”€โ”€ test_vault.py
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ requirements.txt


๐Ÿ“ฆ Installation & Running

Option 1: Install from PyPI (Recommended)

pip install razeini-password-manager

Option 2: Install for Development

1. Clone the repository:

git clone https://github.com/RazEini/Password_Manager.git
cd Password_Manager

2. Install the package in editable mode:

pip install -e .

3. Run unit tests:

pip install pytest
pytest

๐Ÿ–ฅ๏ธ Interactive Mode (TUI)

Running the passmgr command without a subcommand opens a full interactive menu (requires rich and questionary):

passmgr
# or with a specific vault file:
passmgr --vault myvault.json

The menu automatically detects whether the vault exists:

  • If it doesn't exist โ€” it will offer to create a new vault with a master password.
  • If it exists โ€” it will prompt for the master password to unlock it.

Once unlocked, an arrow-key navigation menu is displayed with the following options:

Menu Option Description
List All Services Display all services saved in the vault
Get Entry View entry details, including an option to copy the password to the clipboard
Add / Update Entry Add a new entry or update an existing one, with an option to generate a random password
Delete Entry Delete an entry from the vault after confirmation
Generate Random Password Generate a random password only, without saving it to the vault
Lock & Exit Lock the vault and exit the menu

๐Ÿ’ป CLI โ€“ Main Commands (`passmgr`)

Command Description Example
(no command) Open the interactive menu (TUI) passmgr
init Create a new encrypted Vault passmgr init
add Add or update a password for a service passmgr add --service github --user myusername
get Retrieve a password (with an option to copy to clipboard) passmgr get --service github --copy
list List all existing services in the vault passmgr list
delete Delete an entry from the vault passmgr delete --service github
change-master Change the master password and re-encrypt passmgr change-master
generate Generate a strong random password passmgr generate --length 20
export-csv Export passwords to a CSV file passmgr export-csv --path backup.csv
import-csv Import passwords from a CSV file passmgr import-csv --path backup.csv

๐Ÿ’ก Note on Custom Vault Names:
By default, passmgr uses vault.json in the current working directory. If you want to use a custom file name (e.g., myvault.json), append --vault <filename> to any command:

passmgr --vault myvault.json init
passmgr --vault myvault.json add --service github --user myusername

๐Ÿ›ก๏ธ Security & Key Derivation

The application never stores the master password on disk at any stage. The cryptographic key is derived in real time from the master password and the dynamic Salt stored in the Vault file. Even in interactive mode, password entry is handled via questionary.password, which masks the characters as they're typed, just like getpass does in the standard CLI mode.


๐Ÿ“„ License

This project is distributed under the MIT license โ€“ free to use, modify, and distribute. For more information, see the LICENSE file.


๐Ÿ‘จโ€๐Ÿ’ป Raz Eini (2026)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

razeini_password_manager-0.1.2.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

razeini_password_manager-0.1.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file razeini_password_manager-0.1.2.tar.gz.

File metadata

  • Download URL: razeini_password_manager-0.1.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for razeini_password_manager-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3e93a62c96200cf95d16b5d20128296f146ec1da3a858d75b161205d3b36eaeb
MD5 bf525e4d6825dd928854f60191827a4a
BLAKE2b-256 9cb7bb23abe3557cd920faced1909ee8993e6190f0f45f015bb7e72cda88da9e

See more details on using hashes here.

File details

Details for the file razeini_password_manager-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for razeini_password_manager-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3237268c51eadacadb926c54c3c96e7a1264963fcb6c97b68294e6cb0d4a94fb
MD5 36083cd9c2c870b0dfdd6b62a9b1d72e
BLAKE2b-256 c568107361c08e48f04321aafd3efb0d1c3b72c754018a047f031591df3fc592

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page