Awesome Go

Razify

CategorySecurity
SubcategorySecurity
Stars20

CLI to scan, validate and audit .env files for leaked secrets and environment drift

About Razify

Razify

The Configuration Integrity Engine for Environment Variables.

Type-safe validation, schema compliance, secret leak protection, and instant IDE diagnostics.
Sub-10ms performance. Offline-first. Zero cloud dependency. Every language.

npm version VS Code Extension Go Version License PRs Welcome


⚡ Quick Start (60 Seconds)

Option 1: Zero-Install via npx (No Setup Required)

npx razify check

Option 2: Installed CLI Binary

# Run single-pass integrity check
razify check

# Automatically sync missing template keys into .env
razify fix

# Protect repository with pre-commit git hook
razify guard install

💥 The Problem Razify Solves

Every engineering team loses hours to broken .env files:

  • ❌ "It works on my machine" — Inconsistent environment keys across developer setups.
  • ❌ Runtime Type Crashes — Application boots, but crashes when connecting to invalid URLs or ports.
  • ❌ Accidental Secret Leaks — Staging API keys or passwords committed to Git.
  • ❌ Zero Documentation — No one knows what an environment variable does after the author leaves.

Razify solves all four problems in sub-10ms with a single tool.


💎 Key Features

FeatureCommandDescription
⚡ Unified Integrity Checkrazify checkFlagship: Single-pass schema validation, type checking & secret leak scanning.
🔒 Secret Leak Scannerrazify scanHigh-entropy string detection catching API keys, JWTs, and passwords.
📋 Type Schema EngineIn .env.exampleEnforces @type(...), @enum(...), @range(...), and @requires(...).
🎨 VS Code Extensionvscode-razifyReal-time red/yellow squigglies, hover tooltips & auto-completions.
🛡️ Git Pre-Commit Guardrazify guardSub-10ms pre-commit git hook blocking broken or insecure commits.
🤖 GitHub Actionaction.yml1-step CI/CD Pull Request enforcement gate.
🔄 Environment Diffingrazify diffCompare .env files side-by-side.
💡 Auto-Fixerrazify fixAutomatically sync missing template keys into .env.
📖 Doc Generatorrazify docsAuto-generate Markdown documentation from .env.example.
📊 Health Auditorrazify auditFull configuration health report with a score out of 100.

📝 Schema Annotations Guide

Annotate your .env.example comments to enforce strict validation rules across your team:

# @type(port) @range(1000-65535)
APP_PORT=3000

# @enum(dev,staging,prod)
NODE_ENV=dev

# @type(email) @required
[email protected]

# @type(url)
DATABASE_URL=postgres://user:pass@localhost:5432/mydb

# @requires(DB_HOST)
DB_PASS=change_me

# Stripe API Key for payments
STRIPE_SECRET=sk_test_12345

📦 Installation Options

1. npm Zero-Install (npx)

Run instantly anywhere Node.js is installed without pre-installing binaries:

npx razify check

2. Homebrew (macOS / Linux)

brew tap Hossiy21/tap
brew install razify

3. Scoop (Windows)

scoop bucket add Hossiy21 https://github.com/Hossiy21/scoop-bucket
scoop install razify

4. Direct Go Install

go install github.com/Hossiy21/razify@latest

🎨 VS Code / IDE Extension

Install the official vscode-razify extension for Visual Studio Code / Antigravity IDE:

  • 🔴 Inline Diagnostics: Real-time red & yellow error squigglies inside .env files.
  • 💡 Schema Hover Tooltips: View @type(...) and @enum(...) schema rules on mouse hover.
  • ⚡ Auto-Completion: Suggests missing .env.example keys while typing.
  • 🛡️ Check on Save: Auto-runs background checks whenever a .env file is saved.

🛡️ CI/CD & Team Enforcement

Pre-Commit Git Hook

Protect local developer commits from leaking secrets or missing required keys:

razify guard install

GitHub Actions Pipeline

Enforce environment configuration integrity in Pull Requests:

name: Configuration Integrity

on: [push, pull_request]

jobs:
  check-env:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Razify Check
        uses: Hossiy21/razify@v1
        with:
          env-file: '.env'
          example-file: '.env.example'

📄 License

MIT License © 2026 hossiy21.

Frequently Asked Questions

What is Razify?

Razify is a Security library for the Go programming language. CLI to scan, validate and audit .env files for leaked secrets and environment drift

How do I install Razify?

Install Razify with the Go module system using `go get Hossiy21/razify`. Check the repository for the current installation instructions.

What category does Razify belong to?

Razify is listed under Security, specifically Security.

← Back to Security