{"id":20409552,"url":"https://github.com/emdneto/otsgo","last_synced_at":"2025-04-12T15:52:24.892Z","repository":{"id":45290159,"uuid":"440852416","full_name":"emdneto/otsgo","owner":"emdneto","description":"A simple CLI and API client for One-Time Secret","archived":false,"fork":false,"pushed_at":"2024-03-08T01:32:17.000Z","size":93,"stargazers_count":7,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T17:05:45.834Z","etag":null,"topics":["golang","onetimesecret","ots","secrets"],"latest_commit_sha":null,"homepage":"https://webi.sh/ots","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emdneto.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":"2021-12-22T12:35:19.000Z","updated_at":"2024-03-05T11:51:31.000Z","dependencies_parsed_at":"2024-06-20T21:53:11.786Z","dependency_job_id":"4db02468-df48-4563-b808-18cae5a0e586","html_url":"https://github.com/emdneto/otsgo","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emdneto%2Fotsgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emdneto%2Fotsgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emdneto%2Fotsgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emdneto%2Fotsgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emdneto","download_url":"https://codeload.github.com/emdneto/otsgo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248592054,"owners_count":21130168,"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":["golang","onetimesecret","ots","secrets"],"created_at":"2024-11-15T05:42:23.245Z","updated_at":"2025-04-12T15:52:24.865Z","avatar_url":"https://github.com/emdneto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OTS Go client\n\notsgo is a simple CLI and API client for [One-Time Secret](https://onetimesecret.com/) written in Go. \n\n## Features\n\n* Get system status\n* Authentication\n* Share, generate, get and burn Secrets as well as retrieve it's metadata\n\n# Quickstart\n\n## Getting otsgo from Webinstall\n\n```\ncurl -sS https://webi.sh/ots | sh\n```\n\n## Getting otsgo from go install\n\n```\n$ go install github.com/emdneto/otsgo@latest\n```\n\n## Getting otsgo from binary\nYou may download otsgo binary from the [latest releases on Github](https://github.com/emdneto/otsgo/releases/latest).\n\n# Using otsgo CLI\n\n## Overview \n```\n$ ots -h\nA simple CLI and API client for One-Time Secret\n\nUsage:\n  ots [flags]\n  ots [command]\n\nAvailable Commands:\n  burn        Burn a secret that has not been read yet\n  completion  generate the autocompletion script for the specified shell\n  get         Get secret, metadata or recent\n  help        Help about any command\n  login       Perform basic http auth and store credentials\n  share       Share or generate a random secret\n  status      Current status of the system\n\nFlags:\n      --config string   config file (default is $HOME/.otsgo.yaml)\n  -h, --help            help for ots\n  -t, --toggle          Help message for toggle\n  -v, --version         Displays current version\n\nUse \"ots [command] --help\" for more information about a command.\n```\n\n### Show OTS status\n\n```\n$ ots status\n\nSTATUS \tTIMESTAMP\nnominal\t1709507672\n```\n\n## Share Secrets \n\n```\n$ ots share -h\nShare or generate a random secret\n\nUsage:\n  ots share [flags]\n\nFlags:\n  -f, --from-stdin          Read from stdin\n  -g, --generate            Generate a short, unique secret. This is useful for temporary passwords, one-time pads, salts, etc.\n  -h, --help                help for share\n  -p, --passphrase string   a string that the recipient must know to view the secret. This value is also used to encrypt the secret and is bcrypted before being stored so we only have this value in transit.\n  -r, --recipient string    an email address. We will send a friendly email containing the secret link (NOT the secret itself).\n  -s, --secret string       the secret value which is encrypted before being stored. There is a maximum length based on your plan that is enforced (1k-10k)\n  -t, --ttl int             the maximum amount of time, in seconds, that the secret should survive (i.e. time-to-live). Once this time expires, the secret will be deleted and not recoverable. (default 604800)\n```\n\n### Share a generated secret\n\n```\n$ ots share -g\n```\n\n### Share custom secret with ttl and passphrase\n\n```\n$ ots share -s hellosecret -t 300 -p hello\n```\n\n### Share secret from file\n```\n$ cat \u003c\u003cEOF | ots share -f -\nsecret: hello\nseret: secret\nEOF\n\n$ echo \"hellosecret\" | ots share -f\n```\n\n### Burn secrets\n```\n$ ots burn METADATA_KEY\n```\n\n## Get secrets, metadata and recent\n```\n$ ots get -h\nGet secret, metadata or recent\n\nUsage:\n  ots get [flags]\n  ots get [command]\n\nAvailable Commands:\n  meta        Retrieve secret associated metadata\n  recent      Retreive a list of recent metadata.\n  secret      Retrieve a Secret\n\n```\n\n### Get secret value\n```\n$ ots get secret SECRET_KEY\n```\n### Get secret metadata\n```\n$ ots get meta METADATA_KEY\n```\n### Get recent secrets (requires auth)\n```\n$ ots get recent\n\nUSER                    STATE           EXPIRES                 EXPIRED METADATA                        PASSHPHRASE     CREATED                 SENT    TTL       \nanon                    viewed          2024-03-10 20:13:45     false   1z3bp2asyt2mo3xk0w4ddiveg0yhhor false           2024-03-03 20:13:45     []      167h58m13s\ndemouser12345@demo.com  received        2024-03-10 20:01:40     false   drssrmf8avh5mv8mqlj2sgvi6tsqwz9 false           2024-03-03 20:01:40     []      0s        \ndemouser12345@demo.com  received        2024-03-10 16:17:01     false   58aqvdaqwbh2b0gx1koru0baiid894a true            2024-03-03 16:17:01     []      0s        \ndemouser12345@demo.com  received        2024-03-10 14:57:02     false   5s3onh5cyd2e1dsa5qmsm2afq91d3g0 false           2024-03-03 14:57:02     []      0s        \ndemouser12345@demo.com  received        2024-03-10 14:55:23     false   n28eqt08te7gl7jphjg89b7p1s1cetk true            2024-03-03 14:55:23     []      0s        \n```\n\n## Authentication\n\n### Auth with Environment Variables\n\notsgo will try to locate the credentials present in the environment variables. If found, every request will be made with HTTP Basic Authentication. If you get `404 Not authorized` in any command, probably your credentials are wrong.\n\n```\n$ export OTS_USER=demo; export OTS_TOKEN=xyz\n$ ots get recent\n$ ots share -g -r demo@demo.com\n```\n### Store auth credentials\nYour password will be stored unencrypted in ~/.otsgo.yaml\n```\n$ ots login -u USERNAME -p API_TOKEN\n$ ots get recent\n$ ots share -g -r demo@demo.com\n```\n\n# Common aliases\n```\nalias oss=\"ots share secret\"\nalias osgs=\"ots share secret -g\"\nalias ogs=\"ots get secret\"\nalias obs=\"ots burn secret\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femdneto%2Fotsgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femdneto%2Fotsgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femdneto%2Fotsgo/lists"}