twofat

command module
v0.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2022 License: GPL-3.0 Imports: 26 Imported by: 0

README

twofat

Manage a 2FA database from the commandline

Features

  • Data saved with AES-GCM encrypt in ~/.twofat.enc, password changeable.
  • Display codes of names matching regex, which auto-refresh.
  • Add, rename, delete entry, reveal secret, copy code to clipboard.
  • Import entries from CSV.
  • Displays well in 80-colums (or more) terminals. Maximum NAME length is set to 17.

Build

# While in the repo root directory:
go build

# Or anywhere:
go get -u github.com/pepa65/twofat

# Smaller binary:
go build -ldflags="-s -w"

# More extreme shrinking:
upx --brute twofat*

# Build for various architectures:
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o twofat
GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o twofat_pi
GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o twofat_bsd
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o twofat_osx
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o twofat.exe

Usage

twofat v0.6.2 - Manage a 2FA database from the commandline
* Repo:      github.com/pepa65/twofat <pepa65@passchier.net>
* Database:  ~/.twofat.enc
* Usage:     twofat [COMMAND]
  COMMAND:
[ show | view ]  [REGEX]
    Show all Codes [with Names matching REGEX] (the command is optional).
list | ls  [REGEX]
    Show all Names [with Names matching REGEX].
add | insert | entry  NAME  [-7|-8]  [-f|--force]  [SECRET]
    Add a new entry NAME with SECRET (queried when not given).
    When -7 or -8 are given, Code length is 7 or 8, otherwise it is 6.
    If -f/--force: existing NAME overwritten, no NAME length check.
totp | temp  [-7|-8]  [SECRET]
    Show the Code for SECRET (queried when not given).
    When -7 or -8 are given, Code length is 7 or 8, otherwise it is 6.
    (The database is not queried nor written to.)
delete | remove | rm  NAME  [-f|--force]
    Delete entry NAME. If -f/--force: no confirmation asked.
rename | move | mv  NAME  NEWNAME  [-f|--force]
    Rename entry NAME to NEWNAME, if -f/--force: no length checks.
import  FILE  [-f|--force]
    Import lines with "NAME,SECRET,CODELENGTH" from CSV-file FILE.
    If -f/--force: existing NAME overwritten, no NAME length check.
export  FILE                Export all entries to CSV-file FILE.
reveal | secret  NAME       Show Secret of entry NAME.
clip | copy | cp  NAME      Put Code of entry NAME onto the clipboard.
password | passwd | pw      Change database encryption password.
version | --version | -V    Show version.
help | --help | -h          Show this help text.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL