Skip to content

anilcan-kara/rustenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rustenv

A fast, secure environment variable and secret management tool — written in Rust.

rustenv helps developers manage .env files, compare differences between environments, validate configurations, mask secrets, and securely encrypt/decrypt environment files.

Features

  • Profile Management — Handle .env.development, .env.staging, .env.production easily.
  • Diffing — Compare variables between two environments with colorized output.
  • Validation — Scan environment files for missing values, invalid ports, malformed emails, and invalid URLs.
  • Smart Masking — Automatically hide sensitive keys (like passwords, keys, secrets, tokens).
  • Strong Encryption — Encrypt and decrypt .env files with AES-256-GCM.
  • Multi-Format Export — Export variables to Shell (export KEY=val), Docker Compose, or JSON.
  • Interactive Init — Initialize .env from a template, prompting you for each value.

Installation

1. From Source (Cargo)

cargo install --git https://github.com/anilcan-kara/rustenv.git

2. Direct Binary Download

You can download the precompiled static binary for your platform directly from the GitHub Release assets:

Usage

Show Variables

rustenv show                    # Shows variables (masked by default)
rustenv show --unmask           # Shows variables unmasked

Diff Environments

rustenv diff .env.staging .env.production

Validate Variables

Checks for empty values, syntax rules, and common formats (_PORT, _URL, _EMAIL).

rustenv validate

Export Variables

rustenv export --format shell
rustenv export --format docker
rustenv export --format json

Encrypt & Decrypt Secrets

Securely encrypt your .env file before committing to source control.

rustenv encrypt .env
rustenv decrypt .env.enc

Merge Environments

rustenv merge .env.base .env.local -o .env

Initialize from Template

rustenv init --from .env.template --output .env --interactive

License

This project is licensed under the MIT License.

About

A fast, secure environment variable and secret management tool — written in Rust

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages