Creating Environments
Create named environments to organize your variables:Open Environment Manager
Click the New Environment button in the Environments tab of the sidebar, or run LiteClient: New Environment from the Command Palette.
Variable Structure
Environment variables use a structured format with multiple properties:- Name - The variable identifier used in
{{variableName}}syntax - Initial Value - The default value stored in your environment file
- Current Value - Optional workspace-local override (never committed to Git)
- Type - Either
defaultorsecret(secrets are masked in the UI) - Enabled - Toggle to enable/disable individual variables
Current values are stored in VS Code’s workspace state and override initial values during request execution. This lets you test with different values without modifying your saved environment.
Global Variables
Global variables are available across all environments and collections. Use them for values that remain constant regardless of environment:- API version numbers
- Common headers
- Organization IDs
- Default timeouts
- Create Global Variable
- Use Global Variable
- Open the Globals environment in the sidebar
- Click Add Variable
- Enter name and initial value
- The variable is immediately available in all requests
Variable Resolution
LiteClient resolves variables using a layered precedence system. Variables from narrower scopes override broader scopes: Resolution Order:- Environment variables (highest priority)
- Collection variables
- Global variables (lowest priority)
Only enabled variables are resolved. Disabled variables are skipped during resolution.
Resolution Example
If you have:- Global variable:
baseUrl = https://api.example.com - Environment variable:
baseUrl = http://localhost:3000
{{baseUrl}} resolves to http://localhost:3000.
Using Variables
Variables work everywhere in your requests:URL
Headers
Request Body
Authentication
Use variables in API Key, Bearer Token, Basic Auth, and OAuth 2.0 configurations.Variable Autocomplete
Type{{ in any input field to trigger autocomplete. You’ll see all available variables from globals, collections, and the active environment:
Switching Environments
Quickly switch between environments via the sidebar:- Click the environment dropdown in the Environments tab
- Select your target environment
- All requests immediately use the new environment’s variables
The active environment applies to all open request tabs. You don’t need to reload or reconfigure anything.
Environment Manager
Open the full Environment Manager panel for advanced editing:- Via Command Palette
Run LiteClient: Manage Environments to open the manager in a dedicated panel.
- Table view of all variables
- Inline editing of name, initial value, current value, type, and enabled state
- Bulk operations on multiple variables
- Password-style input for secret variables
Secret Variables
Protect sensitive values by marking variables assecret:
- Secret values display as
••••••••in the sidebar and autocomplete - Current value inputs use password fields
- Secret variables are still stored in plaintext in environment files
Current Value Overrides
Set workspace-local current values that override initial values without modifying your environment file:Set Current Value
Right-click a variable in the sidebar and select Set Current Value. Enter the override value.
Legacy Format Migration
Environments using the legacy key-value format are automatically migrated to the new structured format when loaded. Your existing environments will continue to work seamlessly.Best Practices
Create environment-specific variables
Create environment-specific variables
Define variables that change between environments:
baseUrl, apiKey, databaseUrl. Keep constants in global variables.Use consistent variable names
Use consistent variable names
Use the same variable names across all environments (e.g.,
baseUrl in Local, Staging, and Production). This ensures requests work in any environment.Leverage secret types
Leverage secret types
Mark API keys, tokens, and passwords as secret to prevent accidental exposure in screenshots or screen shares.
Use current values for testing
Use current values for testing
Test with temporary credentials using current values instead of modifying initial values. This prevents accidental commits of test credentials.