Skip to content

Commit

Permalink
aider: feat: Add README.md with project description and usage instruc…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
schpet committed Sep 6, 2024
1 parent 0cf10bb commit c7a22c8
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# envset

`envset` is a command-line tool for setting environment variables in a .env file. It allows you to easily add or update environment variables without manually editing the .env file.

## Installation

You can install `envset` using Cargo:

```
cargo install envset
```

## Usage

The basic syntax for using `envset` is:

```
envset [OPTIONS] <KEY1=value1> [KEY2=value2]...
```

### Options

- `-f, --force`: Overwrite existing variables
- `-o, --output <FILE>`: Specify the output file (default: .env)

### Examples

1. Set a new environment variable:
```
envset API_KEY=myapikey123
```

2. Set multiple environment variables:
```
envset DB_HOST=localhost DB_PORT=5432
```

3. Overwrite an existing variable:
```
envset --force API_KEY=newapikey456
```

4. Set variables in a specific file:
```
envset --output .env.production API_URL=https://api.example.com
```

## Features

- Set one or multiple environment variables at once
- Option to overwrite existing variables
- Specify a custom output file
- Preserves existing variables in the .env file
- Trims whitespace and quotes from values

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the ISC License.

0 comments on commit c7a22c8

Please sign in to comment.