-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
171 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# append | ||
|
||
```text | ||
append [-f|--force] [-s|--skip] [-r|--rename] SOURCE TARGET | ||
``` | ||
|
||
Append operation reads secrets from `SOURCE` and merges it to `TARGET`. | ||
The `TARGET` will be created with a placeholder value if it does not exists. | ||
Both `SOURCE` and `TARGET` must be leaves (path cannot end with `/`). | ||
|
||
By default, `append` does not overwrite secrets if the `TARGET` already contains a key. | ||
The default behavior can be explicitly set using flag: `-s` or `--skip`. Example: | ||
|
||
```bash | ||
> cat /secret/from | ||
|
||
fruit=apple | ||
vegetable=tomato | ||
|
||
> cat /secret/to | ||
|
||
fruit=pear | ||
tree=oak | ||
|
||
> append --skip /secret/from /secret/to | ||
|
||
> cat /secret/to | ||
|
||
fruit=pear | ||
vegetable=tomato | ||
tree=oak | ||
``` | ||
|
||
Setting flag `-f` or `--force` will cause the conflicting keys from the `<to-secret>` to be overwritten with keys from the `<from-secret`>. Example: | ||
|
||
```bash | ||
> cat /secret/from | ||
|
||
fruit=apple | ||
vegetable=tomato | ||
|
||
> cat /secret/to | ||
|
||
fruit=pear | ||
tree=oak | ||
|
||
> append -f /secret/from /secret/to | ||
|
||
> cat /secret/to | ||
|
||
fruit=apple | ||
vegetable=tomato | ||
tree=oak | ||
``` | ||
|
||
Setting flag `-r` or `--rename` will cause the conflicting keys from the `<to-secret>` to be kept as they are. Instead the keys from the `<from-secret`> will be stored under a renamed key. Example: | ||
|
||
```bash | ||
> cat /secret/from | ||
|
||
fruit=apple | ||
vegetable=tomato | ||
|
||
> cat /secret/to | ||
|
||
fruit=pear | ||
tree=oak | ||
|
||
> append -r /secret/from /secret/to | ||
|
||
> cat /secret/to | ||
|
||
fruit=pear | ||
fruit_1=apple | ||
vegetable=tomato | ||
tree=oak | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cat | ||
|
||
```text | ||
cat PATH | ||
``` | ||
|
||
Show the keys/values of the given `PATH`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cd | ||
|
||
```text | ||
cd PATH | ||
``` | ||
|
||
Interactively navigate to given `PATH`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cp | ||
|
||
```text | ||
cp SOURCE TARGET | ||
``` | ||
|
||
Copy `SOURCE` path to `TARGET` path. If executed on a node, (i.e., a path ending with `/`), then copy is applied recursively. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# grep | ||
|
||
```text | ||
grep [-e|--regexp] [-k|--keys] [-v|--values] SEARCH PATH | ||
``` | ||
|
||
`grep` recursively searches the given `SEARCH` substring in key and value pairs of given `PATH`. To treat the search string as a regular-expression, add `-e` or `--regexp` to the end of the command. By default, both keys and values will be searched. If you would like to limit the search, you may add `-k` or `--keys` to the end of the command to search only a path's keys, or `-v` or `--values` to search only a path's values. | ||
If you are looking for copies or just trying to find the path to a certain string, this command might come in handy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# ls | ||
|
||
```text | ||
ls PATH | ||
``` | ||
|
||
List subpaths of given `PATH`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# mv | ||
|
||
```text | ||
mv SOURCE TARGET | ||
``` | ||
|
||
Move `SOURCE` path to `TARGET` path. If executed on a node, (i.e., a path ending with `/`), then move is applied recursively. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# replace | ||
|
||
`replace` works similarly to `grep`, but has the ability to mutate data inside Vault. By default, confirmation is required before writing data. You may skip confirmation by using the `-y`/`--confirm` flags. Conversely, you may use the `-n`/`--dry-run` flags to skip both confirmation and any writes. Changes that would be made are presented in red (delete) and green (add) coloring. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# rm | ||
|
||
```text | ||
rm PATH | ||
``` | ||
|
||
Remove `PATH`. If executed on a node, (i.e., a path ending with `/`), then remove is applied recursively. |