DEV Community

Cover image for Hide Your Secrets in VS Code
John Papa for Microsoft Azure

Posted on • Originally published at johnpapa.net

Hide Your Secrets in VS Code

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.

Cloak

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

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.

Resources

Credits

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

Thanks!

Top comments (6)

Collapse
 
igeligel profile image
Kevin Peters

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

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

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.

Collapse
 
t0uchm3 profile image
T0uchm3

Imagine being this paranoid /s

Collapse
 
leob profile image
leob

Great idea!

Collapse
 
padakipavan profile image
padaki-pavan

Looks good! Good job.

Collapse
 
renesansz profile image
Rene Padillo 🇵🇭

thank you, this will be very useful! 👍