Open mumoshu opened 6 years ago
For #2, how about something like this?
# NICE TO HAVE: Interactive way to enable autoselection per vault
# -c stands for "criteria" or "command"
$ sopsed autoselect myvault -c '[ "$SOPSED_COMMAND" == "mycmd" ]'
# This also shows the autoselection criteria in the output
$ sopsed show myvault
# sopsed auto-select `myvault` even though `-n myvault` isn't specified
# this fails emitting `no default vault found for mycmd --foo --bar` in case you don't have a default vault and there are two or more vaults in `.sopsed/`
$ sopsed run -- mycmd --foo --bar
I'm leaving random notes about expected user experience of this tool here.
You'll firstly initialize your project by running the following command in your project root:
This will create a
default
vault which is empty at beginning.You then add any of: env-var, file, ssh-key to the vault by running:
Now, you can run any command within the
default
vault by:You can also create, manage, use a vault named other than
default
by:2 on top of this is still something TBD.