envilder
Version:
A CLI that securely centralizes your environment variables from AWS SSM as a single source of truth
245 lines (178 loc) β’ 8.62 kB
Markdown
# ποΈ Envilder βοΈ
<p align="center">
<img src="https://github.com/user-attachments/assets/96bf1efa-7d21-440a-a414-3a20e7f9a1f1" alt="Envilder">
</p>
<p align="center">
<b>Automate .env and secret management with Envilder</b><br>
<span>Streamline your environment setup with AWS Parameter Store</span>
</p>
<p align="center">
<a href="https://www.npmjs.com/package/envilder">
<img src="https://img.shields.io/npm/v/envilder.svg" alt="npm version">
</a>
<a href="https://img.shields.io/npm/dm/envilder.svg">
<img src="https://img.shields.io/npm/dm/envilder.svg" alt="npm downloads">
</a>
<a href="https://github.com/macalbert/envilder/actions/workflows/tests.yml">
<img src="https://github.com/macalbert/envilder/actions/workflows/tests.yml/badge.svg" alt="CI Tests">
</a>
<a href="https://macalbert.github.io/envilder/">
<img src="https://img.shields.io/badge/coverage-report-green.svg" alt="Coverage Report">
</a>
<a href="./LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License">
</a>
</p>
## Why centralize environment variables?
Envilder is a CLI tool for .env automation, AWS SSM secrets management, and secure environment variable sync.
Generating and maintaining consistent .env files is a real pain point for any development team. From outdated
secrets to insecure practices, the risks are tangible. Envilder eliminates these pitfalls by centralizing and
automating secret management across real-world environments (dev, test, production) in a simple, secure, and
efficient way. Use Envilder to automate .env files, sync secrets with AWS Parameter Store, and streamline
onboarding and CI/CD workflows.
---
## β What Envilder solves
- Desync between environments (dev, prod)
- Secrets not properly propagated across team members
- CI/CD pipeline failures due to outdated or missing .env files
- Slow and manual onboarding processes
- Security risks from sharing secrets via Slack, email, or other channels
- Insecure .env practices and manual secret sharing
## β
How Envilder makes life easier
- π‘οΈ Centralizes secrets in AWS Parameter Store
- βοΈ Generates .env files automatically for every environment
- π Applies changes idempotently and instantly
- π Improves security: no need to share secrets manually; everything is managed via AWS SSM
- π₯ Simplifies onboarding and internal rotations
- π Enables cloud-native, infrastructure-as-code secret management
- π€ Perfect for DevOps, CI/CD, and team sync
---
## π Table of Contents
- [ποΈ Envilder βοΈ](#οΈ-envilder-οΈ)
- [Why centralize environment variables?](#why-centralize-environment-variables)
- [β What Envilder solves](#-what-envilder-solves)
- [β
How Envilder makes life easier](#-how-envilder-makes-life-easier)
- [π Table of Contents](#-table-of-contents)
- [βοΈ Features](#οΈ-features)
- [π§± Feature Status](#-feature-status)
- [πΎ Installation](#-installation)
- [π Quick Start](#-quick-start)
- [π₯ Video Demonstration](#-video-demonstration)
- [π Get Started (3 steps)](#-get-started-3-steps)
- [π Quick Links](#-quick-links)
- [π οΈ How it works](#οΈ-how-it-works)
- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
- [π Roadmap](#-roadmap)
- [π€ Contributing](#-contributing)
- [π License](#-license)
---
## βοΈ Features
- π **Strict access control** β IAM policies define access to secrets across stages (dev, staging, prod)
- π **Auditable** β All reads/writes are logged in AWS CloudTrail
- π§© **Single source of truth** β No more Notion, emails or copy/paste of envs
- π **Idempotent sync** β Only whatβs in your map gets updated. Nothing else is touched
- π§± **Zero infrastructure** β Fully based on native AWS SSM. No Lambdas, no servers, no fuss
### π§± Feature Status
| Feature | Status | Notes |
|--|--|--|
| Mapping-based resolution | β
Implemented | |
| `.env` file generation | β
Implemented | |
| AWS profile support | β
Implemented | `--profile` flag |
| Import/push mode (`--push`) | β
Implemented | |
| Auto-discovery (`--auto`) | β Planned | Detect keys based on env |
| Check/sync mode (`--check`) | β Planned | Diff local vs remote |
| Webhook/Slack notification | β Planned | On push/pull events |
| Hierarchical mapping | β Not yet | Flat mapping only |
| Plugin system | β Not yet | SSM is the only backend (for now) |
---
## πΎ Installation
π Requirements:
- Node.js **v20+** (cloud-native compatible)
- AWS CLI installed and configured
- IAM user/role with `ssm:GetParameter`, `ssm:PutParameter`
```bash
npm install -g envilder
```
> π‘ **New to AWS SSM?** AWS Systems Manager Parameter Store provides secure storage for configuration data and secrets:
>
> - [AWS SSM Parameter Store Overview](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html)
> - [Setting up AWS CLI credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html)
> - [IAM permissions for SSM](https://docs.aws.amazon.com/systems-manager/latest/userguide/setup-instance-profile.html)
---
## π Quick Start
### π₯ Video Demonstration
Watch how easy it is to automate your .env management in less than 1 minute:

### π Get Started (3 steps)
After configuring the AWS CLI and ensuring you have the necessary permissions to create SSM parameters,
you can begin pushing your first environment variables.
1. **Create a mapping file:**
```json
{
"DB_PASSWORD": "/my-app/db/password"
}
```
2. **Push a secret to AWS SSM:**
```bash
envilder --push --key=DB_PASSWORD --value=12345 --ssm-path=/my-app/db/password
```
Once your secrets are stored in AWS, you can easily generate or synchronize your local .env files:
1. **Generate your .env file from AWS SSM:**
```bash
envilder --map=param-map.json --envfile=.env
```
Your secrets are now managed and versioned from AWS SSM. Add `.env` to your `.gitignore` for security.
Envilder is designed for automation, onboarding, and secure cloud-native workflows.
### π Quick Links
- [Requirements & Installation](docs/requirements-installation.md)
- [Push Command Guide](docs/push-command.md)
- [Pull Command Guide](docs/pull-command.md)
---
## π οΈ How it works
```mermaid
graph LR
A["Mapping File<br/>(param-map.json)"] --> B[Envilder]:::core
C["Environment File<br/> '.env' or --key"] --> B
D["AWS Credentials"]:::aws --> B
E["AWS SSM"]:::aws --> B
B --> F["Pull/Push Secrets πΎ"]
classDef aws fill:#ffcc66,color:#000000,stroke:#333,stroke-width:1.5px;
classDef core fill:#1f3b57,color:#fff,stroke:#ccc,stroke-width:2px;
```
1. Create a new `.env` file like `'ENV_VAR=12345'`
2. Define mappings in a JSON file : `{"ENV_VAR": "ssm/path"}`
3. Run Envilder: `--push` to upload, or `--map` + `--envfile` to generate
4. Envilder syncs secrets securely with AWS SSM Parameter Store using your AWS credentials
5. Result: your secrets are always up-to-date, secure, and ready for any environment
---
## Frequently Asked Questions (FAQ)
**Q: What is Envilder?**
A: Envilder is a CLI tool for automating .env and secret management using AWS SSM Parameter Store.
**Q: How does Envilder improve security?**
A: Secrets are never stored in code or shared via chat/email. All secrets are managed and synced securely via AWS SSM.
**Q: Can I use Envilder in CI/CD pipelines?**
A: Yes! Envilder is designed for automation and works seamlessly in CI/CD workflows.
**Q: Does Envilder support multiple AWS profiles?**
A: Yes, you can use the `--profile` flag to select different AWS credentials.
**Q: What environments does Envilder support?**
A: Any environment supported by AWS SSMβdev, test, staging, production, etc.
**Q: Is Envilder open source?**
A: Yes, licensed under MIT.
---
## π Roadmap
π§ Planned features:
- π Drift detection (`--check`)
- π§ Auto-discovery (`--auto`)
- π¨ Slack/Webhook notifications
- π Plugin system (Vault, Secrets Manager, etc.)
π See full [ROADMAP.md](./ROADMAP.md)
---
## π€ Contributing
All help is welcome β PRs, issues, ideas!
- π§ Use our [Pull Request Template](.github/pull_request_template.md)
- π§ͺ Add tests where possible
- π¬ Feedback and discussion welcome
---
## π License
MIT Β© [MarΓ§al Albert](https://github.com/macalbert)
See [LICENSE](./LICENSE)