Skip to content

chyroc/otp-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

otp-cli

Generate OTP Code Tool.

Install

By Go Get

go install github.com/chyroc/otp-cli@latest

By Brew

brew tap chyroc/tap
brew install chyroc/tap/otp-cli

By Docker

docker pull ghcr.io/chyroc/otp-cli

Usage

NAME:
   otp-cli - generate otp client

USAGE:
   otp-cli [global options] command [command options] [arguments...]

COMMANDS:
   version    show otp-cli version
   set-scope  set scope secret
   del-scope  delete scope secret
   help, h    Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --secret value, -s value       otp secret text [$OTP_SECRET]
   --secret-file value, -f value  otp secret file [$OTP_SECRET_FILE]
   --scope value                  otp scope [$OTP_SCOPE]
   --copy, -c                     copy to clipboard (default: false) [$OTP_COPY]
   --quiet, -q                    not output to console (default: false) [$OTP_QUIET]
   --help, -h                     show help
  • generate from secret text string
otp-cli -s '<secret>'
  • generate from secret file
otp-cli -f '<secret file>'
  • generate from scope
# first: config scope
otp-cli set-scope --name <scope> --secret <secret>

# second: generate
otp-cli --scope <scope>
  • generate and copy to clipboard
otp-cli -s '<secret>' -c
  • generate, copy to clipboard and not output to console
otp-cli -s '<secret>' -c -q