Secretsmanager
Secrets management that allows you to store your secrets encrypted in git
Install / Use
/learn @titpetric/SecretsmanagerREADME
secretsmanager
I created secretsmanager to store some secrets within a repository. The secrets are encrypted at rest, with readable keys and editable JSON, so you can rename a key or delete it by hand. The cli tool handles the bare minumum of requirements.
secretsmanager init- generate the encryption key,secretsmanager create- create a new secret,secretsmanager env- print secrets for .env
The tool will modify .secrets.json as needed.
The encryption key generated with init should not be commited into git.
It should be added to the ambient environment on your system, or your
deployment / CI pipeline. If you want to store it into 1password it also
wouldn't hurt. If you lose this key, you can't decrypt secrets encrypted
with it.
A secret is a tuple of [UUID, Name, Value]. The Value is the only encrypted field within the JSON document. The UUID field currently isn't used, but it may be used in the future, within some kind of service that provides an API to synchronize secrets between repositories and some kind of central management plane for your infrastructure.
Example usage
Adding a secret:
# ./secretsmanager create
Name for your new secret: DB_DSN
Secret value: user:password@hostname
Created new secret:
ID: 25349927-99b2-4ac5-ad59-d63f88f4a612
Name: DB_DSN
Value: user:password@hostname
The .secrets.json contents:
# cat .secrets.json
{
"secrets": [
{
"ID": "25349927-99b2-4ac5-ad59-d63f88f4a612",
"Name": "DB_DSN",
"Value": "NkFdj_eaROsyRDplbGj0mupw0CTLpHWemjE3N3ktvs-Fwv2lJQw="
}
]
}
Generating secrets for environment usage:
# ./secretsmanager env
DB_DSN="user:password@hostname"
For this particular case, you'd use secretsmanager env >> .env to
produce the secrets as additional environment variables.
Closing notes
Less is more.
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
