TOTP codes on the command line from a seed you already hold: KeePassXC, oathtool, gopass, cotp and toto

Choose KeePassXC to keep a seed you already hold encrypted and read codes from its command-line tool, narrowly ahead of oathtool for full control over a seed you keep elsewhere. toto is our Rising Star for structured script output.

PRACTICAL PICKSPreferredPickOur Preferred PickKeep the seed encrypted, on any platform$0

KeePassXC

Paste the seed once into the desktop app; keepassxc-cli then prints or copies the current code. The seed stays in an encrypted local database, with builds for Windows, macOS and Linux.

Narrow lead: 4.03 against oathtool’s 4.00. The command-line tool cannot add a seed, and there is no fixed-time option.

Why KeePassXC is our Pick
PRACTICAL PICKSRisingStarOur Rising StarStructured output and clear errors for scripts$0

toto

Documents standard-input credentials, fixed-time codes, verification and JSON output. Scores 3.65 against KeePassXC at 4.03.

Requires Dart and leaves encrypted seed storage to you; no independent security assessment found.

Why toto is our Rising Star

Who is this article for? Developers, administrators and account owners who already hold a TOTP seed and want codes from a command line on their own computer, without network access, a phone app or a new online account.

About 25 min read

What Preferred Pick, Rising Star and Ready to Rock mean

The quick list

Start with KeePassXC to keep the seed encrypted on any platform. Choose oathtool for full control over a seed you keep elsewhere, gopass for an existing store, cotp for a terminal vault or toto for structured script output. All five are free.

All five are free, open-source tools with no required account or subscription, checked November 8, 2026. KeePassXC needs its desktop app for setup; gopass needs GnuPG and a key pair; toto needs Dart. Prices for three additional candidates could not be confirmed.

The comparison at a glance

Compare where each tool keeps the seed, how the seed reaches it, and how it behaves when something is wrong.

KeePassXC is our Preferred Pick, with a narrow lead over oathtool. Columns follow scores: KeePassXC, oathtool, gopass and cotp, followed by Rising Star toto. All tools remain selectable.

Command-line tools for TOTP codes from a seed you hold
FeatureKeePassXCoathtoolgopasscotptoto
Best fitPreferred Pick: encrypted seed database and codes across platformsAlso consider: code control from a seed you keep encrypted elsewherePeople who already keep their passwords in gopassAlso consider: encrypted terminal vault with imports and JSON outputRising Star: structured scripts and fixed-time codes; you protect the seed
Our score out of 54.034.003.903.903.65
Where the seed is kept between usesEncrypted KeePassXC database (KDBX 4; Argon2 recommended)Nowhere: you keep it. The manual shows a GnuPG-encrypted file piped inEach entry encrypted with GnuPG (default) or the experimental age backend; entry names are not hidden; Git by defaultXChaCha20Poly1305-encrypted database with Argon2id (maker documentation)No vault; you keep the seed encrypted elsewhere
How the seed reaches the toolPasted once in the KeePassXC app; the command-line tool never takes the seed. The database opens with a password, key file or YubiKeyStandard input (-) or a file (@FILE). A key typed as an argument also works, but the manual warns other users can see itHidden prompt or standard input (gopass insert entry totp), or an otpauth:// line in an entryMasked terminal form or prompted secret; otpauth imports--secret-stdin or --uri-stdin; environment inputs; avoid direct arguments
When something is wrongReports an error if the entry has no TOTP set upInvalid Base32 seed: error message and exit status 1 (source code)Documented, stable numbered exit codes since 1.17.0 (August 2026)Failure exit codes remain unconfirmed.Maker documents input error exit 2, mismatch 1, unexpected error 70; errors on standard error
Latest release, checked November 8, 20262.8.0 stable, October 21, 20262.6.15, October 13, 20261.17.4, October 10, 20261.11.1, October 26, 2026pub.dev 1.0.1; August 2026 release; no GitHub release assets
Cost and licence$0; GPL-2.0 or 3.0$0; GPL-3.0 or later$0; MIT$0; GPL-3.0$0; MIT; requires Dart 3.x
Reader reviewsNo reviews yet. Write a reviewNo reviews yet. Write a reviewNo reviews yet. Write a reviewNo reviews yet. Write a reviewNo reviews yet. Write a review

All five are free and generate codes without network access. A TOTP seed lets anyone who copies it make your codes, so keep it encrypted, never type it as a command argument and keep it out of logs. None of these tools recovers a lost seed. KeePassXC is our Preferred Pick, with a narrow lead: 4.03 against oathtool’s 4.00. toto is our Rising Star. Incumbent documentation checked October 20, 2026; prices, releases and new candidates checked November 8, 2026.

All features and sources 13 criteria

Open the groups that matter to you. They compare the same selected tools. “Planned” means future work, not an available feature. Sources include the published conditions.

Keeping and supplying the seed

Show 3 criteria
Keeping and supplying the seed
FeatureKeePassXCoathtoolgopasscotptoto
How the seed reaches the toolPasted once in the KeePassXC app; the command-line tool never takes the seed. The database opens with a password, key file or YubiKeyStandard input (-) or a file (@FILE). A key typed as an argument also works, but the manual warns other users can see itHidden prompt or standard input (gopass insert entry totp), or an otpauth:// line in an entryMasked terminal form or prompted secret; otpauth imports--secret-stdin or --uri-stdin; environment inputs; avoid direct arguments
Where the seed is kept between usesEncrypted KeePassXC database (KDBX 4; Argon2 recommended)Nowhere: you keep it. The manual shows a GnuPG-encrypted file piped inEach entry encrypted with GnuPG (default) or the experimental age backend; entry names are not hidden; Git by defaultXChaCha20Poly1305-encrypted database with Argon2id (maker documentation)No vault; you keep the seed encrypted elsewhere
What the project says about storing seedsGuide: one database for TOTP and passwords “will eliminate the advantages of two-factor authentication”; use a separate oneManual: a key on the command line is “not recommended on multi-user systems”Docs: it “may not behoove you” to store OTP seeds with passwords; consider a separate storeProtect vault backups and exports; encryption is documented by the makerDocs warn against command arguments and logging secret-bearing output
Sources for keeping and supplying the seed

Checked November 8, 2026: cotp documentation, cotp releases, toto documentation, toto registry and KeePassXC releases.

Documentation read October 20, 2026: oathtool manual, KeePassXC user guide, gopass security documentation, totp-cli README and pass-otp README and issue 224. Documented behaviour, not measured security.

Generating and checking codes

Show 4 criteria
Generating and checking codes
FeatureKeePassXCoathtoolgopasscotptoto
Code optionsDigits, period and algorithm set in the app, plus Steam codes; the command-line tool shows or copies the current codeTOTP and HOTP; SHA-1, SHA-256, SHA-512; 6 to 8 digits; any time step. Reads keys as hex unless you add --base32; no otpauth:// linksTOTP and HOTP from an otpauth:// link or totp field; Steam codes; HOTP counter updated by handTOTP, HOTP, Steam, Yandex and MOTP; adjustable algorithms and digitsTOTP and HOTP; SHA-1/256/384/512; 6–8 digits; custom period; strict uppercase unpadded Base32
Code for a fixed timeNoYes: --now; -w also checks a code across a windowNoNo fixed-time option documentedYes: --at; check verifies codes in a window
When something is wrongReports an error if the entry has no TOTP set upInvalid Base32 seed: error message and exit status 1 (source code)Documented, stable numbered exit codes since 1.17.0 (August 2026)Failure exit codes remain unconfirmed.Maker documents input error exit 2, mismatch 1, unexpected error 70; errors on standard error
Output for scripts and clipboardshow -t prints the code; clip -t copies it and clears it after 10 seconds by defaultPrints only the code; no clipboard option-o prints only the code; -c copies itlist --json; extract matching code; --password-stdin supported in 1.11.1Text, JSON or LON; versioned schema and explicit exit codes
Sources for generating and checking codes

Checked November 8, 2026: cotp documentation, cotp releases, toto documentation, toto registry and KeePassXC releases.

Read October 20, 2026: oathtool manual and source, keepassxc-cli manual, gopass otp and exit-code documentation, totp-cli 1.9.2 source and May 2026 change.

Setup, maintenance and security

Show 5 criteria
Setup, maintenance and security
FeatureKeePassXCoathtoolgopasscotptoto
Cost and licence$0; GPL-2.0 or 3.0$0; GPL-3.0 or later$0; MIT$0; GPL-3.0$0; MIT; requires Dart 3.x
What you need firstThe KeePassXC app, to create the database and set up each codeNothing beyond the packageA GnuPG key pair (or an age identity) and, by default, GitPackage or Rust build; Windows build tools may be neededDart >=3.3.0 and <4.0.0; pub.dev installation
Platforms and installWindows 10 and 11 (installer, ZIP, winget), macOS, Linux (Flatpak, AppImage, Snap, distribution packages)Homebrew (macOS, Linux), Debian, Ubuntu, NetBSD, Mageia. No Windows build found; use WSLWindows (winget, Scoop, Chocolatey), macOS (Homebrew), Linux (project APT repository, Arch, Fedora). Debian’s own “gopass” package is a different programLinux and macOS packages; Windows Rust builds and MSYS2 packagespub.dev lists Windows, macOS and Linux; needs Dart
Latest release, checked November 8, 20262.8.0 stable, October 21, 20262.6.15, October 13, 20261.17.4, October 10, 20261.11.1, October 26, 2026pub.dev 1.0.1; August 2026 release; no GitHub release assets
Security advisoriesSeptember import, browser and Pageant fixes now in stable 2.8.0; none concerned CLI TOTPCVE-2024-47191 (login module, fixed 2.6.12) and CVE-2026-109117 (key-file library, rated low, fixed 2.6.15); neither in oathtool’s code generationThree moderate 2026 advisories about shared stores; release notes for 1.17.0 and 1.17.4 list fixes, but the advisories name no patched versionNone published on GitHub; no security policy; 1.10.1 fixed full-disk database lossNone published on GitHub; no security policy; no independent security assessment found
Sources for setup, maintenance and security

Checked November 8, 2026: cotp documentation, cotp releases, toto documentation, toto registry and KeePassXC releases.

Read October 20, 2026: OATH Toolkit news and advisory; KeePassXC and gopass advisories; release pages; KeePassXC downloads; gopass setup guide; Homebrew records for oath-toolkit, totp-cli and pass-otp.

Earlier hands-on check, October 3, 2026

Show 1 criteria
Earlier hands-on check, October 3, 2026
FeatureKeePassXCoathtoolgopasscotptoto
Earlier hands-on check, October 3, 2026 (historical)Not part of the checkUbuntu 24.04 package 2.6.11-2.1ubuntu0.1: returned both RFC 6238 test codes for two fixed times; invalid seed gave exit status 1 and no codeNot part of the checkNot part of the checkNot part of the check
Sources for earlier hands-on check, october 3, 2026

Historical observation from a small Linux check run on October 3, 2026, before Practical Picks adopted its research-only method later that day. It used only the public RFC 6238 test seed and an invented invalid seed, covered only oathtool and totp-cli, and did not decide any recommendation. The behaviour it recorded for an invalid seed matches each project’s source code. Earlier check record, October 3, 2026.

What matters when choosing

KeePassXC is our Preferred Pick for keeping a seed you already hold encrypted and reading its codes from the command line, but its lead is narrow. It scores 4.03 out of 5 and oathtool 4.00, a margin smaller than a one-point change in any of our four criteria. You paste the seed once into the free KeePassXC desktop app; after that, keepassxc-cli show -t prints the current code and clip -t copies it and clears the clipboard. The seed stays in an encrypted database on your computer, there are official builds for Windows, macOS and Linux, and stable version 2.8.0, released October 21, 2026, includes the September security fixes. Keep TOTP seeds in a separate database from your passwords, as its guide advises. The project publishes its source code under the GPL, and its maintainers, including Jonathan White and Janek Bevendorff, work in a public GitHub organization. The compromises: the command-line tool cannot add a seed, and it has no option for a code at a fixed time. keepassxc-cli manual, KeePassXC releases (checked November 8, 2026), GitHub organization (checked November 13, 2026).

toto is our Rising Star for scripts that need structured output and explicit error codes. Its maker documents seed input through standard input, fixed-time codes, code verification and JSON output, without a local vault or an online account. It scores 3.65 against KeePassXC’s 4.03. You need the Dart runtime and must keep the seed encrypted yourself. Its public documentation supports this narrow recommendation; we found no independent security assessment. toto documentation, package registry (checked November 8, 2026).

Choose oathtool for full control over a code from a seed you keep encrypted elsewhere. It reads the seed from standard input or a file, handles SHA-1, SHA-256 and SHA-512, six to eight digits and other time steps, and gives the code for a time you set with --now. It can check a code against a window of time steps and fails clearly on an invalid Base32 seed. It stores nothing, reads keys as hexadecimal unless you add --base32, and has no listed Windows build. oathtool manual (checked October 20, 2026).

If you already keep your passwords in gopass, its otp command is a sound alternative. It encrypts each entry with GnuPG, prints only the code for scripts with -o, and is actively maintained, with version 1.17.4 released on October 10, 2026. You need a GnuPG key pair first, and three 2026 advisories concern stores shared with other people through Git. gopass otp command, gopass advisories

cotp is another option for an encrypted terminal vault. It imports authenticator backups and supports scripted output as well as an interactive dashboard. Its latest release fixes piped-password handling; use current packages and keep a backup of the vault. cotp documentation, releases (checked November 8, 2026).

A TOTP generator is not an account-recovery service. You need the original seed, and what you get is a short-lived authenticator code, not a provider-issued recovery code. If the seed is gone, use that provider’s documented recovery route. Never type a real seed as a command argument, keep it out of shared logs, and remember that anyone who copies the seed can make your codes for as long as it stays valid. A generator without network access does not make TOTP resistant to phishing. If you own a YubiKey, Yubico’s ykman oath keeps the seed on the key itself instead. GitHub’s distinction between recovery codes and TOTP backups, NIST authentication guidance, ykman OATH commands

KeePassXC

Preferred Pick · encrypted seed storage across platforms

$0GPL-2.0 or 3.0 · Windows, macOS, Linux

Our Preferred Pick, narrowly: choose KeePassXC to keep the seed in an encrypted database and read codes with keepassxc-cli, on Windows, macOS or Linux. Keep TOTP seeds in a separate database from your passwords, as its guide advises. Scores 4.03 against oathtool’s 4.00.

Reasons to choose it

  • Seed kept in an encrypted KeePassXC database
  • Official builds for Windows, macOS and Linux; command-line tool included
  • Independent 2023 audit of database handling and cryptography

What to watch

  • Each code must be set up in the app; the command-line tool cannot add one
  • Use stable 2.8.0 for the September security fixes
  • No option for a fixed-time code

KeePassXC is a free desktop password manager, and it comes with a command-line tool, keepassxc-cli. keepassxc-cli show -t followed by the database and entry name prints the entry’s current code, and clip -t copies it to the clipboard and clears it after 10 seconds by default; both report an error if the entry has no TOTP set up. The database is unlocked with its password, a key file or a YubiKey. There is no option to give a fixed time. The command-line tool cannot add a TOTP seed: its add and edit commands set only the title, username, URL, notes and password. You add the seed once in the KeePassXC app, through TOTP, then Set up TOTP, where you paste it and can change the digits, period or algorithm. keepassxc-cli manual, KeePassXC user guide

The seed is stored in the encrypted database, and the guide recommends the KDBX 4 format with the Argon2 key-derivation function. It also warns: “Storing TOTP codes in the same database as the password will eliminate the advantages of two-factor authentication. If you desire maximum security, we recommend keeping TOTP codes in a separate database that you only unlock when needed.” An independent consultant, Zaur Molotnikov, audited version 2.7.4 free of charge in January 2023, concentrating on reading and writing databases and on the cryptography. He found that KeePassXC “provides sufficient cryptographic protection” when you use a strong password and the latest file format, and suggested that memory holding secrets could be cleared better after the database locks. Audit report announcement

Read the full KeePassXC analysis and sources

Version 2.7.12 fixed a Windows library-loading flaw. Five more advisories published in September concerned old KeePass 1 file imports, browser integration and Windows Pageant; none involved the command-line tool or TOTP. Stable version 2.8.0 now includes those fixes, along with improved clearing of decrypted database fragments. It was released October 21, 2026, and Homebrew now distributes it with the command-line binary. Upgrade older installations. KeePassXC releases, advisories, Homebrew package (checked November 8, 2026).

KeePassXC is free under the GPL version 2 or 3. The project offers an installer, a portable ZIP and a winget package for Windows 10 and 11, builds for macOS, and Flatpak, AppImage and Snap packages for Linux, plus distribution packages; Debian 13 ships 2.7.10. Homebrew’s KeePassXC cask recorded about 28,900 installs in the 12 months to October 20, 2026. Its maintainers, including Jonathan White and Janek Bevendorff, publish the code in the keepassxreboot organization on GitHub, which GitHub has verified controls keepassxc.org; its privacy page says the app sends none of your stored data to the project or anyone else. Downloads, GitHub organization, privacy page (checked November 13, 2026).

Used KeePassXC? Share your experience to help other readers choose.

oathtool

Also consider · full control over a seed you keep elsewhere

$0GPL-3.0 or later · Homebrew, Debian, Ubuntu

Choose oathtool to turn a seed you keep encrypted into a code, with full control over time, digits and algorithm. Pipe the seed in from an encrypted file; never type it as an argument. Scores 4.00, narrowly behind KeePassXC at 4.03.

Reasons to choose it

  • Reads the seed from standard input or a file; its manual shows a GnuPG-encrypted example
  • Fixed-time codes with --now, and checks a code across a window
  • Invalid seed stops with an error and a failure exit status

What to watch

  • Stores nothing: protecting the seed is your job
  • Reads keys as hex unless you add --base32; no otpauth:// links
  • No Windows build; use WSL

oathtool takes the key as - to read it from standard input, as @FILE to read it from a file, or as a value typed on the command line, which its manual calls “not recommended on multi-user systems” because “command-line parameters of running processes can be seen by other users”. The manual’s own example decrypts a GnuPG-encrypted file and pipes it in: gpg --decrypt --quiet ~/.my-totp-secret.asc | oathtool --totp -. Add --base32 (or -b) for the usual Base32 seed; without it oathtool reads the key as hexadecimal, and version 2.6.15 added an explicit --hex option for that default. It ignores spaces in Base32 seeds, supports SHA-1, SHA-256 and SHA-512, six, seven or eight digits, a different time step or start time, --now for any fixed time, and -w to list or check codes across a window of time steps. It does not read otpauth:// links, so you supply the seed and any non-default settings yourself. In the current source code, a seed that fails Base32 decoding ends the run with an error message and exit status 1, and a code that fails validation exits with status 2. oathtool manual, oathtool source

Simon Josefsson, who wrote oathtool, publishes the OATH Toolkit’s releases and advisories. The project moved its code hosting to Codeberg in July 2025 and released 2.6.14 in January 2026 and 2.6.15 on October 13, 2026. Version 2.6.15 also makes oathtool reject contradictory options, such as --hotp with --totp, instead of silently picking one. Two advisories concern other parts of the toolkit. CVE-2024-47191 let a local user gain root through the pam_oath login module in versions 2.6.7 to 2.6.11; it was fixed in 2.6.12 in October 2024, and Ubuntu 24.04 fixed its 2.6.11 package the same month. CVE-2026-109117, reported on October 11, 2026 and fixed in 2.6.15 two days later, lets forged signatures pass in the PSKC key-file library when it is built with an XML security library older than 1.3.3; the project rates it low and knows of no realistic exploit. Neither affects how oathtool generates a code, but distribution packages install the shared library, so keep them updated. CVE-2026-109117 advisory, CVE-2024-47191 advisory, Ubuntu USN-7059-1

Read the full oathtool analysis and sources

oathtool is free under the GPL version 3 or later. Homebrew already ships 2.6.15 for macOS and Linux and recorded about 10,000 installs in the 12 months to October 20, 2026. Debian 13 ships 2.6.12 and Debian’s development branch 2.6.15; Ubuntu 24.04 ships 2.6.11 with the security fix backported, and Ubuntu 26.04 ships 2.6.14. The project’s download page lists packages for Debian, Ubuntu, NetBSD and Mageia but no Windows build, and we found none in MSYS2, Cygwin or Chocolatey, so on Windows you would use it inside the Windows Subsystem for Linux. Download page, Homebrew, Debian package

In an earlier hands-on check on October 3, 2026, before we adopted our research-only method, Ubuntu 24.04’s oathtool package 2.6.11-2.1ubuntu0.1 read the public RFC 6238 test seed from standard input and returned the standard’s codes, 94287082 and 07081804, for the two fixed times checked. Given an invalid seed, it exited with status 1 and printed no code, and the next valid call worked. On Linux it also read the seed from an inherited pipe through @/proc/self/fd/N. The check did not cover other platforms, the PAM module or a real seed. Earlier check record, October 3, 2026

Used oathtool? Share your experience to help other readers choose.

gopass

Also consider · if you already use gopass

$0MIT · needs a GnuPG key pair

Choose gopass otp if your passwords already live in gopass. Put OTP seeds in a separate store, use 1.17.4 or later, and take care with stores others can write to.

Reasons to choose it

  • Each entry encrypted with GnuPG; hidden prompt when adding a seed
  • -o prints only the code; documented exit codes
  • Frequent releases; 1.17.4 on October 10, 2026

What to watch

  • Needs GnuPG and a key pair first; age backend is experimental
  • Entry names are not hidden; store kept in Git by default
  • Three 2026 advisories about shared stores

gopass is a free password manager for the terminal that describes itself as a drop-in replacement for pass. gopass otp followed by an entry name prints the current code from an otpauth:// link or a totp field in that entry; -o prints only the code for scripts and -c copies it to the clipboard. You add a seed with gopass insert followed by the entry name and totp, which asks for it at a hidden prompt or reads it from standard input. It also generates Steam codes and HOTP codes, though you update the HOTP counter by hand. There is no option for a fixed time. Since version 1.17.0, from August 30, 2026, gopass documents stable, numbered exit codes for each kind of failure. otp command, insert command, exit codes

By default each entry is encrypted with GnuPG; an age backend exists but its documentation calls it experimental. gopass does not hide the names of entries, keeps the store in Git by default, and its threat model “assumes there are no attackers on your local machine”. Its documentation also says that, depending on your security needs, “it may not behoove you to store your OTP secrets alongside your passwords”, and points to a separate store. Security documentation, features

Read the full gopass analysis and sources

The project releases often: 1.17.0 in August 2026 and 1.17.4 on October 10, 2026. It published three moderate advisories in 2026, all about stores shared with other people. A crafted entry name from someone with write access to a shared, Git-synced store could make a recursive delete remove a folder outside the store (August 12, versions up to 1.16.1); gopass link could create links outside the store (October 4); and a symbolic link placed in the store could make gopass read, write or delete files outside it (October 9, both up to 1.17.3). The release notes for 1.17.0 and 1.17.4 list matching fixes, but on October 20, 2026 none of the three advisories named a patched version. Use 1.17.4 or later, and take care when syncing a store that others can write to. gopass advisories, releases

gopass is free under the MIT licence. Before using it you need GnuPG and a key pair, which its setup guide walks through, and usually Git. It is available through Homebrew (about 3,600 installs in the 12 months to October 20, 2026), the project’s own APT repository, Arch Linux, Fedora, Chocolatey, Scoop and winget, and as release downloads. Its guide warns that the package called gopass in Debian’s own repositories is a different program. Setup guide

Used gopass? Share your experience to help other readers choose.

cotp

Also consider · encrypted terminal vault

$0GPL-3.0 · packages or Rust build

Consider cotp for a terminal vault with authenticator imports and JSON output. Use current packages and keep a protected backup.

Reasons to choose it

  • Encrypted database with Argon2id key derivation, as documented by its maker
  • Prompted seed entry and authenticator imports
  • Linux and macOS packages; Windows build and MSYS2 packages

What to watch

  • No independent cryptographic assessment found
  • Some distribution packages lag upstream
  • No documented fixed-time option

cotp combines a terminal dashboard with commands for adding seeds, listing codes as JSON and extracting a matching code. Its documentation describes an XChaCha20Poly1305-encrypted database with Argon2id key derivation. Seed fields in the dashboard are masked, and cotp add can prompt for the secret. It supports TOTP, HOTP, Steam and other formats, with adjustable algorithms and digits. Use a prompt for secrets and keep exported backups protected. These are documented capabilities, not an independent cryptographic assessment. cotp documentation (checked November 8, 2026).

Version 1.11.1, released October 26, 2026, fixes piped-password handling. Version 1.10.1 fixed database loss when the disk is full. The maker documents Linux, macOS and Windows support, including a Rust build on Windows; Repology lists current packages for Homebrew, Arch and MSYS2, while some distribution packages lag. It is free under GPL-3.0. No security policy or published advisory appears on its GitHub security page; that is not proof of safety. It has no documented fixed-time option comparable to oathtool’s. releases, package inventory, security page (checked November 8, 2026).

Used cotp? Share your experience to help other readers choose.

toto

Rising Star · structured output for scripts

$0MIT · requires Dart 3.x

Choose toto for documented JSON output, fixed-time codes and explicit errors. Feed the seed through standard input and keep it encrypted yourself.

Reasons to choose it

  • Explicit standard-input routes for seeds and otpauth URIs
  • Fixed-time generation and verification with --at
  • Versioned JSON output and documented failure exit codes

What to watch

  • Requires the Dart runtime
  • Keeps no vault and cannot recover a seed
  • No independent security assessment found

toto is a free MIT-licensed Dart command-line tool that generates and verifies TOTP and HOTP codes. Its documentation describes --secret-stdin and --uri-stdin, a fixed time through --at, adjustable algorithms, six to eight digits and a custom period. Text output prints only the result; JSON and LON output include a versioned schema. The maker documents exit status 1 for a well-formed code that does not match, 2 for bad input and 70 for an unexpected internal error, with errors on standard error. That gives scripts a clearer contract than totp-cli 1.9.2’s success status on a malformed seed. toto documentation (checked November 8, 2026).

The August 2026 release is available from pub.dev as version 1.0.1; its registry lists Windows, macOS and Linux. Installation needs Dart 3.3 or later within the 3.x series. There are no packaged GitHub releases. The tool keeps no vault, so storage and recovery remain your responsibility. It requires canonical uppercase, unpadded Base32 and rejects spaces and lowercase instead of normalizing them. The project has no published security policy or advisory, and the issue list contains no user reports. Its documented interfaces support the recommendation, but independent evidence about its security and failure handling remains limited. package registry, GitHub releases, security page, issues (checked November 8, 2026).

Used toto? Share your experience to help other readers choose.

Which product are we missing?

Know a product that belongs in this article? Tell us what it does differently and why it deserves a closer look. Newcomers welcome.

Readers and product teams can suggest candidates. Suggestions inform our research; they do not guarantee inclusion or a recommendation.

Suggest a product

Opens an email draft with this article attached as a link. Nothing is sent until you send it.

No email app? Send the product name, website, and this article’s title to admin@practicalpicks.guide.

What people are saying

We have no Practical Picks reader reviews for these tools yet.

The project trackers show where users have pushed back. In 2022 a pass-otp user asked for the seed to be piped to oathtool rather than passed as an argument, because system audit logs can record command arguments; another pointed out that tools such as top show them to other users. In May 2026 another user reported that the eventual fix falls back to arguments with current oathtool versions. totp-cli users have asked for imports from the Aegis Android app (December 2025) and for unlocking the vault with a YubiKey (2023); both requests were still open on October 20, 2026. These are individual reports, not measurements. pass-otp issue 167, pass-otp issue 224, totp-cli issue 145, totp-cli issue 77

The makers of three of these tools give the same advice about storage: KeePassXC’s guide, gopass’s documentation and pass-otp’s README all warn that keeping two-factor seeds next to the passwords they protect weakens two-factor authentication, and suggest a separate database or store.

How we researched

This is public-source research. For this review we did not install, run or test any of these tools, create accounts or contact the projects. Our sources were each project’s documentation, manual pages, source code, release and commit records, issue trackers and security advisories, the OATH Toolkit’s advisories and news, package records (Homebrew, Debian and Ubuntu), the OSV and NVD vulnerability databases, and KeePassXC’s published audit, all read on October 20, 2026. No project supplied access or payment, and our links carry no affiliate tracking.

This article first appeared on October 3, 2026, comparing only oathtool and totp-cli, and then rested mainly on a small hands-on check run that day, before we adopted our research-only method later that day. We keep that check as a dated observation. On Linux, Ubuntu’s oathtool 2.6.11 package and totp-cli 1.9.2 each turned the public RFC 6238 test seed into codes that matched the standard or an independent calculation, and the check also gave each tool an invalid seed; a 2024 newcomer was screened the same way. The behaviour it recorded for an invalid seed is now confirmed by each project’s source code, and the check did not decide any recommendation here. Earlier check record, October 3, 2026

We wrote this for someone who already holds a TOTP seed, as a Base32 secret or an otpauth:// link, and wants codes from a command line on their own computer without network access, a phone app or a new online account, either now and then or in a script. Before scoring, we fixed four criteria and their weights: how the tool receives and keeps the seed (30%); code generation and checking, including fixed-time codes and failure behaviour (25%); maintenance and security record (25%); and setup and platforms (20%). Cost is not one of these four criteria. KeePassXC scores 4.03, oathtool 4.00, gopass and cotp 3.90 each, and toto 3.65. The numerical difference between KeePassXC and oathtool is narrow, 0.025 before rounding. KeePassXC is our Pick for encrypted storage on every platform; oathtool remains the choice for full control over a seed you keep elsewhere.

On November 8, 2026 we revisited the newcomers using GitHub’s TOTP directory and a dated candidate search, alongside the projects and package records. toto’s August 2026 release and documented script interfaces support our Rising Star recommendation. Independent reviews are not required for consideration, but their absence limits what we can say about security. We also considered MinTOTP, Smallstep CLI, Tessera and other terminal tools. Some projects do not establish their first public release date or support both Windows and macOS. Prices for three additional candidates could not be confirmed.

Other evaluated tools fall below the four highest scores. yitsushi/totp-cli scores 3.35: its age-encrypted vault is convenient, but released version 1.9.2 exits with success after an invalid seed; the May 2026 source fix remains unreleased. OTPClient scores 3.45: its encrypted database and CLI are useful on Linux, but portability and database handling require more care. Its current README describes development code; the 5.2.1 and 5.3.2 releases document fixes for data-loss and startup failures. TOFA scores 3.43: it documents an AES-256-GCM vault and imports, but explicitly supported installation targets are macOS and Linux, and recovery depends on your backup and passphrase. dotp scores 3.00: it offers standard-input codes but lacks a fixed-time option and its last release was July 18, 2024, with no later commits when we checked on October 20, 2026. go2fa scores 2.73: its encryption keys live beside its vault, and user reports raise installation and token-compatibility concerns. pass-otp scores 2.63 and is not recommended: its release passes the seed to oathtool as an argument, and issue 224 still reports that the later fix falls back with current versions. rsc/2fa scores 2.20 and is not recommended: its keychain is plaintext. totp-cli releases, OTPClient releases, TOFA, dotp, go2fa, go2fa issues, pass-otp issue 224, rsc/2fa (checked November 8, 2026).

Additional tools considered on November 8, 2026: Tessera scores 3.68, with an encrypted vault and JSON output on macOS and Linux; tfa scores 3.63, with fixed-time codes and several storage backends, though its automatic file fallback needs care; Runup01/mfacli scores 3.50, with cross-platform packages and a vault lock that requires a plaintext backup; agungcandra/mac-totp-cli scores 3.33, with Keychain storage but macOS-only installation and an application-enforced biometric gate; MinTOTP scores 3.13, with standard-input codes and a GPG example but limited current maintenance evidence; AG-Secret scores 3.08, with its vault passphrase file beside the database; and nordcloud/mfacli scores 2.78, with a local secrets cache and a Go build. None enters the top four. dmikushin/mfacli scores 2.55 and is not recommended because its store is plaintext; otptools scores 2.20 and is not recommended because its documented seed input uses process arguments. Smallstep CLI, JVitoroliv3ira/termotp and SecretKeeper lack enough detail on seed handling, failure behavior or recovery for a complete score. marcopaganini/termotp requires an existing Aegis export; 1shot types into GUI fields; agb1964/totp-cli documents seed creation and code verification rather than generating a current code from an existing seed. Tessera, tfa, Runup01/mfacli, mac-totp-cli, MinTOTP, AG-Secret, nordcloud/mfacli, dmikushin/mfacli, otptools, Smallstep CLI, JVitoroliv3ira/termotp, SecretKeeper, marcopaganini/termotp, 1shot, agb1964/totp-cli.

Yubico’s ykman oath requires a YubiKey. Account-bound password-manager CLIs fail the no-account requirement; graphical phone and desktop authenticators do not supply this command-line workflow.

ToolPublic sourcesWhat remains uncertain
oathtoolManual, source code, news, two advisories, download page, Homebrew, Debian and Ubuntu records, Ubuntu security notice.Behaviour on macOS and in WSL, whether every distribution package carries the 2.6.15 fixes, how readers store the seed in practice.
KeePassXCCommand-line manual, user guide, 2023 audit announcement, advisories, release notes, download page, Homebrew record.How the command-line tool behaves when unlocking from a script; the older manual predates 2.8.0.
gopassotp, insert, exit-code, security, features and setup documentation, advisories, release notes, Homebrew record.Whether 1.17.0 and 1.17.4 fully close the three 2026 advisories, how stable the experimental age backend is.
cotpDocumentation, release notes, security page, issue list and independent package inventory, checked November 8, 2026.No independent cryptographic assessment; some packages lag upstream.
totoDocumentation, pub.dev registry, release, security and issue pages, checked November 8, 2026.No independent security assessment or user reports; seed storage remains the reader’s responsibility.

None of these sources measures how often a tool produces a wrong code or exposes a seed in ordinary use. Next substantive review is due January 18, 2027, or sooner if a release or advisory changes this job. Found a change? Contact the editors.

Sources and evidence

Checked October 20, 2026: OATH Toolkit home page, oathtool manual, news, oathtool source, download page, advisories CVE-2026-109117 and CVE-2024-47191, Ubuntu USN-7059-1, Homebrew and Debian records; KeePassXC command-line manual for 2.7.12, user guide, audit report announcement, security advisories, CVE-2026-69150 advisory, 2.7.12 release, 2.8.0-beta1 release and downloads; gopass otp, insert and exit-code documentation, security documentation, features, setup guide, advisories and releases; yitsushi/totp-cli README, 1.9.2 release, 1.9.2 instant source, May 2026 change, issues 77 and 145, MIT licence and Homebrew; pass-otp project, issues 167 and 224, Debian changelog and Homebrew; set aside: rsc/2fa and ykman OATH commands; background: RFC 6238, GitHub recovery-method guidance and NIST authentication guidance; and the earlier check record, October 3, 2026. No project supplied access or influenced the conclusion. No affiliate links were used. Recheck releases and advisories before any public release.

Updated November 8, 2026: KeePassXC releases, Homebrew KeePassXC, cotp, cotp releases, toto and pub.dev. Checked November 13, 2026: KeePassXC GitHub organization, privacy page, home page and Open Collective page. Other incumbent documentation retains its October 20 check date.

No screenshots are shown: these are command-line tools, and this comparison is based on public sources. The earlier check record, October 3, 2026 describes the public test seed used in a small check before our research-only method.