The missing CLI tool for .env file management.
Diff, scan, validate, document, and audit your environment variables.
Offline. No cloud account. One binary. Every language.
-
Install Razify
go install github.com/Hossiy21/razify@latest
-
Initialize your project
razify init
-
Protect your repository
razify guard install
-
Sync missing keys
razify fix .env .env.example
Every development team has lost hours to .env issues:
- "It works on my machine" — environment inconsistencies across team members
- "Which variables do I need?" — no documentation, no standard
- "Did someone commit a secret?" — API keys and passwords leaked to version control
- "What does this variable do?" — no one remembers, original author left the team
Razify solves all four problems with a single binary.
| Command | What it does |
|---|---|
razify diff |
Compare two .env files and show exactly what changed |
razify scan |
Detect secret leaks, weak passwords, and exposed credentials |
razify validate |
Ensure all required variables are present before deploying |
razify docs |
Auto-generate markdown documentation from .env.example |
razify audit |
Full health report with a score out of 100 |
razify fix |
Automatically sync missing keys from .env.example to .env |
razify init |
Interactive wizard to bootstrap your .env.example file |
razify version |
Check the current version and look for updates |
razify guard |
Block git commits that contain exposed secrets |
Install via your own personal tap (replace Hossiy21 with your GitHub username if different):
brew tap Hossiy21/tap
brew install razifyscoop bucket add Hossiy21 https://github.com/Hossiy21/scoop-bucket
scoop install razifygo install github.com/Hossiy21/razify@latestVerify:
razify versionrazify diff .env .env.stagingComparing .env → .env.staging
✘ MISSING in .env.staging: API_KEY
✔ ADDED in .env.staging: NEW_FEATURE
~ CHANGED: DB_HOST
.env: localhost
.env.staging: staging.server.com
7 difference(s) found.
razify scan .env
razify scan .env --jsonScanning .env...
✘ [CRITICAL] Line 6: DB_PASSWORD
Value : ch****me
Reason: Weak or default value detected
⚠ [HIGH] Line 5: AWS_ACCESS_KEY
Value : AK****************LE
Reason: Cloud provider credential
Summary: 1 CRITICAL 4 HIGH 1 MEDIUM
✘ ACTION REQUIRED: Never commit this file to git!
razify validate .env .env.example
razify validate .env .env.example --jsonValidating .env against .env.example...
✘ [MISSING] STRIPE_KEY
Required key not found in .env
~ [PLACEHOLDER] DB_HOST
Value looks like it was never changed from example
✔ [OK] API_KEY
✔ [OK] JWT_TOKEN
Summary: 6 OK 1 MISSING 2 EMPTY/PLACEHOLDER
✘ ACTION REQUIRED: Add missing keys before deploying!
razify docs .env.example
razify docs .env.example -o ENV_DOCS.md| Variable | Required | Default | Description |
|----------------|-----------|-------------|--------------------------------|
| `DB_HOST` | No | `localhost` | Primary database host |
| `API_KEY` | **Yes** | — | Main API key for external use |
| `STRIPE_KEY` | **Yes** | — | Stripe payment processing key |
---
### `razify init` — Interactive bootstrap
```bash
razify init
The interactive wizard helps you create a professional .env.example from scratch, automatically adding validation tags like @required and @type based on your input.
razify fix .env .env.example
razify fix .env .env.example --dry-runFixing .env using template .env.example...
+ Added: STRIPE_KEY
+ Added: NEW_SERVICE_URL
✔ Successfully added 2 missing keys to .env!
razify audit .env .env.example ┌─────────────────────────────┐
│ Razify Audit Report │
└─────────────────────────────┘
▸ Running scan...
▸ Running validate...
▸ Running diff...
┌─────────────────────────────┐
│ Results │
└─────────────────────────────┘
Scan 1 CRITICAL 4 HIGH 1 MEDIUM
Validate 1 MISSING 2 PLACEHOLDER 6 OK
Diff 7 difference(s) from .env.example
┌─────────────────────────────┐
│ Health Score │
└─────────────────────────────┘
5/100 Critical — needs immediate attention
Recommendations:
✘ Rotate exposed credentials immediately
⚠ Add missing required variables before deploying
~ Replace placeholder values with real ones
razify guard install
razify guard status
razify guard uninstall ✔ Razify Guard installed successfully!
Every git commit in this repo will now be scanned.
Commits with exposed secrets will be blocked automatically.
Razify is designed to be a "Security Gate" in your CI/CD pipeline. You can use it to audit your Staging or Production environment files before they are deployed.
Tip
Since .env is usually ignored by Git, use this to scan committed files like .env.staging or variables generated from GitHub Secrets.
This repository includes a dedicated GitHub Actions workflow (.github/workflows/env-validation.yml) that demonstrates CI integration by validating the demo environment files.
jobs:
validate-env:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'
- name: Install Razify
run: go install github.com/Hossiy21/razify@latest
- name: Scan Staging Environment
run: razify scan .env.staging --json
- name: Validate Template Integrity
run: razify validate .env.staging .env.example --jsonEvery command supports --json for scripting and AI agent integration:
razify scan .env --json{
"file": ".env",
"results": [
{
"line": 3,
"key": "API_KEY",
"value": "se*****23",
"reason": "Looks like an API key",
"risk": "HIGH"
}
],
"summary": {
"critical": 1,
"high": 4,
"medium": 1,
"total": 6
}
}Works with any project that uses .env files.
| Framework | Compatible |
|---|---|
| React / Next.js | ✅ |
| Node.js | ✅ |
| Python / Django / FastAPI | ✅ |
| Go | ✅ |
| Laravel (PHP) | ✅ |
| Ruby on Rails | ✅ |
-
razify diff— Compare env files -
razify scan— Secret leak detection -
razify validate— Required variable enforcement -
razify docs— Auto-generate documentation -
razify audit— Full health report -
razify guard— Git commit protection -
razify fix— Auto-sync missing keys -
razify init— Interactive setup wizard -
--jsonflag — AI agent and script support - VS Code extension
- Web dashboard
Contributions are welcome! Please see CONTRIBUTING.md for guidelines on how to get started.
git clone https://github.com/Hossiy21/razify.git
cd razify
go build .MIT — free to use, modify, and distribute.
Made with ❤️ in Ethiopia by Hosaina
