secrets-env
Version, currently 1.3.15 versions
github.com/spider-gazelle/secrets-env
Extension to the crystal lang ENV module to support reading secrets
Installation
# Add this to your shard.yml
dependencies:
secrets-env:
github: spider-gazelle/secrets-env
version: ~> 1.3.1Then run:
shards installshard.yml
- Crystal
>= 0.36.1- License
- MIT
- Authors
- Kim Burgess, Caspian Baska
Dependencies
Development Dependencies
- ameba*github: crystal-ameba/amebadev
README
secrets-env
Extends the behaviour of the crystal-lang ENV module to read values injected by docker secrets, kubernetes secrets and other orchestration tools.
Installation
-
Add the dependency to your
shard.yml:dependencies: secrets-env: github: spider-gazelle/secrets-env -
Run
shards install
Usage
require "secrets-env"
Use the SECRETS_PATH environment variable to specify the volume used for secrets injection.
If unspecified this will default to /run/secrets.
ENV may then be used as per the standard API.
Values fetch from (in order of priority):
- environment variable
- secret of the same name
- fallback (if specified)
Note: attempts to update the environment ([]=) will apply this as an env var.
Secrets are immutable.
Once set as env vars take preference over secrets, the new value is readable by the current machine, but is ephemeral.
Additionally, ENV.accessed provides a record of all accesses to the ENV variable across the program.
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
1.3.1- Tagged
- Mar 22, 2021
- Commit
cf2559c870cb- Crystal
>= 0.36.1- Indexed
- yes
Dependents
Repository
github.com/spider-gazelle/secrets-env
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 30, 2026
- Synced
- Sep 30, 2026
- Versions
- 5