Overview
Vale CLI is an open source, command-line tool that reports on writing style issues found in text files. It does not provide suggestions for fixing the issues.
Installing
To install Vale in macOS:
-
Enter
brew install vale. -
Create a configuration file named
.vale.iniin your home directory containing settings like the following:StylesPath = vale-styles MinAlertLevel = suggestion Packages = Microsoft, proselint, write-good # Only process AsciiDoc, Markdown, and plain text files. [*.{adoc,md,txt}] BasedOnStyles = Vale, Microsoft, proselint, write-good Microsoft.Contractions = off Microsoft.HeadingAcronyms = off Microsoft.HeadingPunctuation = off Microsoft.Headings = off Microsoft.Quotes = off [*] BasedOnStyles = Empty -
Enter the command
vale syncto download each of the packages listed in the config file. -
Create the empty directory
~/vale-styles/Empty. -
Set the environment variable
VALE_CONFIG_PATHto point to the.vale.inifile. For example, add the following in.zshenv:export VALE_CONFIG_PATH=$HOME/.vale.ini
Running
- Open a terminal window.
cdto the directory of a file to check.- Enter the command
vale {file-name}.
VS Code
Install the Vale VSCode extension from Chris Chinchilla. This causes VS Code to flag writing style issues.
In settings, set “Vale > Vale CLI: Config” to “/Users/{your-username}/.vale.ini”.