{"id":18252124,"url":"https://github.com/ericonr/get-otp","last_synced_at":"2025-04-08T21:23:22.801Z","repository":{"id":179762235,"uuid":"302522844","full_name":"ericonr/get-otp","owner":"ericonr","description":"Homebrewn solution for comfortably turning OTP secrets into access tokens from the command line","archived":false,"fork":false,"pushed_at":"2021-11-16T02:14:58.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T16:51:34.571Z","etag":null,"topics":["argon2","bearssl","fzf","jq","oath-toolkit","otp","wayland"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericonr.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2020-10-09T03:28:24.000Z","updated_at":"2021-11-16T02:15:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"35eca858-94b9-4f56-8897-c354cb6af1f6","html_url":"https://github.com/ericonr/get-otp","commit_stats":null,"previous_names":["ericonr/get-otp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fget-otp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fget-otp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fget-otp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericonr%2Fget-otp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericonr","download_url":"https://codeload.github.com/ericonr/get-otp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247928546,"owners_count":21019735,"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":["argon2","bearssl","fzf","jq","oath-toolkit","otp","wayland"],"created_at":"2024-11-05T09:50:07.232Z","updated_at":"2025-04-08T21:23:22.782Z","avatar_url":"https://github.com/ericonr.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# get-otp\n\nThis repository holds a combination of tools that can be used to (comfortably)\ngenerate TOTP 2FA access tokens on the desktop, instead of depending on a phone\napp.\n\n## get-otp\n\nMain tool, depends on:\n\n- [jq](https://stedolan.github.io/jq/)\n- [fzf](https://github.com/junegunn/fzf)\n- [OATH Toolkit](https://www.nongnu.org/oath-toolkit/)\n- [wl-clipboard](https://github.com/bugaevc/wl-clipboard) (optional)\n\nIt will use the `cbc-file` executable from this project to decrypt a\n`~/.local/share/otp_accounts` file, whose decrypted contents should be in the\nsame format as exported by [andOTP](https://github.com/andOTP/andOTP). It can\nthen run a menu, using `fzf`, to let you choose the account for which you want\nan access token. If running on Wayland, the token will also be copied to the\nclipboard.\n\n```\n$ get-otp [account_name]\n```\n\n## encrypt-otp\n\nThis tool doesn't depend on anything besides `cbc-file`. What it does is encrypt\nthe file passed to it (which should be in the format exported by andOTP, as\nmentioned above) and put the encrypted file in the correct place.\n\n```\n$ encrypt-otp otp_accounts.json\n```\n\n## cbc-file\n\nMostly hidden utility, does the encryption magic. Despite the name, uses\n[ChaCha20+Poly1305](https://tools.ietf.org/html/rfc7539) for encryption, as\nimplemented by [BearSSL](https://www.bearssl.org/), together with\n[argon2](https://github.com/p-h-c/phc-winner-argon2) for key derivation.\n\nBoth of the mentioned libraries are necessary for building this utility. On\nLinux, a kernel which implements the\n[getrandom(2)](https://man.voidlinux.org/getrandom.2) syscall is necessary,\nsince it is the backend for\n[getentropy(3)](https://man.voidlinux.org/getentropy.3), which is the only\nrandom number backend implemented.\n\n## Disclaimer\n\nThis is experimental code and ideas, and shouldn't be put anywhere near any sort\nof production. However, I am open to suggestions and improvements, so feel free\nto reach out.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericonr%2Fget-otp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericonr%2Fget-otp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericonr%2Fget-otp/lists"}