Delete private values and private files from youre git repos.
private-values [COMMAND]
COMMAND
--
projects List projects.
new PROJECT Create new private values.
rm PROJECT Remove private values.
path PROJECT Path to the private files.
keys PROJECT List keys in the project.
set PROJECT.KEY VALUE Set a private value.
get PROJECT.KEY Get the private value.
~/private-values.rc
--
values-dir: ~/.private-values
Donwload a binary from releases and put it into the PATH directory.
Put the config file at ~/private-values.rc
:
# ~/private-values.rc
values-dir: ~/.private-values
Make ~/.private-values
as your private Git repo.
Let some-project
is your Git project.
Create a new private-values project and then set private values.
private-values new someProject
private-values set someProject.someValue1 value1
private-values set someProject.someValue2 value2
Set the values to local environment variables using direnv.
Write some-project/.envrc
:
# some-project/.envrc
export SOME_VALUE1=$(private-values get someProject.someValue1)
export SOME_VALUE2=$(private-values get someProject.someValue2)
direnv allow
And ignore the envrc.
# some-project/.gitignore or ~/.gitignore
.envrc
Your private values are stored at ~/.private-values/someProject/values.yml
.
For example I make hello.sh
.
echo "," > .gitignore
ln -s $(private-values path someProject) ,
echo "#!/bin/bash\necho HELLO" > ,/hello.sh
chmod +x ,/hello.sh
,/hello.sh
direnv helps us.
# some-project/.envrc
export PATH=$PATH:$(private-values path someProject)
direnv allow
hello.sh
- private-values dose NOT manage secrets in your organization. valut may help you.
- private-values dose NOT encrypt your secrets. Use Bcrypt or other crypt methods.
- private-values dose NOT store your secrets on a safe cloud server. I use private Git repo, or encrypted 7zip archive in a cloud storage for this purpose.
- private-values is NOT a fast database backend.
- private-values aggregate your private values and files under 1 directory.
- The values file
values.yml
is editable for human. It's just YAML format which maps a text key to a text value.
- Logo
- Release Homebrew, Chocolatiey, apt