From 1f327247301a465a1567d2517d96b8a468dff5ee Mon Sep 17 00:00:00 2001 From: Peter Schilling Date: Tue, 10 Sep 2024 21:36:50 -0700 Subject: [PATCH] feat: Add new usage examples for envset tool --- README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fab7f87..7ea7de8 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,29 @@ cargo install envset ### set variables ```bash +# basic usage envset KEY1=value1 KEY2=value2 + +# pipe in stdin, useful for copying stuff from one env to another echo -e "KEY1=value1\nKEY2=value2" | envset + +# .env in the cwd is default, but you can use a different path envset --file .env.test KEY1=value1 + +# avoid clobbering existing values +envset --no-overwrite KEY1=newvalue1 ``` ### get variables ```bash +# print a single value envset get KEY1 + +# print all key value pairs envset print + +# print all keys envset keys ``` @@ -38,9 +51,3 @@ envset keys ```bash envset delete KEY1 KEY2 ``` - -### prevent overwriting - -```bash -envset --no-overwrite KEY1=newvalue1 -```