Cover image for Hide Your Secrets in VS Code
Microsoft Azure

Hide Your Secrets in VS Code

john_papa profile image John Papa Originally published at johnpapa.net ・2 min read

Have you ever wanted to hide your secrets in environment files? Cloak for VS Code helps you avoid accidentally sharing them with everyone who sees your screen.


Alpha Release

I just released Cloak v0.0.2 over the weekend!

What Can it Do?

Great question! You can check out the full documentation here. But here is a quick glimpse of the main features.

  • Hide secrets in environment files
  • Show the secrets again
  • Toggle them on and off (with a keybinding or a command)
  • Optionally hide environment file comments (defaults to showing them)

Get Cloak

If you are interested in trying out Cloak, you can find it here in the marketplace.

or from VS Code 👇

  1. Open Extensions sideBar panel in Visual Studio Code and choose the menu options for View → Extensions
  2. Search for Cloak
  3. Click Install
  4. Click Reload, if required

Quick Usage

Let's see Cloak in action!

  1. Open a .env file
  2. Press F1 to open the command palette
  3. Type Cloak
  4. Choose Cloak: Hide Secrets

Now enjoy exploring the rest of the features explained in the docs!


Contribute to GitHub repository here

cloak icon

What Else

One of the key aspects I want before releasing v1 is to have a lot of unit tests in place, and to have it hooked into CI. I decided to use Azure DevOps with their YAML option. Once it is up and running, I'll write more about how this works on Azure DevOps in future posts.



Inspiration comes in many forms. These folks and teams have contributed either through ideas, issues, pull requests, or guidance. Thank you!


Posted on by:

john_papa profile

John Papa


Husband, father, & Catholic enjoying life with my family. Working @ Microsoft. Disney fanatic, web and mobile developer

Microsoft Azure

Any language. Any platform.


markdown guide

This is really useful for people streaming their coding sessions on twitch for example. Good work 👍


As someone who saw both creds and CC numbers leaked on screensharing sessions, i think its great :) I just wish it could cloak also other files, a lot of systems (including the one im working with) use different file than .env for storing credentials.


Imagine being this paranoid /s


thank you, this will be very useful! 👍