Skip to content

Latest commit

 

History

History
150 lines (111 loc) · 3.16 KB

README.md

File metadata and controls

150 lines (111 loc) · 3.16 KB

pass-cli

PyPI version Python versions License: MIT

A secure command-line password manager with sudo authentication.

Features

  • Secure password storage with AES-256 encryption
  • Generate strong random passwords
  • Store and retrieve passwords for different services
  • Sudo authentication for added security
  • Secure encryption key management
  • System keyring integration

Installation

pip install password-cli

Quick Start

  1. Initialize the password manager:
pass-cli init

This will prompt you to set up your encryption key or generate a secure random one.

  1. Authenticate with sudo:
pass-cli auth

Usage

Generate Passwords

Generate a random secure password:

pass-cli generate -l 16

Generate and store a password:

pass-cli generate -l 16 -s github -u johndoe

Store Passwords

Store an existing password:

pass-cli store -s github -u johndoe -p your-password

Retrieve Passwords

Retrieve a stored password:

pass-cli retrieve -s github -u johndoe

Check Authentication

Check sudo authentication status:

pass-cli auth-check

List Passwords

List all stored passwords:

pass-cli list

List passwords for a specific service:

pass-cli list -s github

Delete Passwords

Delete a stored password (with confirmation):

pass-cli delete -s github -u johndoe

Delete a stored password without confirmation:

pass-cli delete -s github -u johndoe --force

Security Features

  • AES-256 encryption for all stored passwords
  • PBKDF2 key derivation with high iteration count
  • Secure random password generation using secrets module
  • System keyring integration for encryption key storage
  • Sudo authentication requirement for all operations
  • Local storage only - no cloud sync for enhanced security
  • Safe deletion with confirmation mechanism

Development Setup

  1. Clone the repository:
git clone https://github.com/yourusername/pass-cli.git
cd pass-cli
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # Linux/Mac
# or
venv\Scripts\activate     # Windows
  1. Install dependencies:
pip install -r requirements.txt
pip install -r requirements-dev.txt
  1. Run tests:
pytest

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments