OTPCLIENT-CLI(1)
๐ OTPCLIENT-CLI(1) ๐
okay bestie, welcome to the OTPClient Manual โ this is the page for otpclient-cli, the command-line bestie of the OTPClient GUI. she's lowkey iconic and she's about to carry your whole two-factor life. ๐
โจ NAME โจ
otpclient-cli โ the command-line interface for OTPClient. no windows, no buttons, just vibes and OTPs. ๐
๐ธ SYNOPSIS ๐ธ
so here's the mood board, fr fr:
otpclient-cli --show [-d DB] [-a ACCOUNT] [-i ISSUER] [-m] [-n]
[--output FORMAT]
otpclient-cli --list [-d DB] [--output FORMAT]
otpclient-cli --list-databases [--output FORMAT]
otpclient-cli --list-types
otpclient-cli --import --type TYPE --file PATH [-d DB]
otpclient-cli --export --type TYPE [--output-dir DIR] [-d DB]
otpclient-cli --export-settings [--file PATH]
otpclient-cli --import-settings --file PATH
๐ฆ DESCRIPTION ๐ฆ
otpclient-cli is the command-line counterpart to the OTPClient GUI. like, they're literally the same girl, different outfit. ๐
she can:
- show one-time passwords
- list the contents of a database
- import or export tokens in any of the supported formats
- back up or restore application settings
and the tea on storage: the on-disk database format is identical to the one used by the GUI, and it's encrypted with AES-256-GCM using an Argon2id-derived key. so yes, your secrets are locked up tighter than your finsta. ๐โจ
๐ OPTIONS ๐
๐ฏ Actions
okay so the rules are the rules: exactly one action must be supplied on each invocation. one. not two. not zero. pick one, bestie. ๐
-s,--showโ show the OTP for one or more tokens. she needs--accountor--issuerto know who you're talking about, so don't leave her guessing. ๐-l,--listโ list every token in the database โ that's the account, the issuer, and the group. the whole roster. ๐--list-databasesโ print the list of known databases from the configuration. your database IRLs, basically.--list-typesโ print the import/export type identifiers that--typewill actually accept. check this before you come for her with a made-up format name. ๐ญ--importโ import tokens from a backup file. requires--typeand--file. both of them, no skipping. ๐--exportโ export tokens to a backup file. requires--type.--export-settingsโ print the application settings (GSettings) as JSON, or write them to the file given via--file. your choice, main character. โจ--import-settingsโ restore application settings from the JSON file given via--file. glow-up restored. ๐-v,--versionโ print the version and exit. short, sweet, slays. ๐
๐ Selection
-d,--database DBโ path to the database, or a database name as printed by--list-databases. when you omit it, the default database from the configuration gets used. she's got a fave and it's in your config. ๐-a,--account ACCOUNTโ account label to match (used with--show).-i,--issuer ISSUERโ issuer to match (used with--show).-m,--match-exactโ match--accountand--issuerwith case-sensitive equality instead of the default case-insensitive contains-style comparison. so default is chill and fuzzy,-mis precise and picky. no in-between. ๐ฏ-n,--show-nextโ also print the OTP that will become valid after the current period. she's showing you the future, bestie. ๐ฎ has no effect for HOTP tokens though โ HOTP doesn't do periods, so this one just sits there politely doing nothing. ๐
๐ฅ๐ค Input / output
-t,--type TYPEโ backup format identifier. use--list-typesto see the accepted values. don't guess, just look. ๐-f,--file PATHโ backup file to import, or settings file to write/read. depends on which action you're on, iykyk.-o,--output-dir DIRโ destination directory for--export. defaults to the user's home directory. not available in the Flatpak build โ so if you're on Flatpak, this option literally ghosted you. ๐ป-p,--password-file PATHโ read the database decryption password from the first line ofPATHinstead of prompting on stdin. ngl this is the convenient one. BUT: the file must be a regular file (not a symlink) with mode0600or stricter. symlinks and loose permissions? absolutely not. ๐ซ๐--output=FORMATโ output format for--show,--list, and--list-databases. accepted values:table(that's the default, btw),json, orcsv. JSON output is a single document; CSV output starts with a header row. pick your fighter. ๐
๐ EXAMPLES ๐
List every account/issuer pair in the default database:
otpclient-cli --list
Print the current OTP for an account, plus the next one:
otpclient-cli --show -a alice -n
Get the current OTP as a JSON object for scripting:
otpclient-cli --show -a alice --output=json
Import an Aegis encrypted backup:
otpclient-cli --import --type aegis_enc --file aegis.json
Export to a 2FAS plain backup in /tmp:
otpclient-cli --export --type twofas_plain -o /tmp
Use a passphrase file (chmod 0600) instead of stdin:
otpclient-cli --show -a alice -p ~/.config/otpclient/passphrase
โญ EXIT STATUS โญ
otpclient-cli exits with 0 on success and a non-zero status on error. and bestie, the error list is giving: incorrect password, missing file, malformed input, etc. ๐ญ the specific error messages get written to standard error, so they'll show up right in your terminal where you can see them. ๐
๐ FILES ๐
~/.config/otpclient/otpclient.cfgโ the configuration file holding the default database path. this is where your fave database lives. ๐ ๐
๐ซถ SEE ALSO ๐ซถ
๐ BUGS ๐
found a bug? not her fault, but she wants to know. report issues at https://github.com/paolostivanin/OTPClient/issues โ go tell the devs, they're listening. ๐โจ
okay that's the whole page, you ate that. ๐
this was brought to you by otpclient-cli, from the OTPClient Manual, dated May 2026. go forth and OTP responsibly, bestie. ๐ ๐๐ฆ
๐ฆ where this page comes from
- nixpkgs unstable: otpclient 5.1.8
- ubuntu stonking: otpclient-cli 5.1.5-1 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms