| Crates.io | trotp |
| lib.rs | trotp |
| version | 1.1.10 |
| created_at | 2022-07-03 18:29:54.411907+00 |
| updated_at | 2025-11-06 19:29:41.981578+00 |
| description | TUI TOTP generator |
| homepage | https://github.com/Krakaw/totp |
| repository | https://github.com/Krakaw/totp |
| max_upload_size | |
| id | 618490 |
| size | 758,688 |
A CLI tool for managing TOTP accounts. All accounts are stored in a local file that's encrypted with the provided password. If you don't provide the -p argument it will expect the password on stdin.
Running trotp without any arguments will run the TUI interface.

cargo install trotp
trotp --help
TUI TOTP generator
Usage: trotp [OPTIONS] [COMMAND]
Commands:
add Add a new account
edit Edit an existing account
delete Delete an account
interactive Run in interactive mode [default]
check Check an OTP
dump Dump the config file
secret Extract the TOTP Secret from a record
serve Start an HTTP Server
help Print this message or the help of the given subcommand(s)
Options:
-p, --password <PASSWORD> The encryption password
-s, --sqlite-path <SQLITE_PATH> The sqlite filename [default: .totp.sqlite3]
-a, --auto-lock-key Automatically set the table lock key
-h, --help Print help
-V, --version Print version
trotp -p password add -a AccountName -s SecretToken -u Username -p Password123 -n Note
trotp -p password delete -a AccountName
trotp -p password edit -i 1 -a NewAccountName -s NewTOTPSecret -p NewPassword -n NewNote -u NewUserName
trotp -p password check -t TokenSecretKey -o 123456 -s 2022-06-03T08:35:00+02:00 -r 10
trotp -p password serve
# Example using a secret for a once off TOTP
curl localhost:8080/JBSWY3DPEHPK3PXP
{"account_name":"Secret","code":"359962","expiry":11}
curl localhost:8080/acc
{"account_name":"Account 1","code":"783196","expiry":30}
| Key Binding | Action |
|---|---|
/ |
Switch to search/filter mode |
Esc |
Return to normal mode |
Tab |
Toggle between OTP table and detail view |
Down |
Select next account |
Up |
Select previous account |
Home |
Jump to first account |
End |
Jump to last account |
Enter |
Copy OTP or selected detail to clipboard |
Ctrl-c |
Exit |
| Key Binding | Action |
|---|---|
e |
Edit account name (OTP table) or detail field (detail view) |
d |
Delete selected account |
q |
Quit application |
? |
Show help modal |
When editing a field, a modal appears with the current value pre-populated:
| Key Binding | Action |
|---|---|
Enter |
Save changes |
Esc |
Cancel editing |
Backspace |
Delete character |
Shift |
Capital letters |
Ctrl-V |
Paste text |
The help modal displays all available keyboard shortcuts:
| Key Binding | Action |
|---|---|
Esc or ? |
Close help modal |
Up/Down |
Scroll help text (page-based) |
Home/End |
Jump to top/bottom of help |
PageUp/PageDown |
Scroll by page |