{"id":16682494,"url":"https://github.com/shulhan/gotp","last_synced_at":"2025-06-28T07:34:57.939Z","repository":{"id":54072338,"uuid":"421873286","full_name":"shuLhan/gotp","owner":"shuLhan","description":"[mirror] Command line interface for Time-based One Time Password (TOTP)","archived":false,"fork":false,"pushed_at":"2024-09-07T18:18:32.000Z","size":165,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T23:13:36.461Z","etag":null,"topics":["cli","go","otp","totp"],"latest_commit_sha":null,"homepage":"https://sr.ht/~shulhan/gotp/","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuLhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2021-10-27T15:28:46.000Z","updated_at":"2024-10-16T08:24:13.000Z","dependencies_parsed_at":"2023-11-10T18:27:49.237Z","dependency_job_id":"c0bb80d0-a0fc-4387-8d0b-9d2cb36391ff","html_url":"https://github.com/shuLhan/gotp","commit_stats":{"total_commits":61,"total_committers":2,"mean_commits":30.5,"dds":"0.016393442622950838","last_synced_commit":"7a0dbe1a568d0755afc4c1c432fa3ab9e09adff0"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/shuLhan/gotp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuLhan%2Fgotp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuLhan%2Fgotp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuLhan%2Fgotp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuLhan%2Fgotp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuLhan","download_url":"https://codeload.github.com/shuLhan/gotp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuLhan%2Fgotp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262393064,"owners_count":23304040,"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":["cli","go","otp","totp"],"created_at":"2024-10-12T14:07:42.048Z","updated_at":"2025-06-28T07:34:57.917Z","avatar_url":"https://github.com/shuLhan.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gotp\n\nA command line interface to manage and generate Time-based One Time Password\n(TOTP).\n\n## SYNOPSIS\n\n    gotp \u003ccommand\u003e \u003cparameters...\u003e\n\n\n## COMMANDS\n\nThis section describe available command and its usage.\n\n    add \u003cLABEL\u003e \u003cHASH\u003e:\u003cBASE32-SECRET\u003e[:DIGITS][:TIME-STEP][:ISSUER]\n\nAdd a TOTP secret identified by unique LABEL.\nHASH is one of the valid hash function: SHA1, SHA256, or\nSHA512.\nBASE32-SECRET is the secret to generate one-time password\nencoded in base32.\nThe DIGITS field is optional, define the number digits\ngenerated for password, default to 6.\nThe TIME-STEP field is optional, its define the interval in\nseconds, default to 30 seconds.\nThe ISSUER field is also optional, its define the name of\nprovider that generate the secret.\n\n    export \u003cFORMAT\u003e [FILE]\n\nExport all the issuers to file format that can be imported by provider.\nCurrently, the only supported FORMAT is \"uri\".\nIf FILE is not provided, it will print to the standard output.\nThe list of exported issuers are printed in order by its label.\n\n    gen \u003cLABEL\u003e [N]\n\nGenerate N number passwords using the secret identified by LABEL.\n\n    get \u003cLABEL\u003e\n\nGet and print the issuer by its LABEL.\nThis will print the issuer secret, unencrypted.\n\n    import \u003cPROVIDER\u003e \u003cFILE\u003e\n\nImport the TOTP configuration from other provider.\nCurrently, the only supported PROVIDER is Aegis and the supported file\nis .txt.\n\n    list\n\nList all labels stored in the configuration.\n\n    remove \u003cLABEL\u003e\n\nRemove LABEL from configuration.\n\n    remove-private-key\n\nDecrypt the issuer's value (hash:secret...) using current private key and\nstore it back to file as plain text.\nThe current private key will be removed from gotp directory.\n\n    rename \u003cLABEL\u003e \u003cNEW-LABEL\u003e\n\nRename a LABEL into NEW-LABEL.\n\n    set-private-key \u003cPRIVATE-KEY-FILE\u003e\n\nEncrypt the issuer's value (hash:secret...) in the file using private key.\nThe supported private key is RSA.\nOnce completed, the PRIVATE-KEY-FILE will be copied to default user's gotp\ndirectory, \"$XDG_CONFIG_DIR/gotp/gotp.key\".\n\n\n##  ENCRYPTION\n\nOn the first run, the gotp command check for private key in the user's\nconfiguration direction (see the private key location in FILES section).\n\nThe private key must be RSA based.\n\nIf the private key exist, all the OTP values (excluding the label) will be\nstored as encrypted.\n\nIf the private key is not exist, the OTP configuration will be stored as\nplain text.\n\n\n##  FILES\n\n$XDG_CONFIG_DIR/gotp:: Path to user's gotp directory.\n\n$XDG_CONFIG_DIR/gotp/gotp.conf:: File where the configuration and\nsecret are stored.\n\n$XDG_CONFIG_DIR/gotp/gotp.key:: Private key file to encrypt and decrypt the\nissuer.\n\nFor Darwin/macOS the \"$XDG_CONFIG_DIR\" is equal to \"$HOME/Library\",\nfor Windows its equal to \"%AppData%\".\n\n\n##  EXAMPLES\n\nThis section show examples on how to use gotp cli.\n\nAdd \"my-totp\" to configuration using SHA1 as hash function, \"GEZDGNBVGY3TQOJQ\"\nas the secret, with 6 digits passwords, and 30 seconds as time step.\n\n    $ gotp add my-totp SHA1:GEZDGNBVGY3TQOJQ:6:30\n\n\nGenerate 3 recent passwords from \"my-totp\",\n\n    $ gotp gen my-totp 3\n    gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf\n    847945\n    326823\n    767317\n\n\nImport the exported Aegis TOTP from file,\n\n    $ gotp import aegis aegis-export-uri.txt\n    gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf\n    OK\n\n\nList all labels stored in the configuration,\n\n    $ gotp list\n    gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf\n    my-totp\n\n\nRemove a label \"my-totp\",\n\n    $ gotp remove my-totp\n    gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf\n    OK\n\n\nRename a label \"my-totp\" to \"my-otp\",\n\n    $ gotp rename my-totp my-otp\n    gotp: reading configuration from /home/$USER/.config/gotp/gotp.conf\n    OK\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshulhan%2Fgotp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshulhan%2Fgotp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshulhan%2Fgotp/lists"}