Skip to content
Back to apps

VS Code extension

Env Checker

Open a .env file in a structured view. Comments become documentation next to each key, and comparing two variants shows what is missing or left over at a glance.

Status
Live
Licence
MIT
Platform
VS Code 1.85.0 or newer

Install

code --install-extension CodeandSorcery.vscode-env-checker

Or search for “Env Checker” in the Extensions view of your editor.

.env checked against .env.example, shared keys, one extra key, and two missing keys.
.env checked against .env.example, shared keys, one extra key, and two missing keys.

Features

  • Custom editor

    Opening .env or .env.* files uses the Env Checker view. One command takes you back to the plain text editor whenever you want.

  • Formatted table

    Keys, values, and documentation merged from the # lines above each key plus the optional inline comment after the value.

  • Side-by-side comparison

    Pick a base file and a comparison file from the same folder. When both exist, .env against .env.example is the default.

  • Live updates

    Editing an env file in that folder refreshes the view, and unsaved buffer content is used when the file is open in a tab.

  • Dotenv language

    A dotenv language id is registered for the usual filename patterns, so plain-text editing behaves properly too.

  • Hidden values

    Values are hidden by default in the table. Reveal them with the dedicated button, then hide them again with one click.

Commands

In VS Code, press F1, then search for “Env Checker” to run one of these commands.

Command Palette · VS CodeF1
  • Env Checker: Open formatted view

    Opens the comparison panel for the active env file.

  • Env Checker: Compare with .env.example (and related)

    The same panel, focused on your example and related files.

  • Env Checker: Compare env files…

    Choose files from a dialog; the first selection sets the folder context.

  • Env Checker: Reopen as text editor

    Opens the same file in the default text editor.

Also available from the Explorer context menu and the editor title bar when the file is an env file.

Settings

Search for “Env Checker” in VS Code settings to customize which files are offered for comparison.

Add files to the comparison

List the files to offer alongside .env and .env.* files. They must be in the same folder as the active file.

Setting
envChecker.relatedFileNames
Expected value
List of file names

Example · settings.json

{
  "envChecker.relatedFileNames": [
    ".env.example",
    "config.env"
  ]
}

This example also offers config.env for comparison. Replace it with the name of your file.

Nothing leaves the editor

Env Checker reads the files you open and nothing else. There is no account, no telemetry and no network call, which is why it has no separate privacy policy. The source is MIT licensed and public.