Two.Factor.Cli is a cross-platform command-line tool for managing two-factor authentication (2FA) secrets and generating TOTP codes from the terminal.
The tool is designed for developers and power users who prefer a fast, scriptable, and local-first workflow for working with 2FA entries. It supports adding, listing, and generating one-time passwords directly from the command line.
- Store and manage TOTP entries locally
- Generate time-based one-time passwords from the terminal
- List saved 2FA entries
- Add new entries through a simple CLI interface
- Remove saved entries
- Designed to be distributed and installed as a .NET global tool
The recommended way to install Two.Factor.Cli is via dotnet tool:
dotnet tool install --global 2faRun
dotnet packin Solution folder
dotnet tool install -g Two.Factor.Cli --add-source %path/to/nupkg/file/created/in/previous/step%Ommit -g if you don`t want to install tool globally
After installation, the tool can be used from the command line:
2fa --help- .NET 10 SDK or later
Currently, the tool is supported only on Windows.