ls-vars command displays all environment variables that Vale recognizes, along with their descriptions and current values.
Usage
--output=JSON for machine-readable output.
Default Output
The command displays a table with all supported environment variables:A red X (✗) indicates the variable is not set. If set, the actual value is displayed.
Supported Variables
Override configuration file locationWhen set, Vale uses this file instead of searching for This is useful for:
.vale.ini in the current directory and parent directories.- Enforcing a specific configuration across all projects
- CI/CD pipelines that need consistent configuration
- Testing different configurations without changing project files
The
--config command-line flag takes precedence over VALE_CONFIG_PATH.Override default styles directorySpecifies the location where Vale looks for style packages when no project-specific This is useful for:
StylesPath is configured.- Sharing styles across multiple projects
- Centralizing style management in organizations
- Using a network-mounted styles directory
The
StylesPath setting in .vale.ini takes precedence over VALE_STYLES_PATH.JSON Output
For programmatic access, use JSON output:In JSON output, unset variables have empty string values (
"").Use Cases
Check Current Settings
Verify which environment variables are affecting Vale’s behavior:CI/CD Configuration
Set environment variables in CI pipelines for consistent behavior:GitHub Actions
Verify Configuration Source
When debugging configuration issues, check if environment variables are set:Script Configuration
In shell scripts, check and set variables as needed:Examples
Setting Environment Variables
- Bash/Zsh
- Fish
- Windows (PowerShell)
- Windows (CMD)
Temporary (current session):Permanent (add to ~/.bashrc or ~/.zshrc):
Precedence Order
When Vale determines configuration and styles locations, it follows this precedence (highest to lowest):Global configuration
The global config file from
~/.config/vale/.vale.ini (or platform equivalent) is used if no project config is found.Common Patterns
Shared Team Configuration
Use environment variables to standardize Vale across a team:.envrc (direnv)
Multiple Configuration Profiles
Switch between different Vale configurations:Container Environments
Set variables in Docker or container configurations:Dockerfile
CI/CD Matrix Testing
Test with different configurations in CI:GitHub Actions
Troubleshooting
Variable Not Taking Effect
If setting a variable doesn’t change Vale’s behavior:-
Verify the variable is actually set:
-
Check that you exported it (not just set it):
-
Check if command-line flags are overriding it: