envcheck is a lightweight CLI tool that validates your development environment against project requirements. Say goodbye to "works on my machine" problems!
- Fast - Written in Rust, single binary, no dependencies
- Simple - Just add a
.envcheck.yamlfile to your project - Comprehensive - Check tools, versions, env vars, ports, and files
- Clean Output - Clear, colored output with actionable suggestions
- Cross-platform - Works on macOS, Linux, and Windows
- Community-driven - Easy to extend with new validators
# Using cargo
cargo install envcheck
# Or download from releases
# https://github.com/dotandev/envcheck/releases- Initialize a new configuration or use an existing one:
# Generate a default configuration
$ envcheck init- Run
envcheck:
$ envcheck
Running environment checks...
✓ node 18.17.0 found
✓ docker found
✗ DATABASE_URL is not set
Set DATABASE_URL environment variable
✓ Port 3000 is available
✓ .env exists
--- 1 issue(s) found. Fix them to continue.- Export results to JSON for CI/CD:
$ envcheck --jsonCheck if tools are installed and verify versions using proper semver comparison:
tools:
- name: node
version: ">=18.0.0" # Supports semver ranges
required: true
- name: docker
required: false # Optional tools won't fail the checkSupported tools include node, npm, go, rust, cargo, python, docker, git, java, ruby, and more.
Validate that required environment variables are set and optionally match a regex:
env_vars:
- name: DATABASE_URL
required: true
- name: NODE_ENV
pattern: "^(development|test|production)$"
required: trueCheck if ports are available:
ports:
- 3000
- 5432Verify that required files or directories exist and have correct permissions:
files:
- path: .env
required: true
permissions: 0o600 # Verify octal permissions (Unix)
- path: storage/logs
is_directory: true
required: trueWe love contributions! This project is designed to be community-driven. See our CONTRIBUTING.md for detailed guidelines.
Looking to contribute? Check out issues labeled good first issue - these are perfect for newcomers!
See the examples/ directory for sample configurations:
# Clone the repo
git clone https://github.com/dotandev/envcheck.git
cd envcheck
# Build
cargo build
# Run tests
cargo test
# Run locally
cargo run -- --helpMIT License - see LICENSE for details
Inspired by tools like Redis - built by the community, for the community.
Made by the envcheck community