All Projects → yitsushi → totp-cli

yitsushi / totp-cli

Licence: MIT license
Authy/Google Authenticator like TOTP CLI tool written in Go.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to totp-cli

Authy
Go library and program to access your Authy TOTP secrets.
Stars: ✭ 244 (+201.23%)
Mutual labels:  totp
AspNetCoreBackChannelLogout
ASP.NET Core Back-Channel Logout for Hybrid Clients, Redis, Key Vault, Azure
Stars: ✭ 17 (-79.01%)
Mutual labels:  totp
security-totp
Time-Based One-Time Password Algorithm Java Library
Stars: ✭ 18 (-77.78%)
Mutual labels:  totp
authy
TOTP Alfred Workflow, Authy Aflred Workflow, Authy command line tool
Stars: ✭ 148 (+82.72%)
Mutual labels:  totp
secur
A cross-platform 2FA TOTP app with a beautiful UI, written in Flutter.
Stars: ✭ 24 (-70.37%)
Mutual labels:  totp
ootp
OOTP (Open One-time Password) is a supports multiple programming languages. The generated one-time passwords are fully compliant with HOTP (HMAC-based One-time Password) and TOTP (Time-based One-time Password). 🚀It's easy to use!
Stars: ✭ 17 (-79.01%)
Mutual labels:  totp
Freeotpplus
Enhanced fork of FreeOTP-Android providing a feature-rich 2FA authenticator
Stars: ✭ 223 (+175.31%)
Mutual labels:  totp
rx-otp
HMAC-based (HOTP) and Time-based (TOTP) One-Time Password manager. Works with Google Authenticator for Two-Factor Authentication.
Stars: ✭ 79 (-2.47%)
Mutual labels:  totp
SimpleTOTP
A highly configurable yet simple to use TOTP based two-factor authentication processing module for SimpleSAMLphp.
Stars: ✭ 16 (-80.25%)
Mutual labels:  totp
totp
Time-Based One-Time Password Code Generator
Stars: ✭ 76 (-6.17%)
Mutual labels:  totp
2ami
Your easy 2FA companion that keep the secrets secret.
Stars: ✭ 24 (-70.37%)
Mutual labels:  totp
totp.js
Time-based One-time Password Algorithm By Javascript
Stars: ✭ 26 (-67.9%)
Mutual labels:  totp
pan-globalprotect-okta
PaloAlto Networks GlobalProtect VPN (integrated with OKTA) command-line client
Stars: ✭ 85 (+4.94%)
Mutual labels:  totp
Onetimepassword
🔑 A small library for generating TOTP and HOTP one-time passwords on iOS.
Stars: ✭ 243 (+200%)
Mutual labels:  totp
crystal-two-factor-auth
Two Factor Authentication Crystal code implementing the Time-based One-time Password Algorithm
Stars: ✭ 24 (-70.37%)
Mutual labels:  totp
Two Factor Auth
Two Factor Authentication Java code implementing the Time-based One-time Password Algorithm
Stars: ✭ 225 (+177.78%)
Mutual labels:  totp
otp-java
A small and easy-to-use one-time password generator library for Java according to RFC 4226 (HOTP) and RFC 6238 (TOTP).
Stars: ✭ 107 (+32.1%)
Mutual labels:  totp
file-manager
A basic node.js file manager
Stars: ✭ 76 (-6.17%)
Mutual labels:  totp
2FAuth
A Web app to manage your Two-Factor Authentication (2FA) accounts and generate their security codes
Stars: ✭ 664 (+719.75%)
Mutual labels:  totp
apache 2fa
Apache two-factor (2FA) authentication with Google Authenticator based on Time-based One-Time Password (TOTP) or HMAC-based one-time password (HOTP) Algorithms.
Stars: ✭ 63 (-22.22%)
Mutual labels:  totp

Go Report Card Actions Status Coverage Status

This is a simple TOTP (Time-based One-time Password) CLI tool. TOTP is the most common mechanism for 2FA (Two-Factor-Authentication). You can manage and organize your accounts with namespaces and protect your data with a password.

Install

Download the latest version of the application from the releases page or using the go tool:

go install github.com/yitsushi/totp-cli@latest

Users on macOS can also install the package using MacPorts:

sudo port selfupdate
sudo port install totp-cli

Update

totp-cli update

Help output

totp-cli help
add-token [namespace] [account]   Add new token
change-password                   Change password
generate <namespace> <account>    Generate a specific OTP
import <input-file>               Import tokens from a yaml file.
instant                           Generate an OTP from TOTP_TOKEN or stdin without the Storage backend
version                           Print current version of this application
delete <namespace> [account]      Delete an account or a whole namespace
dump                              Dump all available namespaces or accounts under a namespace
list [namespace]                  List all available namespaces or accounts under a namespace
update                            Check and update totp-cli itself
help [command]                    Display this help or a command specific help

Usage

When you run the application for the first time, it will ask for your password. DO NOT FORGET IT! There is no way to recover your password if you forget it.

Your first command (after help) would be add-token. You get get your token read a TOTP QR Code.

totp-cli add-token
Namespace: personal
Account: digitalocean
Token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Password: ***

You can specify the namespace and the account name as a parameter:

totp-cli add-token personal randomaccount
Token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Password: ***

If you want to delete randomaccount (because it was a test for example), you can use delete:

totp-cli delete personal.randomaccount
Password: ***
You want to delete 'personal.randomaccount' account.
Are you sure? yes

After few accounts, it's a bit hard to remember what did you added, so you can list namespaces:

totp-cli list
Password: ***
company1 (Number of accounts: 3)
company2 (Number of accounts: 5)
personal (Number of accounts: 8)

or you can list your accounts under a specific namespace:

totp-cli list personal
Password: ***
personal.evernote
personal.google
personal.github
personal.ifttt
personal.digitalocean
personal.dropbox
personal.facebook

If you want to change your password, you can do it with the change-password command.

Changing the location of the credentials file

Simply put this into your .zshrc (or .{YourShell}rc or .profile):

export TOTP_CLI_CREDENTIAL_FILE="/mnt/mydrive/totp-credentials"

Or call the client with TOTP_CLI_CREDENTIAL_FILE:

$ TOTP_CLI_CREDENTIAL_FILE=/mnt/mydrive/totp-credentials totp-cli list

Note: It's a filename not just a directory.

Note: It does not traverse through the given path, parent directory has to be there already.

Import

You can import tokens from a YAML file. The syntax is the same as the output of the dump command.

- name: ns1
  accounts:
    - name: acc1
      token: updatedtoken
    - name: acc2
      token: mytoken
    - name: acc3
      token: tokenish
- name: ns2
  accounts:
    - name: acc1
      token: token

If a token already exists, it will ask you if you want to overwrite it or not.

totp-cli import list.yaml

Zsh Completion

A function to provide tab-completion for zsh is in the file _totp-cli. When installing or packaging totp-cli this should preferably be installed in $prefix/share/zsh/site-functions. Otherwise, it can be installed by copying to a directory where zsh searches for completion functions (the $fpath array). If you, for example, put all completion functions into the folder ~/.zsh/completions you must add the following to your zsh main config file (.zshrc):

fpath=( ~/.zsh/completions $fpath )
autoload -U compinit
compinit
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].