Skip to content

Commit e059e0d

Browse files
committed
docs: update README, add CONTRIBUTING, SECURITY & FUNDING
1 parent fb8633b commit e059e0d

4 files changed

Lines changed: 85 additions & 52 deletions

File tree

‎.github/FUNDING.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: anilcan-kara

‎CONTRIBUTING.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Contributing to rustenv
2+
3+
Thank you for considering a contribution! All PRs, bug reports, and feature suggestions are welcome.
4+
5+
## Setup
6+
7+
```bash
8+
git clone https://github.com/anilcan-kara/rustenv.git
9+
cd rustenv
10+
cargo build
11+
cargo test
12+
```
13+
14+
## License
15+
16+
By contributing, you agree that your contributions will be licensed under the **MIT License**.

‎README.md‎

Lines changed: 65 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,99 @@
1-
# rustenv
1+
<div align="center">
22

3-
A fast, secure environment variable and secret management tool — written in Rust.
3+
<h1>rustenv</h1>
44

5-
`rustenv` helps developers manage `.env` files, compare differences between environments, validate configurations, mask secrets, and securely encrypt/decrypt environment files.
5+
<p><strong>A fast, secure environment variable and secret management tool — written in Rust.</strong></p>
66

7-
## Features
8-
9-
- **Profile Management** — Handle `.env.development`, `.env.staging`, `.env.production` easily.
10-
- **Diffing** — Compare variables between two environments with colorized output.
11-
- **Validation** — Scan environment files for missing values, invalid ports, malformed emails, and invalid URLs.
12-
- **Smart Masking** — Automatically hide sensitive keys (like passwords, keys, secrets, tokens).
13-
- **Strong Encryption** — Encrypt and decrypt `.env` files with AES-256-GCM.
14-
- **Multi-Format Export** — Export variables to Shell (`export KEY=val`), Docker Compose, or JSON.
15-
- **Interactive Init** — Initialize `.env` from a template, prompting you for each value.
16-
17-
## Installation
7+
[![Crates.io](https://img.shields.io/crates/v/rustenv?style=flat-square&color=fc8d62)](https://crates.io/crates/rustenv)
8+
[![License: MIT](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
9+
[![Build](https://img.shields.io/github/actions/workflow/status/anilcan-kara/rustenv/release.yml?style=flat-square)](https://github.com/anilcan-kara/rustenv/actions)
10+
[![GitHub Release](https://img.shields.io/github/v/release/anilcan-kara/rustenv?style=flat-square&color=8be04e)](https://github.com/anilcan-kara/rustenv/releases)
1811

19-
### 1. From Source (Cargo)
2012
```bash
21-
cargo install --git https://github.com/anilcan-kara/rustenv.git
13+
rustenv show # view .env with masked secrets
14+
rustenv diff .env .env.production # compare two env files
15+
rustenv encrypt .env # AES-256 encrypted .env.enc
2216
```
2317

24-
### 2. Direct Binary Download
25-
You can download the precompiled static binary for your platform directly from the GitHub Release assets:
26-
- 💻 **Windows (x64)**: [rustenv-win32-x64.exe](https://github.com/anilcan-kara/rustenv/releases/download/v0.1.1/rustenv-win32-x64.exe)
27-
- 🐧 **Linux (x64)**: [rustenv-linux-x64](https://github.com/anilcan-kara/rustenv/releases/download/v0.1.1/rustenv-linux-x64)
28-
- 🐧 **Linux (ARM64)**: [rustenv-linux-arm64](https://github.com/anilcan-kara/rustenv/releases/download/v0.1.1/rustenv-linux-arm64)
29-
- 🍎 **macOS (x64)**: [rustenv-darwin-x64](https://github.com/anilcan-kara/rustenv/releases/download/v0.1.1/rustenv-darwin-x64)
30-
- 🍎 **macOS (ARM64)**: [rustenv-darwin-arm64](https://github.com/anilcan-kara/rustenv/releases/download/v0.1.1/rustenv-darwin-arm64)
18+
</div>
3119

32-
## Usage
20+
---
3321

34-
### Show Variables
22+
## Why rustenv?
3523

36-
```bash
37-
rustenv show # Shows variables (masked by default)
38-
rustenv show --unmask # Shows variables unmasked
39-
```
24+
Managing `.env` files is painful. You share them over Slack, forget to update `.env.example`, commit secrets by accident, or have no idea what changed between environments. **rustenv** gives you a proper CLI for inspecting, comparing, validating, encrypting, and exporting your environment files.
4025

41-
### Diff Environments
26+
---
27+
28+
## Features
29+
30+
- 👁️ **Show** — pretty-print any `.env` file with automatic secret masking
31+
- 🔍 **Diff** — compare two `.env` files side-by-side, see added/removed/changed keys
32+
- ✅ **Validate** — check syntax, detect empty values, find duplicates
33+
- 📤 **Export** — convert `.env` to shell, Docker, or JSON format
34+
- 🔐 **Encrypt** — AES-256 encrypt your `.env` file into a `.env.enc`
35+
- 🔓 **Decrypt** — decrypt a `.env.enc` back to plaintext
36+
- 🎭 **Secret masking** — auto-masks values for keys containing `SECRET`, `TOKEN`, `KEY`, `PASS`, `PWD`
37+
38+
---
39+
40+
## Usage
4241

42+
### `show` — Display an env file
4343
```bash
44-
rustenv diff .env.staging .env.production
44+
rustenv show # reads .env in current dir
45+
rustenv show .env.production # specific file
46+
rustenv show --unmask # show real values (no masking)
4547
```
4648

47-
### Validate Variables
48-
49-
Checks for empty values, syntax rules, and common formats (`_PORT`, `_URL`, `_EMAIL`).
49+
### `diff` — Compare two env files
50+
```bash
51+
rustenv diff .env .env.production
52+
```
5053

54+
### `validate` — Check env file syntax
5155
```bash
5256
rustenv validate
5357
```
5458

55-
### Export Variables
59+
### `export` — Convert to different formats
60+
```bash
61+
rustenv export --format shell # export KEY="value" (sourceable)
62+
rustenv export --format docker # --env KEY=value flags for docker run
63+
rustenv export --format json # { "KEY": "value" }
64+
```
5665

66+
### `encrypt` / `decrypt` — AES-256 encryption
5767
```bash
58-
rustenv export --format shell
59-
rustenv export --format docker
60-
rustenv export --format json
68+
rustenv encrypt .env # creates .env.enc (prompts for password)
69+
rustenv decrypt .env.enc -o .env # decrypt back
6170
```
6271

63-
### Encrypt & Decrypt Secrets
72+
---
6473

65-
Securely encrypt your `.env` file before committing to source control.
74+
## CLI Reference
6675

67-
```bash
68-
rustenv encrypt .env
69-
rustenv decrypt .env.enc
76+
```
77+
rustenv <COMMAND>
78+
79+
Commands:
80+
show Display an env file with masked secrets
81+
diff Compare two env files
82+
validate Validate env file syntax and values
83+
export Export env file in various formats
84+
encrypt Encrypt a .env file with AES-256
85+
decrypt Decrypt a .env.enc file
86+
help Print help for a command
7087
```
7188

72-
### Merge Environments
89+
---
7390

74-
```bash
75-
rustenv merge .env.base .env.local -o .env
76-
```
91+
## Contributing
7792

78-
### Initialize from Template
93+
See [CONTRIBUTING.md](CONTRIBUTING.md). All PRs welcome.
7994

80-
```bash
81-
rustenv init --from .env.template --output .env --interactive
82-
```
95+
---
8396

8497
## License
8598

86-
This project is licensed under the MIT License.
99+
MIT © [Anilcan Kara](https://github.com/anilcan-kara)

‎SECURITY.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Security Policy
2+
3+
If you discover a security vulnerability, please report it privately to **anilcan@kara.dev**.

0 commit comments

Comments
 (0)