Basic Usage
The basic syntax for Vale is:Input Methods
Vale accepts input in three ways:- Files and directories
- String input
- Standard input
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:Path to a configuration file.
Output format:
CLI, line, JSON, or a template file path.File extension to associate with stdin input.
File path to associate with stdin for configuration matching.
Glob pattern for filtering files.
Minimum alert level to display:
suggestion, warning, or error.Expression to filter which rules are applied.
Disable text wrapping in CLI output.
Don’t return a nonzero exit code on lint errors.
Lint all files line-by-line, ignoring markup syntax.
Sort files alphabetically in output.
Replace path separators with forward slashes.
Return relative file paths in output.
Don’t load the global configuration file.
Specify additional configuration files to load.
Prioritize local Vale configurations over global ones.
Print Vale’s version number.
Display help information.
Exit Codes
Vale returns different exit codes based on the linting results:| Exit Code | Meaning |
|---|---|
0 | No errors found (or --no-exit was used) |
1 | Lint errors found at or above the minimum alert level |
2 | Runtime error occurred (invalid config, file not found, etc.) |
Examples
If you run
vale without arguments and no stdin input, Vale displays introductory help information.