Skip to content

Manage secrets in config files.

License

Notifications You must be signed in to change notification settings

karimsa/secrets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo for secrets

secrets

Build status

Manage secrets in configuration files.

Installation

curl -sf https://gobinaries.com/karimsa/secrets/cmd/secrets | sh

Features

  • Encrypt/decrypt selective values
  • Supports yaml, json, and .env files
  • Editor mode to selectively re-encrypt secrets (better git diffs)

Usage

Encrypting secrets in a .env file

Encrypt example gif

$ cat .env
HELLO=SECURE-WORLD
HI=INSECURE-WORLD
$ secrets encrypt --in .env --out .env --key .HELLO
Passphrase: ******
$ cat .env
HELLO=64745a1f754b45bb60c40e14c04ead39afb0d774e9f25f90459de9f714da3ed19c94063e79649d38b0ebb5cc3eaf06554476cbf7bc65ef0cd472c28370bcdb57105343180700523771733f8cfe2e7222
HI=INSECURE-WORLD

Reveal secrets from .env file

Decrypt example gif

$ cat .env
HELLO=64745a1f754b45bb60c40e14c04ead39afb0d774e9f25f90459de9f714da3ed19c94063e79649d38b0ebb5cc3eaf06554476cbf7bc65ef0cd472c28370bcdb57105343180700523771733f8cfe2e7222
HI=INSECURE-WORLD
$ secrets decrypt --in .env --key .HELLO
Passphrase: ******
HELLO=SECURE-WORLD
HI=INSECURE-WORLD
$ cat .env
HELLO=64745a1f754b45bb60c40e14c04ead39afb0d774e9f25f90459de9f714da3ed19c94063e79649d38b0ebb5cc3eaf06554476cbf7bc65ef0cd472c28370bcdb57105343180700523771733f8cfe2e7222
HI=INSECURE-WORLD

Edit config file then re-encrypt changed values

Edit example gif

License

Licensed under MIT license.

About

Manage secrets in config files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages