{"id":17686351,"url":"https://github.com/nikarh/env-secrets","last_synced_at":"2026-02-16T02:43:24.604Z","repository":{"id":236781039,"uuid":"793137353","full_name":"nikarh/env-secrets","owner":"nikarh","description":"Manage env secrets in CLI via the OS keyring","archived":false,"fork":false,"pushed_at":"2025-04-12T17:20:34.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T18:25:32.741Z","etag":null,"topics":["env","environment","keyring","password","secret-service","secrets"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/nikarh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-04-28T14:34:11.000Z","updated_at":"2025-04-12T17:20:37.000Z","dependencies_parsed_at":"2024-10-24T13:10:26.236Z","dependency_job_id":"ce0a3c4b-54bb-4c0b-8ec1-b17f52ae6e69","html_url":"https://github.com/nikarh/env-secrets","commit_stats":null,"previous_names":["nikarh/env-secrets"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/nikarh/env-secrets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikarh%2Fenv-secrets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikarh%2Fenv-secrets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikarh%2Fenv-secrets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikarh%2Fenv-secrets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikarh","download_url":"https://codeload.github.com/nikarh/env-secrets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikarh%2Fenv-secrets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264631351,"owners_count":23640947,"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":["env","environment","keyring","password","secret-service","secrets"],"created_at":"2024-10-24T10:44:40.185Z","updated_at":"2026-02-16T02:43:24.530Z","avatar_url":"https://github.com/nikarh.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔑 env-secrets\n\n[![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/nikarh/env-secrets#license)\n[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/nikarh/env-secrets/main.yml)](https://github.com/nikarh/env-secrets/actions/workflows/main.yml)\n[![Current Release](https://img.shields.io/github/release/nikarh/env-secrets.svg)](https://github.com/nikarh/env-secrets/releases)\n[![Release RSS Feed](https://img.shields.io/badge/rss-releases-ffa500?logo=rss)](https://github.com/nikarh/env-secrets/releases.atom)\n[![Main Commits RSS Feed](https://img.shields.io/badge/rss-commits-ffa500?logo=rss)](https://github.com/nikarh/env-secrets/commits/main.atom)\n\nEnv-secrets is a simple CLI tool that allows setting secrets as environment variables for development without actually storing secrets in plaintext on disk.\n\n## Motivation\n\nSometimes one has to work on the development of services that are configured via environment variables, and some of those environment variables are secrets, such as passwords and encryption keys. Storing secrets unencrypted on disk in `.env` files (even with full disk encryption) is generally a bad idea. This project aims to partially solve this problem by providing a way to store such env variables in the keyring ([DBUS Secret Service API] provider on Linux, or [Keychain] on Mac OS), and an interface to run your service providing these secrets via env to the subprocess.\n\n## Usage\n\nAll secrets are grouped by a namespace. A namespace is an arbitrary string that by default is set to the name of the current working directory, and can be explicitly defined for each command.\nA namespace is useful not only to group secrets by projects but also to define an environment, for instance, the namespace can be set to `my-service/prod` or `my-service/test`.\n\nExample:\n\n```bash\nmkdir -p ~/test/project-a\n\n# Set secrets for the namespace `project-a`\ncd ~/test/project-a\nenv-secrets set MY_ENV_NAME1 # Will prompt to enter the password\nenv-secrets set MY_ENV_NAME2 -v secret_value # Will use the argument as a value\nenv-secrets project-a set MY_ENV_NAME3 -v secret_value # Will use the argument as a value\nenv-secrets project-b set MY_ENV_NAME1 -v secret_value # Will NOT overlap with with `project-a` secrets\n\n# Write the value of a particular secret to stdout\nenv-secrets get MY_ENV_NAME1\nenv-secrets project-a get MY_ENV_NAME1\n\n# Run a sub-process with secrets\nenv-secrets run env\nenv-secrets project-a run env\n\n# Print secrets as lines in a form of `export NAME=\"value\"` to stdout\nenv-secrets env\necho $(eval \"$(env-secrets env)\"; env) # Can be eval'ed by bash\n\n# Export secrets of a namespace. Useful to import the secrets later on a different machine.\n# Will print secrets as lines in a form of `env-secrets NAMESPACE set NAME -v \"value\"`\nenv-secrets export\n```\n\n## Security considerations\n\nDoes this service solve all the security concerns for services that require secrets as environment variables? Probably not. The best approach is still for the service to use a security vault directly via API.\n\nIf the Secret Service is configured in a way that requires manual interactive confirmation on any request to the secrets, this tool can prevent secret leakage by rogue dependencies (in projects that use a dependency manager that can run arbitrary code).\n\n## Supported platforms\n\nCurrently, the only supported platforms are x86_64 or aarch64 Linux, and x86_64 or aarch64 MacOS.\n\n## License\n\nExcept where noted (below and/or in individual files), all code in this repository is dual-licensed at your option under either:\n\n* MIT License ([LICENSE-MIT](LICENSE-MIT) or [http://opensource.org/licenses/MIT](http://opensource.org/licenses/MIT))\n* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0))\n\n[Keychain]: https://support.apple.com/guide/keychain-access/what-is-keychain-access-kyca1083/mac\n[DBUS Secret Service API]: https://specifications.freedesktop.org/secret-service/latest/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikarh%2Fenv-secrets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikarh%2Fenv-secrets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikarh%2Fenv-secrets/lists"}