Repository navigation
One‐Off Code Generation
The following forms of the "generate" command are accepted:
- Generate for all entries
- Generate for the service with a specified Id
- Generate for all entries for a service, given its name
- Generate for a specific service and account combination
To generate TOTPs for all entries in the database, use the following form of the command:
/path/to/OtpGenerator.Terminal --generate
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
Each service is assigned a unique "Id" when it's added to the database. This is shown when 2FA codes are generated and when the contents of the database are listed. For example:

This Id can be used to specify a service for which a TOTP should be generated as follows:
/path/to/OtpGenerator.Terminal --generate id
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
| id | The unique Id for the service/account pair |
To generate a TOTP for a single service/account combination, use the following form of the command:
/path/to/OtpGenerator.Terminal --generate "service" "account"
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
| service | The service name |
| account | The account name |
Values need only be quoted "..." if they contain special characters or spaces.
To generate TOTPs for all accounts at a specific service use the following form of the command:
/path/to/OtpGenerator.Terminal --generate "service"
Where:
| Argument | Comments |
|---|---|
| /path/to/OtpGenerator.Terminal | The path to the OTP Generator binary, named "OtpGenerator.Terminal" on MacOS and Linux and "OtpGenerator.Terminal.exe" on Windows |
| service | The service name |
Values need only be quoted "..." if they contain special characters or spaces.
For all forms of the command, the output is similar to the following screen shot. Only the number of entries shown may differ.

Note that the "Generate" option does not create a continuously updating display - it generates the TOTPs, displays them and then exits. To see a continuously updating display, use the "Live View" option.