varsvars

Editor Integration

VS Code extension with syntax highlighting, diagnostics, autocomplete, and more for .vars files.

VS Code / Cursor

The vars extension adds language support for .vars files. Install it from the VS Code Marketplace or search for "vars" in the Extensions panel.

Works in VS Code, Cursor, and any editor that supports VS Code extensions.

Features

Syntax highlighting for variable names, Zod schemas, environment blocks, encrypted values, check blocks, groups, and metadata.

Real-time diagnostics. Parse errors, expired secrets, deprecation warnings, and undeclared environment usage show up as you type.

Autocomplete for top-level keywords (env, param, use, group, public, check), Zod schema methods, metadata keys, environment names, and check block functions.

Hover information. Hover over a variable to see its schema, visibility (public/secret), and metadata (description, owner, expires, tags).

Go to Definition. Jump to variable declarations and imported files.

Code Actions. Quick fixes for common issues.

Commands

The extension adds three commands, accessible via the Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

CommandDescription
vars: Decrypt Values (Show)Decrypt and show secret values in the editor
vars: Encrypt Values (Hide)Encrypt values before committing
vars: Toggle EncryptionToggle between encrypted and decrypted views

When viewing a .vars file, an eye icon appears in the editor title bar for quick toggling.

Settings

SettingDefaultDescription
vars.trace.serveroffTrace communication between VS Code and the language server (off, messages, verbose)

No extra dependencies

The extension bundles the vars language server. No global CLI install is required for editor features.