{"id":31934793,"url":"https://github.com/launchrctl/keyring","last_synced_at":"2025-10-14T06:53:55.494Z","repository":{"id":185723240,"uuid":"673997338","full_name":"launchrctl/keyring","owner":"launchrctl","description":"Keyring is a launchr plugin and a service providing a password storage functionality ","archived":false,"fork":false,"pushed_at":"2025-09-25T14:21:31.000Z","size":183,"stargazers_count":2,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-25T15:40:00.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/launchrctl.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":"2023-08-02T23:01:39.000Z","updated_at":"2025-08-14T13:03:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"f7ffe8c9-371f-420e-92c9-60edb5fcefab","html_url":"https://github.com/launchrctl/keyring","commit_stats":null,"previous_names":["launchrctl/keyring"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/launchrctl/keyring","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchrctl%2Fkeyring","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchrctl%2Fkeyring/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchrctl%2Fkeyring/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchrctl%2Fkeyring/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/launchrctl","download_url":"https://codeload.github.com/launchrctl/keyring/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/launchrctl%2Fkeyring/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018138,"owners_count":26086285,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-14T06:53:51.802Z","updated_at":"2025-10-14T06:53:55.489Z","avatar_url":"https://github.com/launchrctl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Launchr Keyring\n\n**Keyring** is a launchr plugin and a service providing a password storage functionality encrypted with [age](https://github.com/FiloSottile/age).\nThe storage is encrypted with a passphrase.\n\n## How to use\n\nTo add a new item with an interactive shell:\n```shell\nlaunchr login\n```\n\nIf an interactive shell is not available, credentials may be provided with flags:\n```shell\n# Input passphrase directly\nlaunchr login \\\n  --url=https://your.gitlab.com \\\n  --username=USER \\\n  --password=SECRETPASSWORD \\\n  --keyring-passphrase=YOURPASSHRPASE\n\n# Get passphrase from a file\nlaunchr login \\\n  --url=https://your.gitlab.com \\\n  --username=USER \\\n  --password=SECRETPASSWORD \\\n  --keyring-passphrase-file=/path/to/your/secret\n```\n\nTo add a new key-value pair with an interactive shell:\n```shell\nlaunchr keyring:set your-key\n```\n\nIt's possible to parse a user value and store it as a struct in a keyring. Supported formats are [string, yaml, json]:\n```shell\nlaunchr keyring:set your-key value\n```\n\nIt's possible to parse a user value and store it as a struct in a keyring. Possible formats are [string, yaml, json]:\n```shell\nlaunchr keyring:set key --format yaml -- \"- name: test-1\n- name: test-2\"\nlaunchr keyring:set key --format yaml -- \"$(cat file.yaml)\"\nlaunchr keyring:set key --format json -- '[\n  {\n    \"name\": \"test-1\"\n  },\n  {\n    \"name\": \"test-2\"\n  }\n]'\nlaunchr keyring:set key --format json -- \"$(cat file.json)\"\n```\n\nYou can dynamically build JSON\\YAML wit structures and pass them directly to the command: `jq`\n```shell\n# Define your variables\nTOKEN1=\"abc123def456\"\nNAME1=\"production-api-key\"\nCREATED1=\"2025-01-15T10:30:00Z\"\n\nTOKEN2=\"xyz789uvw012\"\nNAME2=\"development-token\"\nCREATED2=\"2025-01-15T11:45:00Z\"\nEXPIRES2=\"2025-07-15T11:45:00Z\"\n\nlaunchr keyring:set api-tokens-json --format json -- \"$(jq -n \\\n  --arg t1 \"$TOKEN1\" --arg n1 \"$NAME1\" --arg c1 \"$CREATED1\" \\\n  --arg t2 \"$TOKEN2\" --arg n2 \"$NAME2\" --arg c2 \"$CREATED2\" --arg e2 \"$EXPIRES2\" \\\n  '[\n    {\n      tokenhash: $t1,\n      name: $n1,\n      created: $c1,\n      expires: null\n    },\n    {\n      tokenhash: $t2,\n      name: $n2,\n      created: $c2,\n      expires: $e2\n    }\n  ]')\"\n```\n`yq` using same variables:\n```shell\nlaunchr keyring:set api-tokens-yaml --format yaml -- \"$(yq -n \\\n  '.[0].tokenhash = env(TOKEN1) |\n   .[0].name = env(NAME1) |\n   .[0].created = env(CREATED1) |\n   .[0].expires = null |\n   .[1].tokenhash = env(TOKEN2) |\n   .[1].name = env(NAME2) |\n   .[1].created = env(CREATED2) |\n   .[1].expires = env(EXPIRES2)')\"\n```\n\nFlags `--keyring-passphrase` and `--keyring-passphrase-file` are available for all launchr commands, for example:\n```shell\nlaunchr compose --keyring-passphrase=YOURPASSHRPASE\nlaunchr compose --keyring-passphrase-file=/path/to/your/secret\n```\n\nThese flags may be passed as environment variables `LAUNCHR_KEYRING_PASSPHRASE` and `LAUNCHR_KEYRING_PASSPHRASE_FILE`:\n```shell\nLAUNCHR_KEYRING_PASSPHRASE=YOURPASSHRPASE launchr compose\nLAUNCHR_KEYRING_PASSPHRASE_FILE=/path/to/your/secret launchr compose\n```\n\nFlags and environment variables are taken in the following priority:\n1. `--keyring-passphrase`\n2. `LAUNCHR_KEYRING_PASSPHRASE`\n3. `--keyring-passphrase-file`\n4. `LAUNCHR_KEYRING_PASSPHRASE_FILE`\n\n**NB:** If the binary is created with a specific app name like `myappname`, the variable name will change accordingly `MYAPPNAME_KEYRING_PASSPHRASE_FILE`.  \n\nFlag `--keyring-passphrase-file` will also set `LAUNCHR_KEYRING_PASSPHRASE_FILE` for subprocesses.  \nThese environment variables are inherited in subprocesses.  \nUsing `--keyring-passphrase-file` or `LAUNCHR_KEYRING_PASSPHRASE_FILE` is a preferred way to pass the secret because the secret won't be exposed.\n\nTo delete an item from the keyring:\n```shell\nlaunchr logout URL\nlaunchr logout --all\n```\n\nThe file is created in `.launchr/keyring.yaml.age`.  \nThe content may be viewed/edited with age cli:\n```shell\nage -d .launchr/keyring.yaml.age\nage -p .launchr/keyring.yaml \u003e .launchr/keyring.yaml.age\n```\n\n## In code\n\nAdd a module dependency:\n```shell\ngo get -u github.com/launchrctl/keyring\n```\n\nTo use the keyring in code, get the service from the app:\n```go\npackage main\n\nimport (\n\t\"github.com/launchrctl/keyring\"\n\t\"github.com/launchrctl/launchr\"\n)\n\nfunc GetPassword(app launchr.App, url string) (keyring.CredentialsItem, error) {\n\t// Get the service by type from the app.\n\tvar k keyring.Keyring\n\tapp.Services().Get(k)\n\t// Get by url. Error if the keyring could not be unlocked.\n\t// Error keyring.ErrNotFound is returned if an item was not found.\n\tcreds, err := k.GetForURL(url)\n\tif err != nil {\n\t\treturn keyring.CredentialsItem{}, err\n\t}\n\treturn creds, nil\n}\n```\n\nInclude with launchr build:\n```shell\nlaunchr build -p github.com/launchrctl/keyring\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchrctl%2Fkeyring","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaunchrctl%2Fkeyring","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaunchrctl%2Fkeyring/lists"}