Global options
Explore the options available to all CLI commands.
The general syntax for using global options is as follows:
croct <global-options> <command> <command-options>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:
npx croct@latest --cwd /path/to/project initOptions
These are the available global options:
- --cwd(optional)string
The working directory.
- --api-key(optional)string
The API key to use for authentication.
You can also set this using the CROCT_API_KEY environment variable.
- --token(optional)string
The token to use for authentication.
You can also set this using the CROCT_TOKEN environment variable.
- --registry(optional)string
The template registry URL.
- --no-interaction(optional)boolean
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(optional)string
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.
Default:croct.json5- --stateless(optional)boolean
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.
Default:false- --dnd(optional)boolean
Run the CLI with minimal interaction and interruption.
You can also set this using the CROCT_DND environment variable.
Default:false- --quiet, -q(optional)boolean
Disable output messages.
Default:false- --debug(optional)boolean
Enable debug mode.