tofa qr

Print a QR code for one account in the terminal, or export QRs for one or all accounts to disk.

Synopsis

tofa qr [FLAGS]

Flags

FlagDescription
--all <ALL>Export all accounts as a migration QR
--multi <MULTI>Emit one otpauth:// QR per entry instead of a single migration QR. Requires --all and --output-dir. Preserves period/algorithm/digits for every entry — use this when the migration format would refuse because the selection mixes 30s and non-30s entries
--output <PATH>Save QR as PNG instead of displaying in terminal (single-QR modes)
--output-dir <DIR>Directory to write per-entry PNGs into when using --multi

Examples

Print one account's QR in the terminal (scannable from a phone camera held up to the screen):

$ tofa qr GitHub:you
Passphrase: ********
█▀▀▀▀▀█ ▀▀█▀▀ █▀▀▀▀▀█
█ ███ █  ▀ ▀▀ █ ███ █
█ ▀▀▀ █ ▀█▀▄  █ ▀▀▀ █
▀▀▀▀▀▀▀ ▀ ▀▀▀ ▀▀▀▀▀▀▀
...

Save as a PNG instead of printing:

$ tofa qr GitHub:you --output github-you.png
Passphrase: ********
QR saved to github-you.png

Export every account as a single migration QR (Google Authenticator format — scan it with the Authenticator app to import everything at once):

$ tofa qr --all --output migration.png
Passphrase: ********
QR saved to migration.png

If the selection mixes 30s and non-30s entries, the migration format can't carry them. Use --multi to write one otpauth:// PNG per entry instead — period, digits, and algorithm are preserved per file:

$ tofa qr --all --multi --output-dir ~/tofa-qrs
Passphrase: ********
Wrote 12 QR PNG(s) to /Users/you/tofa-qrs

Filenames are zero-padded and sanitized (01-GitHub_you.png, 02-Discord_you.png, …) so a directory listing matches the in-vault order.

Notes

  • --all is a switch; the <ALL> placeholder above is a clap quirk for bool flags.
  • Terminal QRs use Unicode block characters and need a font with full block support (most modern fonts do).
  • The migration format is the same one Google Authenticator uses — any reader that handles otpauth-migration:// will accept the result.
  • --multi is the right mode when the migration format refuses your selection (mixed periods) or when the receiving app prefers per-account QRs. The output round-trips through tofa import — zip the directory (zip -r tofa-qrs.zip ~/tofa-qrs) and import the archive.

See also

  • tofa export — JSON dump for offline backups.
  • tofa add with --qr — the inverse: read a QR image.