Skip to main content

Local-first, offline password manager.

Project description

LocalPass

codecov

Local-first, offline password manager with zero cloud, zero telemetry, and fully open-source.

🔐 Project Description

LocalPass is a minimal, offline password manager designed for local-first usage. It stores your vault exclusively on your device, with no cloud integration, telemetry, or user accounts. The project emphasizes transparency, simplicity, and security through open-source development.

Key Features

  • 🔒 Encrypted Vault: Uses Argon2id for key derivation and AES-GCM for encryption
  • 💻 Cross-platform: Works on Windows, macOS, and Linux
  • 📦 Zero Cloud: No cloud sync, no telemetry, no remote storage
  • 📖 Open-Source: Fully transparent codebase under Apache License 2.0

✨ Features Included in v0.1.3

  • Encrypted vault using Argon2id + AES-GCM
  • CLI commands: init, add, list, show, remove
  • Cross-platform support for Windows, macOS, and Linux
  • Public vault format for interoperability
  • Robust serialization with defaults for missing fields (e.g., tags default to empty list)
  • Timestamp validation for vault data integrity
  • Enhanced error handling for corrupted or invalid vault files
  • Short numeric ID support - specify custom numeric IDs when adding entries
  • Flexible ID handling - mix custom IDs with auto-generated ones
  • Password confirmation - master password and entry passwords must be confirmed
  • Required field validation - service, username, and password fields are mandatory

🚀 What's New in 0.1.3

  • Password confirmation: Master password must be confirmed during vault initialization, and entry passwords must be confirmed when adding entries.
  • Required field validation: Service, username, and password fields are now mandatory and cannot be left empty.
  • Improved user prompts: Enhanced CLI prompts with better error messages and validation for a smoother user experience.

📥 Installation

Using pip

pip install localpass

Editable mode (for development)

git clone https://github.com/wrogistefan/LocalPass.git
cd LocalPass
pip install -e .

🚀 Quickstart

Initialize a new vault

localpass init myvault.lp
# You'll be prompted to enter and confirm a master password

Add a new entry

localpass add myvault.lp
# You'll be prompted for master password, service, username, password (with confirmation), and notes
# Use --id <number> to specify a custom numeric ID

List all entries

localpass list myvault.lp

Show entry details

localpass show myvault.lp <entry-id>

Remove an entry

localpass remove myvault.lp <entry-id>

📁 Project Structure

src/localpass/
├── cli.py              # CLI interface
├── vault/
│   ├── crypto.py       # Encryption/decryption
│   ├── models.py       # Data models
│   ├── repository.py   # Vault storage
│   ├── service.py      # Business logic
│   └── serialization.py # JSON serialization
└── __main__.py         # Entry point

🔧 Vault API

The Vault class provides the core API for managing password entries:

Methods

  • add_entry(entry: VaultEntry) -> None: Add a new entry to the vault.
  • list_entries() -> List[VaultEntry]: Return a copy of all entries in the vault.
  • get_entry_by_id(entry_id: str) -> Optional[VaultEntry]: Retrieve an entry by its unique ID, or None if not found.
  • remove_entry(service: str) -> None: Remove all entries that match the specified service name.
  • remove_entry_by_id(entry_id: str) -> None: Remove the entry with the specified unique ID. Raises ValueError if the entry does not exist.

Key Differences

  • remove_entry(service) performs a bulk removal of all entries for a given service, which is useful for cleaning up multiple accounts.
  • remove_entry_by_id(entry_id) provides granular deletion of a single entry by its ID, intended for precise CLI operations. It ensures the entry exists before removal.

This API is designed for programmatic use and powers the LocalPass CLI.

Documentation

🔐 Security

LocalPass prioritizes security through:

  • Argon2id key derivation with memory-hard parameters
  • AES-GCM authenticated encryption
  • Zero telemetry and no cloud dependencies

For detailed security information, see docs/SECURITY.md.

⚠️ Security Notes

LocalPass supports different repository types for vault storage, each with varying security levels:

EncryptedVaultRepository (Recommended)

  • Encryption Model: Uses Argon2id for password-based key derivation (32-byte key, 100 MiB memory, 2 iterations, 8 parallelism) followed by AES-256-GCM authenticated encryption.
  • Assumptions: Relies on the strength of your master password and the security of your local system. Assumes no malware/keyloggers are present.
  • Limitations: Does not protect against system compromise, physical theft of both vault file and password, or side-channel attacks.
  • Key Management: Your master password is the only key. It must be strong (12+ characters, mixed case, numbers, symbols), unique, and never stored or shared. The password is stretched into a cryptographic key using Argon2id, making brute-force attacks computationally expensive.
  • When to Use: Always for production, real-world password management, or any scenario where data confidentiality matters.
  • Why Required: Provides robust encryption ensuring vault contents remain confidential at rest and in transit (when backed up).

PlaintextVaultRepository (Unsafe)

  • Encryption Model: None - stores all data in plaintext JSON.
  • Why Unsafe: Exposes all passwords, usernames, and notes to anyone with file access. Suitable only for testing, debugging, or air-gapped development environments.
  • Warning: Emits a runtime warning when used.

Always use EncryptedVaultRepository for any real-world scenarios requiring data protection.

📄 License

This project is licensed under the Apache License 2.0. See the LICENSE file for full details.

👤 Author

Created by Łukasz Perek — local-first software enthusiast.

Project details


Download files

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

Source Distribution

localpass-0.1.3.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

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

localpass-0.1.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file localpass-0.1.3.tar.gz.

File metadata

  • Download URL: localpass-0.1.3.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for localpass-0.1.3.tar.gz
Algorithm Hash digest
SHA256 21e818659cf764bd3bce279acbe12c20b78cffb6c1dca9cf483ae73bbd9927fb
MD5 485fdebc85a731c534671a57cc92b6c9
BLAKE2b-256 59422c9f0a622a3983ad3d0101264e103d6c43e24c7584f296b0892719f20e2f

See more details on using hashes here.

File details

Details for the file localpass-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: localpass-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for localpass-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 09f28fdbb0c12121bdc7cd54e986e94cab22e1b298d61e07abc2918c84ddf611
MD5 33e05fe11a756eb37c92976aaaa99154
BLAKE2b-256 eebc926bdee6a59a7acb2c542dfbe1ab775370f46297b1fb2605036aa1d233de

See more details on using hashes here.

Supported by

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