Skip to content
A Command Line OTP Authenticator application.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix CI build (#18) Apr 23, 2019


A Command Line OTP (One Time Password) Authenticator application written in Rust that generates time-based and counter-based OTP codes.

Linux build status Windows build status License version




To install cloak, you can do either of the following:

  1. Binaries

    You can download the binaries here. Make sure to put the path to the binary into your PATH.


    Once you've installed Rust, install cloak by typing the following in the terminal:

    cargo install cloak

    This will download and compile cloak. After this is finished, add the Cargo bin directory to your PATH.


The sub-commands included in cloak are as follows:

$ cloak -h
cloak 0.1.0
Evans Murithi <>
A Command Line OTP Authenticator application.

    cloak [SUBCOMMAND]

    -h, --help       Prints help information
    -V, --version    Prints version information

    add               Add a new account
    delete            Delete an account
    help              Prints this message or the help of the given subcommand(s)
    list              List OTP for all accounts
    recovery_codes    View recovery codes for an account
    view              View the OTP for an account

To view the help of any of the subcommands below, add -h or --help, e.g. cloak add -h.

  • cloak add <account> <key>

    This will add a new account. You will need to provide the name of the account as well as valid base32 encoded key. Example:

    $ cloak add github 4AZJFQFIGYM2KMTOO72I6FAOZ6ZFWJR6
  • cloak view <account>

    This will print the TOTP/HOTP of the account you want to view. Example:

    $ cloak view github
  • cloak list

    This prints all the accounts with their respective TOTP/HOTP codes. Example:

    $ cloak list
    Account: github
    TOTP: 607091
    Account: gitlab
    TOTP: 325414
  • cloak delete <account>

    This will delete an account. Once deleted, you cannot view the OTP codes for the account. Example:

    $ cloak delete github
    Account successfully deleted
    $ cloak view github
    Account with the name 'github' does not exist. Consider adding it.
  • cloak recovery_codes <account>

    This will open a file, using your preferred editor, to either save new recovery codes or view existing recovery codes.


If you want to contribute to cloak you will have to clone the repository on your local machine:

$ git clone

To build, cd into cloak/ and run:

$ cargo build

To run tests:

$ cargo test
You can’t perform that action at this time.