Skip to main content
The ls-vars command displays all environment variables that Vale recognizes, along with their descriptions and current values.

Usage

vale ls-vars
By default, the command outputs a formatted table. Use --output=JSON for machine-readable output.

Default Output

The command displays a table with all supported environment variables:
Variable           Description                                                      Value
VALE_CONFIG_PATH   Override the default search process by specifying a .vale.ini file.  ✗
VALE_STYLES_PATH   Specify the location of the default StylesPath.                     ✗
A red X (✗) indicates the variable is not set. If set, the actual value is displayed.

Supported Variables

VALE_CONFIG_PATH
string
Override configuration file locationWhen set, Vale uses this file instead of searching for .vale.ini in the current directory and parent directories.
export VALE_CONFIG_PATH=/path/to/.vale.ini
vale myfile.md
This is useful for:
  • 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.
VALE_STYLES_PATH
string
Override default styles directorySpecifies the location where Vale looks for style packages when no project-specific StylesPath is configured.
export VALE_STYLES_PATH=/custom/styles
vale myfile.md
This is useful for:
  • 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:
vale --output=JSON ls-vars
Output:
{
  "VALE_CONFIG_PATH": "",
  "VALE_STYLES_PATH": "/custom/styles/path"
}
In JSON output, unset variables have empty string values ("").

Use Cases

Check Current Settings

Verify which environment variables are affecting Vale’s behavior:
vale ls-vars
If you see unexpected behavior, check if an environment variable is overriding your configuration.

CI/CD Configuration

Set environment variables in CI pipelines for consistent behavior:
GitHub Actions
env:
  VALE_STYLES_PATH: ${{ github.workspace }}/.vale-styles
  VALE_CONFIG_PATH: ${{ github.workspace }}/.vale-ci.ini

steps:
  - name: Check environment
    run: vale ls-vars
  
  - name: Run Vale
    run: vale .

Verify Configuration Source

When debugging configuration issues, check if environment variables are set:
vale ls-vars
vale ls-config | jq '{RootINI, Paths}'
This shows both the environment variable values and the actual configuration Vale loaded.

Script Configuration

In shell scripts, check and set variables as needed:
#!/bin/bash

# Check current settings
echo "Current Vale environment:"
vale ls-vars

# Set temporary configuration
export VALE_CONFIG_PATH="$(pwd)/.vale-strict.ini"
export VALE_STYLES_PATH="$(pwd)/custom-styles"

echo "\nUpdated Vale environment:"
vale ls-vars

# Run Vale with custom settings
vale docs/

Examples

vale ls-vars

Setting Environment Variables

Temporary (current session):
export VALE_CONFIG_PATH=/path/to/.vale.ini
export VALE_STYLES_PATH=/path/to/styles
Permanent (add to ~/.bashrc or ~/.zshrc):
echo 'export VALE_STYLES_PATH="$HOME/.vale/styles"' >> ~/.bashrc
source ~/.bashrc

Precedence Order

When Vale determines configuration and styles locations, it follows this precedence (highest to lowest):
1

Command-line flags

The --config flag takes precedence over all other methods:
vale --config=/path/.vale.ini myfile.md
2

Environment variables

VALE_CONFIG_PATH and VALE_STYLES_PATH are checked next:
export VALE_CONFIG_PATH=/path/.vale.ini
3

Project configuration

Vale searches for .vale.ini in current directory and parents.
4

Global configuration

The global config file from ~/.config/vale/.vale.ini (or platform equivalent) is used if no project config is found.
5

Default values

Built-in defaults are used as a last resort.

Common Patterns

Shared Team Configuration

Use environment variables to standardize Vale across a team:
.envrc (direnv)
export VALE_STYLES_PATH="$PWD/.vale-styles"
export VALE_CONFIG_PATH="$PWD/.vale.ini"
With direnv, these variables are automatically set when entering the directory.

Multiple Configuration Profiles

Switch between different Vale configurations:
# Strict checking
alias vale-strict='VALE_CONFIG_PATH=~/.vale-strict.ini vale'

# Relaxed checking
alias vale-relaxed='VALE_CONFIG_PATH=~/.vale-relaxed.ini vale'

# Use them
vale-strict docs/
vale-relaxed blog/

Container Environments

Set variables in Docker or container configurations:
Dockerfile
ENV VALE_STYLES_PATH=/vale/styles
ENV VALE_CONFIG_PATH=/vale/.vale.ini

COPY styles/ /vale/styles/
COPY .vale.ini /vale/.vale.ini

CI/CD Matrix Testing

Test with different configurations in CI:
GitHub Actions
strategy:
  matrix:
    config:
      - { name: "strict", path: ".vale-strict.ini" }
      - { name: "standard", path: ".vale.ini" }
      - { name: "relaxed", path: ".vale-relaxed.ini" }

steps:
  - name: Run Vale (${{ matrix.config.name }})
    env:
      VALE_CONFIG_PATH: ${{ matrix.config.path }}
    run: |
      vale ls-vars
      vale docs/

Troubleshooting

Variable Not Taking Effect

If setting a variable doesn’t change Vale’s behavior:
  1. Verify the variable is actually set:
    vale ls-vars
    
  2. Check that you exported it (not just set it):
    # Wrong (variable not exported)
    VALE_CONFIG_PATH=/path/to/config
    
    # Correct
    export VALE_CONFIG_PATH=/path/to/config
    
  3. Check if command-line flags are overriding it:
    vale ls-config | jq '.RootINI'
    

Finding Active Configuration

To see which configuration Vale actually loaded:
vale ls-vars
vale ls-config | jq '{RootINI, Paths, ConfigFiles}'
This shows both environment variables and the resulting configuration.
  • ls-dirs - View default directory locations
  • ls-config - View loaded configuration
  • Overview - See all command-line flags

Build docs developers (and LLMs) love