Skip to main content
Vale provides a powerful command-line interface for linting prose. The CLI includes several commands for different tasks, from linting files to managing configurations.

Basic Usage

The basic syntax for Vale is:
vale [options] [input...]

Input Methods

Vale accepts input in three ways:
vale myfile.md myfile2.md mydir/
Lint one or more files or directories.

Available Commands

Vale provides specialized commands for different operations:

sync

Download and install external configuration sources

ls-config

Print the current configuration to stdout

ls-metrics

Print file metrics to stdout

ls-dirs

Print default configuration directories

ls-vars

Print supported environment variables

fix

Attempt to automatically fix alerts

Global Options

These options work with any Vale command:
--config
string
Path to a configuration file.
vale --config='path/to/.vale.ini' myfile.md
--output
string
default:"CLI"
Output format: CLI, line, JSON, or a template file path.
vale --output=JSON myfile.md
--ext
string
default:".txt"
File extension to associate with stdin input.
echo "text" | vale --ext=.md
--path
string
File path to associate with stdin for configuration matching.
echo "text" | vale --path=docs/example.md
--glob
string
default:"*"
Glob pattern for filtering files.
vale --glob='*.{md,txt}' docs/
--minAlertLevel
string
Minimum alert level to display: suggestion, warning, or error.
vale --minAlertLevel=error myfile.md
--filter
string
Expression to filter which rules are applied.
vale --filter='*.Spelling' myfile.md
--no-wrap
boolean
default:"false"
Disable text wrapping in CLI output.
--no-exit
boolean
default:"false"
Don’t return a nonzero exit code on lint errors.
--ignore-syntax
boolean
default:"false"
Lint all files line-by-line, ignoring markup syntax.
--sort
boolean
default:"false"
Sort files alphabetically in output.
--normalize
boolean
default:"false"
Replace path separators with forward slashes.
--relative
boolean
default:"false"
Return relative file paths in output.
--no-global
boolean
default:"false"
Don’t load the global configuration file.
--sources
string
Specify additional configuration files to load.
vale --sources=custom.ini myfile.md
--mode-compat
boolean
default:"false"
Prioritize local Vale configurations over global ones.
-v, --version
boolean
Print Vale’s version number.
vale --version
-h, --help
boolean
Display help information.
vale --help

Exit Codes

Vale returns different exit codes based on the linting results:
Exit CodeMeaning
0No errors found (or --no-exit was used)
1Lint errors found at or above the minimum alert level
2Runtime error occurred (invalid config, file not found, etc.)

Examples

vale README.md
If you run vale without arguments and no stdin input, Vale displays introductory help information.

Build docs developers (and LLMs) love