[go: up one dir, main page]

Skip to content
/ tfat Public

Two factor authentication(2FA) command line tool

Notifications You must be signed in to change notification settings

slandx/tfat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tfat

Two factor authentication(2FA) command line tool

Written with Go for learning programming language, see Rust version here.

Features

  • Save config file with AES-GCM encrypt
  • Save data with password.
  • Generate random password if user set an empty password
  • Auto refresh code per seconds
  • Copy the code to clipboard if it generate a new one

Build

dep ensure
go build

Usage

Get code

tfat
# output:
# 602887 (remain 5s)

This will keep refreshing and count down the remaining time. When a new code is generated, it will copy to clipboard automatically. Press Ctrl+C to quit.

tfat
# output:
# 1. one
# 2. two
# 3. three
# select: 1
# 698030 (remain 16s)

If there are more than one account, it will list all of them. You can select any one you like to check its code.

Add an account

tfat add <ACCOUNT> <SECRET>

If it is the first time to add an account, it will ask you to set a password. Of course you can set it with an empty string, it still gonna generate a random password to protect your data. In that case when you get code, it will decrypt automatically without asking password from you. So anyone who use your computer may get a code from it. It is recommended to set a password manually.

delete an account

tfat delete <ACCOUNT>

Change password

tfat password

Help

$ tfat help
NAME:
   Two Factor Authentication(2FA) Tool - Help to generate 2FA code

USAGE:
   tfat [global options] command [command options] [arguments...]

VERSION:
   0.0.1

COMMANDS:
     add       Add a new account
     delete    Delete an account
     password  Change password
     help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     Show this help
   --version, -v  Print version

About

Two factor authentication(2FA) command line tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages