Skip to main content
Environments let you manage different configurations for local development, staging, and production without changing your requests. You can define variables, switch between environments instantly, and maintain separate settings for each context.

Creating Environments

Create named environments to organize your variables:
1

Open Environment Manager

Click the New Environment button in the Environments tab of the sidebar, or run LiteClient: New Environment from the Command Palette.
2

Name Your Environment

Choose a descriptive name like “Local”, “Staging”, or “Production”.
3

Add Variables

Define variables specific to this environment (e.g., baseUrl, apiKey).

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 default or secret (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
  1. Open the Globals environment in the sidebar
  2. Click Add Variable
  3. Enter name and initial value
  4. 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:
  1. Environment variables (highest priority)
  2. Collection variables
  3. 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
When you select that environment, {{baseUrl}} resolves to http://localhost:3000.

Using Variables

Variables work everywhere in your requests:

URL

{{baseUrl}}/api/users/{{userId}}

Headers

Authorization: Bearer {{authToken}}
X-API-Key: {{apiKey}}

Request Body

{
  "apiKey": "{{apiKey}}",
  "environment": "{{env}}"
}

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:
1

Trigger Autocomplete

Type {{ in the URL bar, header value, or body editor.
2

Navigate Options

Use arrow keys to navigate through available variables.
3

Select Variable

Press Enter to insert the selected variable.
Autocomplete shows the current value of each variable, making it easy to verify you’re using the right one.

Switching Environments

Quickly switch between environments via the sidebar:
  1. Click the environment dropdown in the Environments tab
  2. Select your target environment
  3. 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:
Run LiteClient: Manage Environments to open the manager in a dedicated panel.
The Environment Manager provides:
  • 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 as secret:
  • 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
Secret variables provide UI masking but are not encrypted in storage. Never commit sensitive credentials to version control. Use current values for local testing instead.

Current Value Overrides

Set workspace-local current values that override initial values without modifying your environment file:
1

Set Current Value

Right-click a variable in the sidebar and select Set Current Value. Enter the override value.
2

Use in Requests

Requests automatically use the current value when present.
3

Clear Override

Right-click the variable and select Clear Current Value to revert to the initial value.
Current values are perfect for testing with temporary API keys or local database URLs without polluting your shared environment files.

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

Define variables that change between environments: baseUrl, apiKey, databaseUrl. Keep constants in global variables.
Use the same variable names across all environments (e.g., baseUrl in Local, Staging, and Production). This ensures requests work in any environment.
Mark API keys, tokens, and passwords as secret to prevent accidental exposure in screenshots or screen shares.
Test with temporary credentials using current values instead of modifying initial values. This prevents accidental commits of test credentials.