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.3.tar.gz (15.4 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.3-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: freeotp_vault-0.1.3.tar.gz
  • Upload date:
  • Size: 15.4 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.3.tar.gz
Algorithm Hash digest
SHA256 659442b8459ef64f8e50dfd3ddbcacdc95bcb8ec6f7061fe5717a614766b71cd
MD5 573b4269326575475d7248e3228c12e7
BLAKE2b-256 79eaf05b7fcd0c13a8a2bd1edfe94a9b57e6321485f0f87fcb320c6c8bc2de29

See more details on using hashes here.

Provenance

The following attestation bundles were made for freeotp_vault-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: freeotp_vault-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c85be009a09e0f4077a945e3f29b566382c036328b582cf932f02741dfd83330
MD5 621e998c81f6283e90f120e34d637d6e
BLAKE2b-256 a6658e9cb3c3676447e3f2765a82bf45bb329005de543082262d27b96eeb9940

See more details on using hashes here.

Provenance

The following attestation bundles were made for freeotp_vault-0.1.3-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