Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Nifty Env: .env Files, Profiles & SecretsNew to Visual Studio Code? Get it now.
Nifty Env: .env Files, Profiles & Secrets

Nifty Env: .env Files, Profiles & Secrets

Nifty

|
329 installs
| (0) | Free
Load .env files into terminals, tasks and debug sessions, switch .env profiles, blur secrets, complete process.env names in code, and check .env against .env.example and .gitignore.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Env

Load .env files into terminals, tasks and debug sessions, switch .env profiles, blur secrets, complete process.env names in code, and check .env against .env.example and .gitignore.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Features

A .env file with its secrets blurred, the staging profile picked from the status bar, and a new terminal echoing the staging values

A .env file with the database URL, Stripe key and session secret blurred, and a hover showing API_URL expanded

The staging profile selected in the status bar, and a new terminal that already has its values

Show Loaded Variables: every variable of the staging profile, secrets masked

  • Your .env in every terminal. New integrated terminals, task terminals and debug sessions get the variables from your .env files, with no source .env, no envFile in every launch configuration and no extra packages. Values set in launch.json still win.
  • Profiles. Keep .env.development, .env.staging and .env.production side by side and switch with one click in the status bar. .env.local and .env.<profile>.local overrides are loaded too, in the order Next.js, Vite and dotenv-flow use.
  • References are expanded: URL=http://localhost:${PORT}/api, ${PORT:-3000} defaults, and PATH=$PATH:./bin, after all files are merged, so a profile's PORT flows into URLs defined in .env.
  • Safe to screen-share. Values of keys that look secret (*_TOKEN, *_PASSWORD, API_KEY, DATABASE_URL…) are blurred in the editor. The line you're on is shown so you can still edit it. Toggle with the eye button, or blur every value.
  • Never miss a new variable. If .env.example has a key your .env doesn't, you get a hint and a quick fix to add it. Create .env.example writes one from your .env with the secrets left blank.
  • A proper .env editor. Syntax highlighting, hovers that show the expanded value, and warnings for duplicate keys, unclosed quotes and lines that aren't KEY=value. Multi-line quoted values (like private keys) work.
  • Your variables in your code. Type process.env. or import.meta.env. and get every key your .env files set, with its value (secrets blurred). It also works for os.getenv(", os.environ[" (Python), env(' and $_ENV[' (PHP and Laravel), ENV[" (Ruby), os.Getenv(" (Go), env::var(" (Rust), System.getenv(" (Java) and Environment.GetEnvironmentVariable(" (C#). Hover a variable to see its value and which files set it, and Go to Definition (F12) jumps to the line in .env.
  • Keeps secrets out of git. If a .env file with secret values isn't in .gitignore, you're warned with a one-click fix. If it's already committed, you're told how to remove it from git. Files without secrets, like a committed .env.development, are left alone.
  • 1Password references. Put op://vault/item/field in your .env instead of the secret and Nifty Env resolves it with the 1Password CLI when loading, so secrets never sit in files on disk. Turn on nifty.env.resolve1Password. If a reference can't be read, you're told which one and why.

Commands

Command What it does
Nifty Env: Select .env Profile… Switch profile (also in the status bar)
Nifty Env: Reload .env Files Reload now (files are also watched)
Nifty Env: Show Loaded Variables See what's loaded; pick one to copy its value
Nifty Env: Create .env.example from This File Write .env.example without secret values
Nifty Env: Show/Hide Secret Values Toggle blurring
Nifty Env: Check .env Files Are Ignored by Git Check now that every .env file with secrets is in .gitignore

Settings

Setting Default What it does
nifty.env.files .env, .env.local, .env.${profile}, .env.${profile}.local Files to load, later ones win
nifty.env.loadIntoTerminals true Add variables to new terminals and tasks
nifty.env.loadIntoDebug true Add variables to debug sessions
nifty.env.mask secrets Blur secrets, all values, or off
nifty.env.checkAgainstExample true Point out keys missing compared to .env.example
nifty.env.exampleKeepsSafeValues true Keep non-secret values in a generated .env.example
nifty.env.showInStatusBar true Show the active profile
nifty.env.resolve1Password false Resolve op:// references with the 1Password CLI
nifty.env.opPath Path to the 1Password CLI, if op isn't on your PATH
nifty.env.codeIntelliSense true Complete, hover and go to variables in code
nifty.env.checkGitignore true Warn when a .env file with secrets isn't ignored by git

Terminals that were already open keep their old environment; VS Code shows a relaunch indicator on them when the variables change.

Install

  • VS Code: search for "Nifty Env" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry and needs no account.

More Nifty tools

  • Nifty Bash Debugger: Breakpoints & Step Through Scripts: Debug Bash scripts without bashdb: breakpoints, conditions, logpoints, stepping, call stack, variables and arrays. Works with bash 4.2 to 5.2+ and Git Bash on Windows. (Open VSX)
  • Nifty Run: npm Scripts, Make & Task Runner: Everything you can run in one view: npm, pnpm and yarn scripts, make and just targets, Python and Go entry points, .NET, Cargo and Docker Compose. Run, debug or save to tasks.json. (Open VSX)
  • Nifty Code Runner: Run Code in 25+ Languages: Run the current file or selection in 25+ languages in the terminal, with input support, your own commands and no telemetry. (Open VSX)
  • Nifty Launch: launch.json Generator & Checker: Add debug configurations for what's in your project (npm scripts, tests, Python, Django, FastAPI, Go, .NET, Rust, browsers), build compounds, and catch broken launch.json references. (Open VSX)
  • Nifty .NET Explorer: Solution & Test Explorer: A solution explorer and test explorer for .NET in VS Code, Cursor, Windsurf and VSCodium: projects, references and files from .sln/.slnx, and xUnit, NUnit and MSTest tests in the Testing view. (Open VSX)
  • Nifty Actions: Workflow Checks, SHA Pinning & act: GitHub Actions workflows without sign-in: completion and go to definition for local and reusable actions, actionlint checks, pin actions to commit SHAs, and run jobs locally with act. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft