Skip to main content

Local-first, offline password manager.

Project description

Downloads PyPI Version Python Versions License Tests Last Commit

Local-first, offline password manager.
Zero cloud. Zero telemetry. Fully open-source. Designed for security, simplicity, and complete user control.

PyPIGitHub

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
  • ✅ High Test Coverage: 99% test coverage with comprehensive validation
  • 🔧 Shell Compatibility: Verified on Windows PowerShell and Unix shells (WSL/bash)

✨ Features Included in v0.2.0

  • Added optional, fully manual HIBP password check (k‑anonymity API)
  • Added new Security Model section to README
  • Updated README header with professional badges
  • Improved documentation structure and clarity

Security Model

LocalPass follows a strict local‑first and offline‑first security philosophy. All operations happen entirely on the user’s device, and no data is ever sent to external services.

Core Principles

  • Local‑only encryption — all vault data is encrypted client‑side using Argon2id and AES‑256‑GCM.
  • Offline‑first — the application works fully without network access.
  • Zero cloud — no sync, no remote storage, no accounts, no telemetry.
  • Deterministic security — the vault file contains everything needed to decrypt the data; nothing is stored elsewhere.

Threat Model (High‑Level)

LocalPass protects against:

  • offline brute‑force attacks on the vault file,
  • filesystem snooping,
  • accidental disclosure,
  • network interception (no network operations exist).

LocalPass cannot protect against:

  • keyloggers or malware on the user’s system,
  • shoulder surfing,
  • physical access combined with password knowledge,
  • side‑channel attacks.

Full Security Documentation

For detailed cryptographic parameters, vault format, repository types, and responsible disclosure guidelines, see:

👉 docs/SECURITY.md

Optional HIBP Password Check

LocalPass includes an optional, fully manual password check using the Have I Been Pwned (HIBP) k‑anonymity API.

This feature is:

  • optional — disabled by default,
  • manual — only executed when explicitly requested by the user,
  • non‑blocking — it never prevents vault creation,
  • privacy‑preserving — only the first 5 characters of the SHA‑1 hash are sent,
  • philosophy‑aligned — no automatic network calls, ever.

This keeps LocalPass fully offline‑first while still offering a useful security tool for users who want it.

🚀 What's New in 0.2.0

  • Introduced optional manual HIBP password check
  • Added high-level Security Model summary to README
  • Cleaned up and reorganized documentation
  • Updated header and removed outdated links

📥 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 --id 1
# You'll be prompted for master password, service, username, password (with confirmation), and notes

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>

Check password against breaches

localpass hibp-check
# You'll be prompted to confirm the network request, then enter a password to check

📁 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.2.0.tar.gz (42.6 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.2.0-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for localpass-0.2.0.tar.gz
Algorithm Hash digest
SHA256 052f96a683cf0ce20138411b6cf362c63650c81e7832f6163f40c0292489d679
MD5 292faed723b9a224b70de777af4bd792
BLAKE2b-256 49c7215397ee9133c66891fd7174595fe774e2f6c46e4592161ba557ffd4efa6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for localpass-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51a4820b1de63cb2b519336051dc1d43b4239dbfc4b9b925d0b2bee00f92f846
MD5 950ec088401cc82e27f4f37a71af6aed
BLAKE2b-256 429fe8075a42c685f4e0195724c1e680b6126d75dc7313eb751b430f91a5b7cd

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