# Global options

> Global options for the Fern CLI

These options work with any Fern CLI command to control logging and get help.

| Option                      | Description                   | Example                           |
| --------------------------- | ----------------------------- | --------------------------------- |
| [`--help`](#help)           | Show command help and options | `fern --help`                     |
| [`--log-level`](#log-level) | Set logging verbosity         | `fern generate --log-level debug` |

<Tip>
  Use `--log-level debug` to see detailed output when troubleshooting issues.
</Tip>

## help

Use the `--help` option with any Fern CLI command to see an explanation and available options.

<CodeBlocks>
  ```bash maxLines=10 title="fern add --help"
  fern add --help
  fern add <generator>

  Add a code generator to generators.yml

  Positionals:
    generator                                                [string] [required]

  Options:
    --help     Show help                                               [boolean]
    --log-level    [choices: "debug", "info", "warn", "error"] [default: "info"]
    --api      Only run the command on the provided API                 [string]
    --group    Add the generator to the specified group                 [string]
  ```

  ```bash maxLines=10 title="fern write-definition --help"
  fern write-definition --help
  fern write-definition

  Write underlying Fern Definition for OpenAPI Specifications and API Dependencies.

  Options:
    --help     Show help                                               [boolean]
    --log-level    [choices: "debug", "info", "warn", "error"] [default: "info"]
    --api      Only run the command on the provided API                 [string]
  ```
</CodeBlocks>

## log-level

Use the `--log-level` option to set the verbosity of Fern's logging output. The default level is `info`.

Available levels (from most to least verbose):

* `debug`: Debug messages, informational messages, warnings, and errors
* `info`: Informational messages, warnings, and errors
* `warn`: Warnings and errors only
* `error`: Error messages only

```bash
fern generate --log-level debug
```