# init

Learn how to configure your project.

This command initializes your project to integrate with our [SDKs](/reference/sdk). It provides an interactive walkthrough to configure your organization, workspace, applications, and SDK settings.

> **No account required**
>
> If you don't have an account yet, the CLI will create one for you during the setup process.

## Usage

This command has the following syntax:

```sh
croct init <options>
```

## Example

Initialize your project interactively:

```sh
croct init
```

Initialize with a specific SDK and skip the API key setup:

```sh
croct init --sdk next --skip-api-key-setup
```

## Options

Besides the [global options](../global-options), this command accepts the following options:

- `--override, -o`: `boolean` (optional)

  Override any existing configuration.

  By default, the CLI does not modify existing configuration files to prevent accidental data loss.

- `--new, -n`: `string` (optional)

  Forces the creation of new remote resources.

  By default, the CLI attempts to use existing resources defined in your configuration. Use this flag to ignore existing definitions and provision new entities on the platform instead. For example, if a workspace is already configured, specifying `--new workspace` will create a brand-new one within your current organization.

  | Resource                | Description                                               |
  | ----------------------- | --------------------------------------------------------- |
  | `organization` or `org` | Provision a new organization.                             |
  | `workspace` or `wor`    | Provision a new workspace within the active organization. |
  | `application` or `app`  | Provision a new application within the active workspace.  |

- `--sdk, -s`: `string` (optional)

  The SDK to use in the project.

  By default, the CLI attempts to detect the appropriate SDK based on the project structure. You can use this option to explicitly specify which SDK to configure.

  | SDK          | Description                                                |
  | ------------ | ---------------------------------------------------------- |
  | `javascript` | Configure the [JavaScript SDK](/reference/sdk/javascript). |
  | `react`      | Configure the [React SDK](/reference/sdk/react).           |
  | `vue`        | Configure the [Vue SDK](/reference/sdk/vue).               |
  | `next`       | Configure the [Next.js SDK](/reference/sdk/nextjs).        |
  | `nuxt`       | Configure the [Nuxt SDK](/reference/sdk/nuxt).             |

- `--skip-api-key-setup`: `boolean` (optional) (default: false)

  Skips the automatic API key generation and configuration.

  Some integrations, such as the [Next.js SDK](/reference/sdk/nextjs) and [Nuxt SDK](/reference/sdk/nuxt), require an API key for server-side features. By default, the CLI generates a key and saves it to your environment variables automatically. Use this flag if you prefer to provision or manage your keys manually.

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

- `--org`: `string` (optional)

  The slug of the organization.

  If omitted, the CLI will prompt you to select an organization from your account or create a new one.

- `--wor`: `string` (optional)

  The slug of the workspace.

  If omitted, the CLI will prompt you to select a workspace or create a new one.

- `--dev-app`: `string` (optional)

  The slug of the development application.

  If omitted, the CLI will prompt you to select an application or create a new one for development.

- `--prod-app`: `string` (optional)

  The slug of the production application.

  If omitted, the CLI will prompt you to select an application or create a new one for production.

## Explore

- [Configuration](/reference/cli/configuration): See the full configuration file format reference.
- [Install](/reference/cli/commands/install): Learn how to install content and types for your project.
- [Type generation](/reference/cli/type-generation): Learn how the CLI generates type definitions.
- [Fallback content](/reference/cli/fallback-content): Learn how the CLI manages fallback content.
