Secure • Encrypted • Production-Ready Password Manager
- 🔐 Secure Encryption: AES-GCM encryption with Scrypt key derivation
- ✅ Input Validation: Comprehensive validation for all user inputs
- 🔑 Password Confirmation: Mandatory password confirmation for create/update operations
- 🎨 Enhanced CLI: Beautiful, colorized terminal interface
- 🛡️ Production-Ready: Robust error handling and transaction management
- 🔒 Master Password: Argon2 hashed master password protection
- 📊 Formatted Output: Clean, readable table displays
- 🎲 Password Generator: Cryptographically secure password generation
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a
.envfile in the project root:DATABASE_URL=your_postgresql_connection_string
-
Set up database schema:
CREATE TABLE master_key ( id INT PRIMARY KEY, password_hash TEXT NOT NULL, salt BYTEA NOT NULL ); CREATE TABLE vault ( id UUID PRIMARY KEY, service TEXT NOT NULL, username TEXT NOT NULL, secret BYTEA NOT NULL, created_at TIMESTAMP DEFAULT now(), updated_at TIMESTAMP DEFAULT now() );
Run the application:
python main.py- View passkeys - List all stored passkeys with formatted table display
- Create passkey - Add a new passkey (requires password confirmation)
- Update passkey - Update an existing passkey (requires password confirmation)
- Delete passkey - Remove a passkey (requires confirmation)
- Generate password - Generate a secure random password
- Exit - Exit the application
- Service names: 2-100 characters, alphanumeric + special chars
- Usernames: 1-255 characters
- Passwords: Minimum 8 characters, maximum 1000 characters
- Entry IDs: Valid UUID format validation
- AES-GCM encryption for all secrets
- Scrypt key derivation (n=2^14, r=8, p=1)
- Argon2 password hashing for master password
- Secure random password generation
- Input sanitization and validation
- Comprehensive exception handling
- Clear, user-friendly error messages
- Database transaction rollback on errors
- Graceful handling of invalid inputs
- Colorized terminal output
- Formatted tables and menus
- Clear success/error/warning messages
- Password confirmation for critical operations
- Confirmation prompts for destructive actions
passkeys/
├── main.py # CLI entry point with enhanced UI
├── auth.py # Master password logic with validation
├── crypto.py # Encryption/decryption utilities
├── db.py # Database connection management
├── vault.py # CRUD operations with validation
├── generator.py # Secure password generation
├── validation.py # Input validation utilities
├── ui.py # Enhanced CLI UI components
├── config.py # Environment configuration
├── requirements.txt # Python dependencies
└── README.md # This file
- Master Password: Choose a strong master password (minimum 8 characters)
- Database Security: Use secure database credentials and connection strings
- Environment Variables: Never commit
.envfiles to version control - Backup: Regularly backup your database
- Access Control: Restrict file permissions on sensitive files
INVALID_ENTRY_ID: Entry ID format is invalidENTRY_NOT_FOUND: Requested entry does not existMASTER_PASSWORD_MISMATCH: Master password verification failedMASTER_NOT_SET: Master password has not been configured
See the LICENSE file for details.
