Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

env-guard

A lightweight TypeScript CLI tool that validates your environment variables and ensures your .env files are correctly configured.

Usage

# Check a single environment variable
env-guard DATABASE_URL

# Load from a .env file, then validate keys
env-guard --env-file .env DATABASE_URL API_KEY

# Validate types (string, number, boolean)
env-guard DB_PORT:number API_ENABLED:boolean

# Show help
env-guard --help

Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm start - Run CLI using ts-node (for development)
  • npm test - Run tests with Jest

Project Structure

env-guard/
├─ src/
│   └─ index.ts           # main CLI logic
├─ bin/
│   └─ env-guard.js       # executable
├─ package.json
├─ README.md
└─ tests/
    └─ env-guard.test.ts  # test file

License

MIT

About

A lightweight TypeScript CLI tool that validates your environment variables and ensures your .env files are correctly configured.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages