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.
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:
-
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
-
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file freeotp_vault-0.1.4.tar.gz.
File metadata
- Download URL: freeotp_vault-0.1.4.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e095debef01dccf15eb8debfe62666c332a54a840dc12480a91f77b6ff95cd06
|
|
| MD5 |
a4938fbdbb669c1a1ab77e24d5b7bd57
|
|
| BLAKE2b-256 |
ec7995fa755521fd5aa8a13fa724941247e64e7c05dfb075b8587c240f7970a8
|
Provenance
The following attestation bundles were made for freeotp_vault-0.1.4.tar.gz:
Publisher:
pypi-publish.yml on daedalus/freeotp-vault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
freeotp_vault-0.1.4.tar.gz -
Subject digest:
e095debef01dccf15eb8debfe62666c332a54a840dc12480a91f77b6ff95cd06 - Sigstore transparency entry: 1371869219
- Sigstore integration time:
-
Permalink:
daedalus/freeotp-vault@8db5bd350ee17a9f587bca0ab6de1140b7c8f10d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8db5bd350ee17a9f587bca0ab6de1140b7c8f10d -
Trigger Event:
release
-
Statement type:
File details
Details for the file freeotp_vault-0.1.4-py3-none-any.whl.
File metadata
- Download URL: freeotp_vault-0.1.4-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2364ee7166b421fcf690101017810c747c67ea9eb8f7ba092762748c7538cf7d
|
|
| MD5 |
f9769f8df44959bcf73cb65bc474d0c7
|
|
| BLAKE2b-256 |
d0f7c65edea53a4d694cca70548d4ad48bad712d769b23aa7cc0ca4a8dfef7ed
|
Provenance
The following attestation bundles were made for freeotp_vault-0.1.4-py3-none-any.whl:
Publisher:
pypi-publish.yml on daedalus/freeotp-vault
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
freeotp_vault-0.1.4-py3-none-any.whl -
Subject digest:
2364ee7166b421fcf690101017810c747c67ea9eb8f7ba092762748c7538cf7d - Sigstore transparency entry: 1371869288
- Sigstore integration time:
-
Permalink:
daedalus/freeotp-vault@8db5bd350ee17a9f587bca0ab6de1140b7c8f10d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@8db5bd350ee17a9f587bca0ab6de1140b7c8f10d -
Trigger Event:
release
-
Statement type: