Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

nykma/otp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

One-time Password Generator

A simple command line tool to generate TOTP(RFC 6238, aka Google Authenticator) based on mdp/rotp.

Prepare

First, we should install dependencies, as always.

bundle install --without development

Then, create a .otp.yml in your home folder (i.e. vim ~/.otp.yml) like below:

otp:
  google: YOUR_GOOGLE_AUTHENTICATOR_TOKEN_HERE
  github: YOUR_GITHUB_AUTHENTICATOR_TOKEN_HERE

IMPORTANT!! Remember to set the file permissions to prevent other user from getting your secret token!

chmod 600 ~/.otp.yml

If you wish, create a symlink of main.rb.

ln -s <THIS_REPO_DIR>/main.rb /usr/local/bin/otp

Usage

otp [-bc] SITE_NAME

SITE_NAME     : Secret key identifier specified in .otp.yml . For the example above: google, github.
--base32 (-b) : Create a random Base32 string. No SITE_NAME needed.
--config (-c) : Specify a .otp.yml file. Default is ~/.otp.yml

To-Do List

  • Add support for X11 clipboard using xclip.
  • Add HOTP(RFC 4226) support.
  • Package it to homebrew.

Issues and pull requests are always welcome.

About

Not under maintenance. New base repo: https://github.com/noplanman/otp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages