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

|
4 installs
| (0) | Free
Load .env files into terminals, tasks and debug sessions, switch between .env profiles, hide secret values on screen, and check .env against .env.example.
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 between .env profiles, hide secret values on screen, and check .env against .env.example.

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.
  • 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

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

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 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 C# Scratchpad: Run C# Snippets & NuGet: Run C# snippets instantly with NuGet packages and rich Dump() output, a LINQPad-style scratchpad and Polyglot Notebooks replacement. (Open VSX)
  • Nifty C# Templates: New Class, Record & Namespace: New C# class, interface, record, enum, test and controller files with the right namespace, plus namespace syncing. (Open VSX)
  • Nifty Docstrings: Doc Comments for Python, PHP, Rust and Go: Type three quotes under a Python function and get a Google, NumPy or Sphinx docstring with its arguments, types, returns and raises. PHPDoc, Rust and Go doc comments too. (Open VSX)

See all 42 Nifty tools at https://getnifty.dev

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