Skip to main content

freeotp-vault

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

PyPI Python Coverage Ruff

Install

pip install freeotp-vault

For system keyring support (to store password securely):

pip install freeotp-vault[keyring]
# or on Debian/Ubuntu:
sudo apt install libsecret-1-0 libsecret-tools

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"

Automatic Backups

Every time the vault is saved, a timestamped backup is created in ~/.config/freeotp-vault/backups/. Up to 5 backups are retained.

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 ID → Desktop 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.

Metadata

Release files for freeotp-vault 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for freeotp-vault 0.1.4
File Size Uploaded
freeotp_vault-0.1.4.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for freeotp-vault 0.1.4
File Interpreter ABI Platform
freeotp_vault-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 36.1 kB

Release files / freeotp_vault-0.1.4.tar.gz

Download URL freeotp_vault-0.1.4.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e095debef01dccf15eb8debfe62666c332a54a840dc12480a91f77b6ff95cd06
BLAKE2b-256 checksum
How to use checksums
ec7995fa755521fd5aa8a13fa724941247e64e7c05dfb075b8587c240f7970a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release files / freeotp_vault-0.1.4-py3-none-any.whl

Download URL freeotp_vault-0.1.4-py3-none-any.whl
Size 20.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2364ee7166b421fcf690101017810c747c67ea9eb8f7ba092762748c7538cf7d
BLAKE2b-256 checksum
How to use checksums
d0f7c65edea53a4d694cca70548d4ad48bad712d769b23aa7cc0ca4a8dfef7ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page