{"id":13437360,"url":"https://github.com/evansmurithi/cloak","last_synced_at":"2025-03-19T06:31:05.974Z","repository":{"id":32823680,"uuid":"140887416","full_name":"evansmurithi/cloak","owner":"evansmurithi","description":"A Command Line OTP Authenticator application.","archived":false,"fork":false,"pushed_at":"2023-03-09T02:58:46.000Z","size":316,"stargazers_count":293,"open_issues_count":17,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-01T21:28:32.014Z","etag":null,"topics":["otp","rust","terminal-based"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evansmurithi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2018-07-13T19:50:53.000Z","updated_at":"2025-03-01T20:38:35.000Z","dependencies_parsed_at":"2024-01-30T02:59:27.950Z","dependency_job_id":null,"html_url":"https://github.com/evansmurithi/cloak","commit_stats":{"total_commits":166,"total_committers":5,"mean_commits":33.2,"dds":"0.43975903614457834","last_synced_commit":"a4dac97b40e4a29c60d64476d69dfd50d501cec8"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansmurithi%2Fcloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansmurithi%2Fcloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansmurithi%2Fcloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evansmurithi%2Fcloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evansmurithi","download_url":"https://codeload.github.com/evansmurithi/cloak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244370986,"owners_count":20442320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["otp","rust","terminal-based"],"created_at":"2024-07-31T03:00:56.320Z","updated_at":"2025-03-19T06:31:02.897Z","avatar_url":"https://github.com/evansmurithi.png","language":"Rust","funding_links":[],"categories":["Applications","应用程序 Applications","应用","应用 Applications","Rust"],"sub_categories":["Utilities","公用事业公司 Utilities","实用","公用事业 Utilities"],"readme":"# cloak\n\nA Command Line OTP (One Time Password) Authenticator application written in Rust that generates\ntime-based and counter-based OTP codes.\n\n![CI](https://github.com/evansmurithi/cloak/workflows/CI/badge.svg)\n[![codecov](https://codecov.io/gh/evansmurithi/cloak/branch/master/graph/badge.svg?token=Y72C1MM1E8)](https://codecov.io/gh/evansmurithi/cloak)\n![License](https://img.shields.io/crates/l/cloak.svg)\n[![Crates.io version](https://img.shields.io/crates/v/cloak.svg)](https://crates.io/crates/cloak)\n\n## Motivation\n\n- [Why you shouldn’t scan two-factor authentication QR codes!](https://medium.com/crypto-punks/why-you-shouldnt-scan-two-factor-authentication-qr-codes-e2a44876a524)\n- As a means of learning the Rust programming language.\n- Easier to copy the OTP code from my terminal to the login form, rather than from\nmy phone to my laptop.\n\n## Example\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://cdn.rawgit.com/evansmurithi/cloak/6d113aa8376b04cce12b64261962750532997e64/assets/cloak_example.svg\"\u003e\n\u003c/p\u003e\n\n## Installation\n\nTo install `cloak`, you can do either of the following:\n\n1. **Binaries**\n\n    You can download the binaries [here](https://github.com/evansmurithi/cloak/releases).\n    Make sure to put the path to the binary into your `PATH`.\n\n    Alternatively, you can install `cloak` via the [scoop package manager](https://scoop.sh) with the following command:\n\n    ```powershell\n    scoop install cloak\n    ```\n\n2. **Crates.io**\n\n    Once you've installed Rust, install `cloak` by typing the following in the terminal:\n\n    ```bash\n    cargo install cloak\n    ```\n\n    This will download and compile `cloak`. After this is finished, add the Cargo\n    bin directory to your `PATH`.\n\n## Usage\n\nThe sub-commands included in `cloak` are as follows:\n\n```bash\n$ cloak -h\ncloak 0.1.0\nEvans Murithi \u003cmurithievans80@gmail.com\u003e\nA Command Line OTP Authenticator application.\n\nUSAGE:\n    cloak [SUBCOMMAND]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nSUBCOMMANDS:\n    add               Add a new account\n    delete            Delete an account\n    help              Prints this message or the help of the given subcommand(s)\n    list              List OTP for all accounts\n    view              View the OTP for an account\n```\n\nTo view the help of any of the subcommands below, add `-h` or `--help`, e.g. `cloak add -h`.\n\n- `cloak add \u003caccount\u003e \u003ckey\u003e`\n\n    This will add a new account. You will need to provide the name of the account\n    as well as valid base32 encoded key. Example:\n\n    ```bash\n    $ cloak add github 4AZJFQFIGYM2KMTOO72I6FAOZ6ZFWJR6\n    ```\n\n- `cloak view \u003caccount\u003e`\n\n    This will print the TOTP/HOTP of the account you want to view. Example:\n\n    ```bash\n    $ cloak view github\n    123456\n    ```\n\n- `cloak list`\n\n    This prints all the accounts with their respective TOTP/HOTP codes. Example:\n\n    ```bash\n    $ cloak list\n    Account: github\n    TOTP: 607091\n\n    Account: gitlab\n    TOTP: 325414\n    ```\n\n- `cloak delete \u003caccount\u003e`\n\n    This will delete an account. Once deleted, you cannot view the OTP codes for\n    the account. Example:\n\n    ```bash\n    $ cloak delete github\n    Account successfully deleted\n    $ cloak view github\n    Account with the name 'github' does not exist. Consider adding it.\n    ```\n\n## Customization\n\nBy default `cloak` stores your accounts and recovery codes inside a `.cloak/`\ndirectory found inside your `$HOME` folder if you are on Linux or macOS, or\ninside your user profile folder if you are on Windows.\n\nTo alter this, you can use the `CLOAK_ACCOUNTS_DIR` environment variable to\npoint `cloak` to the directory to use for storing your accounts and recovery\ncodes:\n\n```bash\nexport CLOAK_ACCOUNTS_DIR='/save/accounts/here/'  # absolute path\n```\n\n## Contributions\n\nIf you want to contribute to `cloak` you will have to clone the repository on your\nlocal machine:\n\n```bash\n$ git clone https://github.com/evansmurithi/cloak.git\n```\n\nTo build, `cd` into `cloak/` and run:\n\n```bash\n$ cargo build\n```\n\nTo run tests:\n\n```bash\n$ cargo test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansmurithi%2Fcloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevansmurithi%2Fcloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevansmurithi%2Fcloak/lists"}