https://github.com/chyroc/otp-cli
https://github.com/chyroc/otp-cli
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chyroc/otp-cli
- Owner: chyroc
- License: apache-2.0
- Created: 2021-03-10T12:41:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-21T13:51:34.000Z (almost 3 years ago)
- Last Synced: 2025-06-07T16:13:27.030Z (7 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# otp-cli
Generate OTP Code Tool.
## Install
### By Go Get
```shell
go install github.com/chyroc/otp-cli@latest
```
### By Brew
```shell
brew tap chyroc/tap
brew install chyroc/tap/otp-cli
```
### By Docker
```shell
docker pull ghcr.io/chyroc/otp-cli
```
## Usage
```text
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***
```shell
otp-cli -s ''
```
- ***generate from secret file***
```shell
otp-cli -f ''
```
- ***generate from scope***
```shell
# first: config scope
otp-cli set-scope --name --secret
# second: generate
otp-cli --scope
```
- ***generate and copy to clipboard***
```shell
otp-cli -s '' -c
```
- ***generate, copy to clipboard and not output to console***
```shell
otp-cli -s '' -c -q
```