# Command-Line Interface (CLI)

> Use HTMLHint from the command line to lint your HTML files. There are several options available to customize the behavior of the linter.

You can use HTMLHint on the command-line. For example:

```shell
npx htmlhint index.html
```

Use `npx htmlhint --help` to print the CLI documentation.

## Options

[Section titled “Options”](#options)

In addition to the [standard options](/usage/options/), the CLI accepts:

### `--color, --no-color`

[Section titled “--color, --no-color”](#--color---no-color)

Force enabling/disabling of color.

### `--init`

[Section titled “--init”](#--init)

Create a new HTMLHint configuration file (`.htmlhintrc`) in the current directory with default rules. If a configuration file already exists, this command will exit successfully without making changes.

```shell
npx htmlhint --init
```

### `--list, -l`

[Section titled “--list, -l”](#--list--l)

Show all the rules available

### `--rules, -r`

[Section titled “--rules, -r”](#--rules--r)

Set all of the rules available

### `--rulesdir, -R`

[Section titled “--rulesdir, -R”](#--rulesdir--r)

Load custom rules from file or folder. See the [custom rules documentation](/usage/custom-rules/) for detailed information on creating and using custom rules.

```shell