Skip to content

Commit

Permalink
feat: Add new usage examples for envset tool
Browse files Browse the repository at this point in the history
  • Loading branch information
schpet committed Sep 11, 2024
1 parent 55e2c75 commit 1f32724
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -38,9 +51,3 @@ envset keys
```bash
envset delete KEY1 KEY2
```

### prevent overwriting

```bash
envset --no-overwrite KEY1=newvalue1
```

0 comments on commit 1f32724

Please sign in to comment.