# Global options

Explore the options available to all CLI commands.

The general syntax for using global options is as follows:

```sh
croct <global-options> <command> <command-options>
```

> **Option order**
>
> Global options must be specified after `croct` and before the command name.

## Example

The following example demonstrates how to initialize a project with the `--cwd` global option to specify the working directory:

```sh
croct --cwd /path/to/project init
```

## Options

These are the available global options:

- `--cwd`: `string` (optional)

  The working directory.

- `--api-key`: `string` (optional)

  The API key to use for authentication.

  You can also set this using the `CROCT_API_KEY` environment variable.

- `--token`: `string` (optional)

  The token to use for authentication.

  You can also set this using the `CROCT_TOKEN` environment variable.

- `--registry`: `string` (optional)

  The template registry URL.

- `--no-interaction`: `boolean` (optional)

  Run the CLI in non-interactive mode.

  This is useful for CI/CD pipelines or when you want to automate CLI commands without any prompts.

- `--config`: `string` (optional) (default: croct.json5)

  The path to the configuration file.

  Use this option to specify a custom location for your configuration. For new projects, the file will be initialized at the specified path.

- `--stateless`: `boolean` (optional) (default: false)

  Run the CLI without saving any state locally.

  This means that the CLI won't store any configuration, authentication tokens, or other data on your machine, which can be useful for temporary sessions or when you want to ensure that no residual data is left after running commands.

  You can also set this using the `CROCT_STATELESS` environment variable.

- `--dnd`: `boolean` (optional) (default: false)

  Run the CLI with minimal interaction and interruption.

  You can also set this using the `CROCT_DND` environment variable.

- `--quiet, -q`: `boolean` (optional) (default: false)

  Disable output messages.

- `--debug`: `boolean` (optional)

  Enable debug mode.

## Explore

- [Configuration](/reference/cli/configuration): See the full configuration file format reference.
- [Commands](/reference/cli/commands): Browse all available CLI commands.
