envfix icon

envfix

envfix is a zero-dependency Node.js CLI that checks .env files against .env.example, helps repair missing keys, and can generate or sync example files. It is designed for local development and CI workflows where environment configuration needs to stay consistent.

envfix

Overview

envfix is a small Node.js command-line tool for checking and repairing environment file drift. Its primary job is to compare .env against .env.example, identify missing or malformed configuration, and help keep the two files aligned without leaking secrets.

The README presents it as zero-dependency and CI friendly. Beyond the basic check-and-fix flow, it can generate or sync example files, inspect Git safety around .env, and scan multiple environment file pairs in a project directory.

Core capabilities

Environment drift checks

Compare a local .env file against .env.example to surface missing variables and empty values, then guide the user toward a fix.

Safe repair workflow

Append missing keys to .env without overwriting existing lines or values; the file is created if it does not exist.

Example file generation and sync

Generate a .env.example from .env, or sync new keys into an existing example file while reporting stale entries.

Doctor mode

Run a broader health check that covers file presence, syntax, consistency, and Git safety, including whether .env is ignored or tracked.

Multi-environment coverage

Scan every .env*.example ↔ env pair in a directory with --all so multiple environment files can be checked in one run.

Output and workflow controls

Use flags such as --dry-run, --json, --strict, and GitHub annotation controls to fit local review and CI workflows.

Common use cases

  • Catch local config drift

    Use envfix after pulling a repository or merging changes to find environment variables that were added to .env.example but are missing from your local .env.

  • CI validation for environment files

    Run the doctor command in a CI job to check file presence, syntax, consistency, and whether .env is tracked or ignored by Git before code is merged.

  • Repair or regenerate environment files

    Use fix when you want to add only the missing keys to .env, or use example / example --sync when maintaining an example file for teammates.

  • Review multiple environment pairs

    Enable --all in projects with several environment variants so one command can inspect each .env*.example pair in the directory.

  • Automated reporting

    Use --json or GitHub annotation flags when the output needs to be consumed by automation rather than read manually.

Pros and Cons

Pros

  • Zero-dependency CLI design keeps setup simple.
  • Can detect missing keys, empty values, duplicates, malformed declarations, and Git safety issues.
  • Supports repair workflows that avoid overwriting existing values by default.
  • Can generate or sync .env.example files while omitting secret values.
  • Offers CI-friendly options including JSON output, dry-run mode, and GitHub annotations.

Cons

  • The source material is strongest on README examples; detailed command references and edge-case behavior are not fully documented in the supplied pages.
  • It is focused on Node.js projects and .env-style workflows, so it is not a general-purpose configuration manager.

FAQ

Can envfix be used in CI?

Yes. The README shows envfix as a Node.js command-line tool that can be run with npx, including on GitHub Actions where annotations are automatically enabled.

What can envfix do?

envfix can compare .env with .env.example, append missing keys to .env, run a broader doctor check, generate an example file from .env, or sync an example file with new keys.

Does envfix require installation?

The README says envfix has zero dependencies and is meant for Node.js projects. It is distributed through npm and can be run without a local install using npx envfix.

Does envfix support machine-readable output?

The README describes a --json option for a single JSON document, and a doctor mode that reports files, syntax, consistency, and Git safety. It also notes GitHub annotations can be forced on or off.

Is envfix a paid product?

The source only shows envfix as a public GitHub repository and does not describe paid tiers or licensing terms beyond the repository contents provided here.

Quick Facts

Category
Developer Tool
Platform
Node.js command-line tool
Primary use
Check and repair .env vs .env.example drift
Distribution
Run with npx; repository includes package.json
Repository
github.com/gokhanozgezer/envfix
Cost signal
Open-source repository with no paid plan described in the supplied sources

Alternativas a envfix

ByteAsk icon

ByteAsk

ByteAsk is a terminal-first AI coding agent for C and C++ that edits repositories and verifies changes with the real compiler, debugger, sanitizers, and tests before showing a diff. It offers a free tier plus paid plans, with editor connectors and zero-retention handling described in the source.

CreateOS Sandbox icon

CreateOS Sandbox

CreateOS Sandbox is an isolated compute environment for running code and agent workloads inside Firecracker micro-VMs. It is designed for workflows that need machine-level isolation, private networking between sandboxes, and programmatic control through SDK, CLI, or MCP.

hob icon

hob

hob is an independent workspace for coding agents that keeps agent sessions, terminals, history, and follow-up work organized around the tools and providers you already use. It is aimed at developers who want local control over routing, history, and workspace structure rather than a bundled model stack.

Ably Chat icon

Ably Chat

Ably Chat is a chat API platform for building custom realtime chat applications. It supports room-based messaging, typing indicators, presence, reactions, and message updates, with usage-based pricing options for different deployment stages.

MacSpoof icon

MacSpoof

MacSpoof es un cambiador de MAC para macOS: cambia o aleatoriza tu MAC Wi‑Fi para reconectar y reducir el registro de identidad en redes públicas.

Manta AI icon

Manta AI

Manta AI is an autonomous web app testing tool for teams that want to map application behavior, catch regressions, and generate tests without writing scripts or maintaining selectors. It works from a URL and supports plain-English test flows, run results with screenshots, and scheduled or deployment-triggered checks.