> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enver-os.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# VS Code Extension

> Integrate Enver directly into your editor with CLI parity and real-time environment variable leakage detection.

# Enver for VS Code

The **Enver VS Code Extension** brings Enver's zero-knowledge secrets management directly into your development workflow, with the added benefit of real-time security scanning.

## Features

* 🔐 **Direct CLI Parity**: Execute `login`, `init`, `push`, and `pull` operations right from the Command Palette (`Cmd+Shift+P`).
* 🛡️ **Leakage Shield**: Real-time background scanning that detects hardcoded secrets in your codebase before they get committed to Git.
* ⚡ **Shared Configuration**: Uses the same `~/.enver/config.json` session as the CLI. Log in once, and you are ready in both tools.

***

## Installation

### From VSIX Package

1. Download the latest `.vsix` release from the repository or build it locally.
2. In VS Code, open the Extensions view (`Cmd+Shift+X`).
3. Click the **···** (Views and More Actions) menu in the top right.
4. Select **Install from VSIX...** and choose your `enver-vscode-1.0.0.vsix` file.

***

## Available Commands

Press `Cmd+Shift+P` (or `Ctrl+Shift+P` on Windows/Linux) and search for `Enver`:

| Command                               | Description                                                                      |
| ------------------------------------- | -------------------------------------------------------------------------------- |
| **Enver: Log In**                     | Authenticates your session with an `env_live_...` API token.                     |
| **Enver: Initialize Project**         | Creates a `.ev.json` configuration in the active workspace root.                 |
| **Enver: Pull Environment Variables** | Prompts for your lock key, decrypts remote secrets, and merges them into `.env`. |
| **Enver: Push Environment Variables** | Encrypts your workspace `.env` and uploads shares to the Enver server.           |
| **Enver: Scan Workspace for Leaks**   | Runs a manual scan across all source files for hardcoded secrets.                |

***

## Real-Time Leakage Shield

As you write code or open files, Enver automatically inspects text buffers for sensitive tokens and credentials:

* Enver API keys (`env_live_...`)
* AWS Access Keys (`AKIA...`)
* Stripe Secret Keys (`sk_live_...`)
* GitHub Personal Access Tokens (`ghp_...`)
* Slack Tokens (`xoxb-...`, `xoxp-...`)
* Discord Webhook URLs
* Hardcoded literals assigned to sensitive variable names (e.g., `const API_KEY = "..."`)

Detected leakages are immediately surfaced as warnings in the **Problems** tab and highlighted inline in your editor.

```typescript theme={null}
// ⚠️ Enver Leakage Shield: Potential secret leakage detected.
const AWS_ACCESS_KEY = "AKIAIOSFODNN7EXAMPLE"; 
```

***

## Configuration Settings

You can customize the extension via VS Code settings (`Cmd+,`):

| Setting        | Default                                   | Description             |
| -------------- | ----------------------------------------- | ----------------------- |
| `enver.apiUrl` | `https://api-staging.enver-os.xyz/api/v1` | Custom backend API URL. |
