Skip to content

Usage

Using the CLI

At its core, Vale is designed to be used as a command-line tool. The available commands and options are discussed below.

  • dc / dump-config:

    $ vale dc
    ...
    

    The dump-config command prints Vale's configuration, as read from its .vale.ini file, to stdout.

  • new:

    $ vale new existence
    ...
    

    The new command generates an example implementation for the given extension point.

  • -h / --help:

    $ vale -h
    ...
    

    The --help option prints Vale's CLI usage information to stdout.

  • --glob:

    # Only search `.md` and `.rst` files
    $ vale --glob='*.{md,rst}' directory
    

    The --glob option specifies the type of files Vale will search. It accepts the standard GNU/Linux syntax. Additionally, any pattern prefixed with an ! will be negated. For example,

    # Exclude `.txt` files
    $ vale --glob='!*.txt' directory
    

    This option takes precedence over any patterns defined in a configuration file.

  • --config:

    $ vale --config='some/file/path/.vale.ini'
    

    The --config option specifies the location of a configuration file. This will take precedence over the default search process.

  • --output:

    # "line", "JSON", or "CLI" (the default)
    $ vale --output=JSON directory
    

    The --output option specifies the format that Vale will use to report its alerts.

  • --ext:

    $ vale --ext='.md' '# this is a heading'
    

    The --ext option allows you to assign a format (e.g., .md) to text passed via stdin (which will default to .txt).

  • --no-wrap:

    $ vale --no-wrap directory
    

    The --no-wrap option disables word wrapping when using the CLI output format. By default, CLI output will be wrapped to fit your console.

  • --no-exit:

    $ vale --no-exit directory
    

    The --no-exit option instructs Vale to always return an exit code of 0, even if errors were found. This is useful if you don't want CI builds to fail on Vale-related errors.

  • --sort:

    $ vale --sort directory
    

    The --sort option instructs Vale to sort its output by file path. For large directories, this can have a noticeable negative impact on performance.

  • --ignore-syntax:

    $ vale --ignore-syntax directory
    

    The --ignore-syntax option will cause Vale to parse all files as plain text. Note, though, that this doesn't change what files Vale will search.

    This will often boost performance significantly, but only text-scoped rules will work.

  • -v / --version:

    $ vale -v
    ...
    

    The --version option prints Vale's version.

Editor Integration

Atom Logo Sublime Text Logo Vim Logo Emacs Logo VS Code Logo