A VS Code extension for transparent encryption and decryption of files using the SSS (Secret String Substitution) tool.
- Transparent Encryption/Decryption: Automatically decrypt files when opening and encrypt when saving
- Auto-Seal on Save: Automatically encrypt plaintext markers when saving files
- Auto-Open on Load: Automatically decrypt encrypted markers when opening files
- Visual Indicators: Status bar shows encryption status of current file
- Initialize new SSS projects
- View project information
- Install Git hooks for automatic sealing on commit
- Add users to projects
- Remove users from projects
- List all project users
- Generate new keypairs
- List available keypairs
- Set current keypair
- View and share public keys
- VS Code 1.85.0 or higher
- SSS tool installed and available in PATH (or configured in settings)
- Git (for hook installation)
- Download the
.vsixfile - Open VS Code
- Go to Extensions view (Ctrl+Shift+X)
- Click the "..." menu at the top
- Select "Install from VSIX..."
- Select the downloaded file
- Clone this repository
- Run
npm install - Run
npm run compile - Press F5 to open a new VS Code window with the extension loaded
- Open a folder in VS Code
- Run command: SSS: Initialize Project
- Enter your username when prompted
- Optionally install Git hooks when prompted
- Seal File (Encrypt): Right-click file > SSS: Seal File
- Open File (Decrypt to Markers): Right-click file > SSS: Open File
- Render File (Show Plaintext): Right-click file > SSS: Render File
- Seal All Files: Command Palette > SSS: Seal All Files in Workspace
- Open All Files: Command Palette > SSS: Open All Files in Workspace
By default, the extension will:
- Automatically decrypt encrypted files when you open them
- Automatically encrypt plaintext markers when you save files
You can toggle these behaviors in settings or with the command:
- SSS: Toggle Auto-Seal on Save
-
Add User:
- Command Palette > SSS: Add User to Project
- Enter username and public key
-
Remove User:
- Command Palette > SSS: Remove User from Project
- Select user from list
-
List Users:
- Command Palette > SSS: List Project Users
-
Generate Key:
- Command Palette > SSS: Generate New Keypair
- Choose password protection option
-
List Keys:
- Command Palette > SSS: List Keypairs
-
Set Current Key:
- Command Palette > SSS: Set Current Keypair
- Select from available keys
-
Show Public Key:
- Command Palette > SSS: Show Public Key
- Optionally copy to clipboard
Install Git hooks to automatically seal files before committing:
- Command Palette > SSS: Install Git Hooks
Access settings via: File > Preferences > Settings > Extensions > SSS
-
sss.autoSealOnSave(default:true)- Automatically seal (encrypt) files when saving
-
sss.autoOpenOnLoad(default:true)- Automatically open (decrypt) files when loading in editor
-
sss.showStatusBar(default:true)- Show SSS status in status bar
-
sss.warnBeforeCommit(default:true)- Warn if attempting to commit unsealed files
-
sss.highlightMarkers(default:true)- Highlight SSS markers in editor
-
sss.sssPath(default:"sss")- Path to SSS binary (defaults to 'sss' in PATH)
-
sss.verboseLogging(default:false)- Enable verbose logging for debugging
When in an SSS project, the status bar shows:
- Lock icon (π) for encrypted files
- Unlock icon (π) for files with plaintext markers
- Current key UUID (first 8 characters)
Click the status bar item to view project information.
The extension recognizes these SSS markers:
β{plaintext}- Plaintext marker (will be encrypted)o+{plaintext}- Alternative plaintext marker<{plaintext}- Left-angle markerβ²{plaintext}- Triangle marker (preserved as-is)β {ciphertext}- Encrypted marker (result of sealing)
-
Create a file with secrets:
API_KEY=β{my-secret-key} DB_PASSWORD=β{super-secret-password} -
Save the file (auto-seal encrypts it):
API_KEY=β {oD5Ouv4S18BCXetqWgl2ZFlyN2P0DcOAbRca...} DB_PASSWORD=β {kL3Pmw6T29CDYfurXhm3AGmzO3Q1EdPBcSdb...} -
Commit the file (encrypted markers are safe in Git)
-
Open the file later (auto-open decrypts it):
API_KEY=β{my-secret-key} DB_PASSWORD=β{super-secret-password}
- Check that SSS is installed:
sss --version - Check the extension output: View > Output > SSS
- Enable verbose logging in settings
- Verify you're in an SSS project:
sss status
- Check settings are enabled
- Verify file contains SSS markers
- Check output panel for errors
- Try manual seal/open to see error messages
- Verify you're in an SSS project (
.sss.tomlexists) - Reload VS Code window
- Check that workspace folder is open
npm install
npm run compilenpm run testnpm run packageThis creates a .vsix file that can be distributed and installed.
Please report issues and feature requests on the project repository.
See LICENSE file for details.