Supported Variables
Vale recognizes the following environment variables:Override the default configuration file search process by specifying an explicit path to a This takes precedence over the local search process but is overridden by the
.vale.ini file.--config flag.Specify the default location for the This is used as a fallback when:
StylesPath when no configuration file defines it.- No
.vale.inifile definesStylesPath - No configuration file is found
Configuration Search Process
Understanding how environment variables fit into Vale’s configuration search is important:- Command-line flag (
--config): Highest priority - VALE_CONFIG_PATH: Environment variable override
- Local search: Walk up directory tree for
.vale.ini - Home directory: Check
~/.vale.ini - Default config: Load from user config directory (if exists)
StylesPath specifically:
- Config file:
StylesPathin.vale.ini - VALE_STYLES_PATH: Environment variable fallback
- XDG default:
~/.local/share/vale/styles(Unix) or equivalent
Use Cases
CI/CD Pipelines
Set environment variables to use different configurations in CI:.vale.ini.
Shared Styles
Point multiple projects to a shared styles directory:.vale.ini can omit StylesPath and inherit the shared location.
Testing Configurations
Test different configurations without modifying files:Multi-Environment Setup
Use different configurations for different environments:Environment Variable Priority
When multiple configuration sources are present:StylesPath:
StylesPath is not set in any configuration file.
Shell Integration
Bash/Zsh
Add to your~/.bashrc or ~/.zshrc:
Fish
Add to your~/.config/fish/config.fish:
Windows PowerShell
Add to your profile ($PROFILE):
Docker Integration
Pass environment variables to Vale running in a container:Configuration Inspection
Verify which configuration Vale is using:ls-config output shows the merged configuration from all sources, including environment variables.
Example ls-config output with environment variables
Example ls-config output with environment variables
VALE_STYLES_PATH was used even though the config file didn’t specify it.Debugging Environment Issues
Check Variable Values
Verify Configuration Loading
Clear Environment Variables
Best Practices
Team Workflow Example
- Keeps project config in version control
- Shares team styles via environment variable
- Allows personal customization in global config
Advanced: Configuration Hierarchy
The complete configuration loading order:VALE_CONFIG_PATH, VALE_STYLES_PATH) affect steps 2 and 3.
See Also
- Configuration Overview - Complete config file reference
- CLI Commands - View supported environment variables
- Packages - Working with external configuration packages