Skip to content
vscodetypescriptprivacysecurity

camouflage

A VS Code extension that hides the values in .env, JSON, YAML, TOML and other config files, so they don't show when you share your screen, record or take a screenshot.

since March 202540TypeScriptpushed 5 months ago

camouflage

Camouflage hides the values in configuration files inside VS Code and leaves the keys where they are, so you can share your screen, record or take a screenshot without an .env file giving its secrets away. camouflage.nvim does the same for Neovim.

It reads .env files (and .env.*, *.env, .envrc), shell scripts, JSON, YAML, .properties, .ini, .conf and TOML. In JSON and YAML it follows nested keys like database.password, and in TOML the sections. Multi-line values are hidden too: YAML block scalars, TOML triple-quoted strings, .env line continuations and PEM keys.

Install

Open VS Code, press Cmd+P (Ctrl+P on Windows and Linux) and run:

ext install zeybek.camouflage

It needs VS Code 1.96 or newer, and it's on the Marketplace.

Using it

Values are hidden as soon as you open a supported file. The status bar says whether Camouflage is on, off or selective, and clicking it turns hiding on and off. Right-click in the editor for the Camouflage menu: reveal one value, exclude a key, switch to selective mode, where only the keys matching your patterns are hidden, or stop hiding in the current file.

The hidden text is ************************ by default. It can also be dots, stars, a shuffle of the real characters, or a pattern of your own like ###, and hovering can preview a value if you turn that on. It's written in TypeScript, under the MIT licence.

latest on main

  1. 47f3d02chore(release): 1.4.0 [skip ci]5 months ago
  2. 5977d15feat(parsers): mask escaped, multi-line, numeric and array values (#18)5 months ago
  3. 91d0c95chore(release): 1.3.1 [skip ci]7 months ago
  4. ca77f7efix(parsers): hide all duplicate key occurrences in JSON (#17)7 months ago
  5. 5627e21chore(release): 1.3.0 [skip ci]10 months ago
  6. cbd8623feat(core): add double-click to edit secret via InputBox (#15)10 months ago
  7. all commits →