Skip to main content

Encrypted CLI vault for FreeOTP JSON exports with system keyring support

Project description

freeotp-vault

Encrypted CLI vault for FreeOTP JSON exports with system keyring support.

PyPI Python Coverage Ruff

Install

pip install freeotp-vault

Usage

Import a FreeOTP backup

freeotp-vault init path/to/freeotp-export.json

List accounts

freeotp-vault list
freeotp-vault list --filter github

Generate tokens

freeotp-vault token
freeotp-vault token --filter github

Change password

freeotp-vault change-password

Remove accounts

freeotp-vault remove --filter "old account"

Google Drive Sync

Backup and sync your vault with Google Drive for cross-device access.

Setup:

  1. Create OAuth credentials:

    • Go to Google Cloud Console
    • Create OAuth client IDDesktop app
    • Download as credentials.json
    • Save to ~/.config/freeotp-vault/credentials.json
  2. Authenticate:

freeotp-vault gdrive-login

Sync commands:

# Upload vault to Google Drive
freeotp-vault gdrive-sync --upload

# Download vault from Google Drive
freeotp-vault gdrive-sync --download

Python API

from freeotp_vault import (
    encrypt_vault,
    decrypt_vault,
    parse_freeotp_json,
    generate_token,
    get_password_from_keyring,
    store_password_in_keyring,
)

# Parse a FreeOTP JSON export
tokens = parse_freeotp_json(json_string)

# Encrypt/decrypt vault data
blob = encrypt_vault(data, "password")
plaintext = decrypt_vault(blob, "password")

# Generate OTP code
code = generate_token(token_dict)

Development

git clone https://github.com/daedalus/freeotp-vault.git
cd freeotp-vault
pip install -e ".[test]"

# With Google Drive support
pip install -e ".[gdrive]"

License

MIT License - see LICENSE file.

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

freeotp_vault-0.1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

freeotp_vault-0.1.1-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file freeotp_vault-0.1.1.tar.gz.

File metadata

  • Download URL: freeotp_vault-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freeotp_vault-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b7dd68684f6a2389ef4f8ad9b20419b541e38b1a1685a8ea1a99d22868fbac1b
MD5 c04a9ea16bd188db24d28c1587d57411
BLAKE2b-256 052eb176130616f936bae18e6d475be1efe1830d91fd819501ae5df744d94922

See more details on using hashes here.

Provenance

The following attestation bundles were made for freeotp_vault-0.1.1.tar.gz:

Publisher: pypi-publish.yml on daedalus/freeotp-vault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file freeotp_vault-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: freeotp_vault-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for freeotp_vault-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba61693bcc4f5071e08b1f4da3c17a3e4f2b0e16fcdc4490cb810d3445e6a79
MD5 2b2d2013d667d769900498da153aee2c
BLAKE2b-256 59a67694b9d6af360b953fca13935fb5f678f77f4a2e9829c4cded98bfef842b

See more details on using hashes here.

Provenance

The following attestation bundles were made for freeotp_vault-0.1.1-py3-none-any.whl:

Publisher: pypi-publish.yml on daedalus/freeotp-vault

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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