🎉 dotvet v0.1.7 is live on npm PyPI
🛡️ Developer Security CLI Tool

Never ship missing, broken, or weak .env secrets to production.

dotvet is a command-line tool that scans your codebase, finds every environment variable your application needs, checks that your .env has real, safe values (no "changeme", no dummy passwords, no short JWT secrets), and stops your build if anything is insecure.

Run It In Your Project Right Now (No Installation Required):
JavaScript / TypeScript / Node.js:
npx dotvet
Python:
pip install dotvet && dotvet
Using an AI Coding Agent?
Prompt your agent to auto-audit, fix secrets, and install Git firewalls:
Antigravity Cursor Claude Codex
✔ Scans in under 200ms ✔ Zero dependencies (safe from supply chain attacks) ✔ Exits with code 1 in CI if secrets are unsafe

Why Do You Need This?

The difference between standard tools and dotvet in 10 seconds:

❌ WITHOUT dotvet (How apps get hacked)
# Your .env file:
PORT=3000
JWT_SECRET=secret
DATABASE_URL=changeme

What existing tools (like dotenv-safe) do:

“All variables exist! Build passed! ✅”

The Reality: Existing tools only check if a variable exists. They don't care if it's garbage. Your app deploys with JWT_SECRET="secret", allowing hackers to forge admin logins in seconds.

✅ WITH dotvet (Automatic Protection)
$ npx dotvet
FAIL: JWT_SECRET is only 6 chars. Minimum 32 required.
FAIL: DATABASE_URL is set to placeholder "changeme".
$ npx dotvet fix
✔ Generated secure 32-byte (64-char) JWT secret.
✔ Added .env to .gitignore. Build safe!

What dotvet does:

It audits the actual security quality of your values. It catches placeholder strings, enforces cryptographic strength on tokens, blocks broken pull requests, and can automatically repair them.

⚡ Feature Comparison

How dotvet Compares

Why existing linters like dotenv-safe leave your production apps vulnerable:

Swipe left/right to compare features ← scroll →
Capability dotvet 🛡️ dotenv-safe dotenvx gitleaks / trufflehog
Code-aware Scanning (auto-derives required vars from code) ✅ Zero-config ❌ (Manual .env.example)
Bans Dummy Placeholders (changeme, dummy, test) ✅ Yes ❌ (Passes them)
Enforces JWT Minimum Strength (≥ 32 chars / 256-bit) ✅ Hard Fail
Entropy & Repeating Pattern Detector (abcdefgh*4) ✅ Yes ✅ (Git commits only)
Auto-Heals Secrets & .gitignore (dotvet fix) ✅ Yes
Generates Team Env Contract (.env.schema.json) ✅ Yes
Native GitHub Action (uses: EthicCodeTech/dotvet@main) ✅ Yes ⚠️ ⚠️
Runtime Dependencies 0 (Safe) Multiple Multiple Go Binary

How It Works

Zero configuration required. It inspects your real code and env files.

1

Auto-Scans Your Code

It looks through your JS, TS, Python, Go, and Docker files to find every environment variable your code calls (process.env.VAR or os.getenv('VAR')). You don't have to manually write schemas.

2

Audits Security Quality

It compares your code's needs against your .env file. Are any required vars missing? Are values dummy placeholders? Is your JWT secret under 32 characters?

3

Protects & Auto-Heals

In CI, it halts the pipeline with exit code 1 to stop an insecure deploy. On your local machine, running dotvet fix automatically fills in secure random cryptographic secrets.

What Errors Does It Catch?

The specific mistakes dotvet prevents before they hit production:

BLOCKS Undersized JWT Signing Secrets

HMAC-SHA256 tokens require 256 bits of entropy. Any variable named JWT_SECRET under 32 characters causes an instant failure, preventing dictionary cracking.

BLOCKS Dummy Placeholders Left in Configs

Catches values like "changeme", "your-secret-here", "dummy", "admin", or "123456".

BLOCKS Variables Missing or Empty

Detects when your code needs a variable (e.g. DATABASE_URL) but your .env didn't provide it, preventing application boot crashes.

WARNS Accidental Git Exposure

Warns you immediately if a .env file exists in your repository but isn't listed in your .gitignore file.

RECON Historical .env Leaks in Past Git Commits

Passive reconnaissance glances at your Git commit graph. If someone committed a .env file in the past and then deleted it in a later commit, dotvet flags the exact commit hash, author, and whether it was pushed to a remote before scraper bots exploit it.

📜 Developer Onboarding

Your Team's Env Contract (.env.schema.json)

Never share unencrypted, broken .env files over Slack or DM again.

Generate Once, Enforce Everywhere

Running dotvet generate derives your application's complete environment schema:

  • .env.example: Clean documentation of all required variables without exposing sensitive values.
  • .env.schema.json: Machine-readable JSON Schema defining types, constraints, and descriptions for your team.
npx dotvet generate
Sample .env.schema.json:
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "required": ["DATABASE_URL", "JWT_SECRET"],
  "properties": {
    "JWT_SECRET": { "minLength": 32, "type": "string" },
    "PORT": { "default": "3000", "type": "integer" }
  }
}

Command Reference

The simple commands you can run:

dotvet

Default check. Scans code and audits your active .env file for errors and weak secrets.

Exits 0 (passed) or 1 (failure)
dotvet fix

Auto-repair. Generates secure 32-byte cryptographic keys, replaces placeholders, and updates .gitignore.

Auto-Heal Mode
dotvet generate

Generates .env.example and .env.schema.json contracts automatically from your code.

Contract Generator
dotvet install-hook

Installs dual Git hooks (pre-commit & pre-push) so nobody on your team can commit or push insecure secrets.

Dual Hook Guard
🤖 CI / CD Quality Gate

Add to GitHub Actions in 3 Lines

Block broken pull requests before they reach production with the official GitHub Action:

# .github/workflows/security.yml
name: Env Security Gate
on: [push, pull_request]

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Verify Environment Variable Security
        uses: EthicCodeTech/dotvet@main
        with:
          strict: 'true'
🛡️ Repository Shield

Show Your Repo Is Protected

Signal to your team and users that your project enforces environment security. Customize the shield color via URL parameter:

Live Badge Preview:
dotvet: secure

Includes official .v logo mark.

Select Badge Color:
Copy Markdown for your README.md:
[![dotvet: secure](https://ethiccode.in/dotvet/badge.svg)](https://ethiccode.in/dotvet)
💡 You can also pass custom colors directly in the URL: ?color=cyan|green|purple|orange|pink