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.2.tar.gz (14.3 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.2-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: freeotp_vault-0.1.2.tar.gz
  • Upload date:
  • Size: 14.3 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.2.tar.gz
Algorithm Hash digest
SHA256 add46a123841c5f50b6921814b33c32408c7055e682a13c4c89a02b8eeafc478
MD5 5275287676dbb9d81bff629ec6e741a7
BLAKE2b-256 915563937db46245f18bf2acb8dc3b0f7b4a7de663b71793f9eeedb8a55a4ad6

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: freeotp_vault-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e3ac25f2726f06e7c651efe74db469854702e692e483e1f09f72df6aa0716a14
MD5 91b2ae2cdd2a2fb72af9a94b25f01134
BLAKE2b-256 a959bd9cbb795f6b412a7c5a2c9b9de8077c494d6ba06196493ba3f58f7d144f

See more details on using hashes here.

Provenance

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