# Source: https://oxc.rs/docs/guide/usage/linter/generated-cli.md

# Source: https://oxc.rs/docs/guide/usage/formatter/generated-cli.md

---
url: /docs/guide/usage/formatter/generated-cli.md
---

## Usage

**`oxfmt`** \[**`-c`**=*`PATH`*] \[*`PATH`*]...

## Mode Options:

* **`    --init`** —
  Initialize `.oxfmtrc.json` with default values
* **`    --migrate`**=*`SOURCE`* —
  Migrate configuration to `.oxfmtrc.json` from specified source Available sources: prettier, biome
* **`    --lsp`** —
  Start language server protocol (LSP) server
* **`    --stdin-filepath`**=*`PATH`* —
  Specify the file name to use to infer which parser to use

## Output Options:

* **`    --write`** —
  Format and write files in place (default)
* **`    --check`** —
  Check if files are formatted, also show statistics
* **`    --list-different`** —
  List files that would be changed

## Config Options

* **`-c`**, **`--config`**=*`PATH`* —
  Path to the configuration file

## Ignore Options

* **`    --ignore-path`**=*`PATH`* —
  Path to ignore file(s). Can be specified multiple times. If not specified, .gitignore and .prettierignore in the current directory are used.
* **`    --with-node-modules`** —
  Format code in node\_modules directory (skipped by default)

## Runtime Options

* **`    --no-error-on-unmatched-pattern`** —
  Do not exit with error when pattern is unmatched
* **`    --threads`**=*`INT`* —
  Number of threads to use. Set to 1 for using only 1 CPU core.

## Available positional items:

* *`PATH`* —
  Single file, single path or list of paths. If not provided, current working directory is used. Glob is supported only for exclude patterns like `'!**/fixtures/*.js'`.

## Available options:

* **`-h`**, **`--help`** —
  Prints help information
* **`-V`**, **`--version`** —
  Prints version information