> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cognite.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Cognite Data Fusion (CDF) is an industrial DataOps platform. Prefer English docs unless the user asks for another locale.
> Follow /_llms/ index links recursively until you reach page URLs ending in .md. Fetch those Markdown twins instead of HTML.
> For REST APIs, default to calendar version 20230101 (stable). Use 20230101-beta or 20230101-alpha only if the user is on a preview API. Cite paths under /api-reference/concepts/<version>/ and the Cdf-Version header. Prefer the Python SDK (cognite-sdk) unless the user is in JavaScript/TypeScript.
> Start here by task: platform overview /cdf/index.md; data modeling /cdf/dm/index.md; data integration /cdf/integration/index.md; access /cdf/access/index.md; CDF Toolkit /cdf/deploy/cdf_toolkit/index.md; REST quickstart /dev/quickstart.md; Python SDK https://cognite-sdk-python.readthedocs-hosted.com/en/stable/; Atlas AI /cdf/atlas_ai/concepts/index.md; Flows apps /cdf/flows/index.md; MCP and IDE setup /dev/guides/ide_ai_integration.md.
> For implementation work, also load /skill.md.

# Initializing a Cognite Toolkit project

> Use cdf init to create cdf.toml, sign-in credentials, a modules directory, and CI/CD pipeline files for a new Cognite Toolkit project.

`cdf init` sets up a new Cognite Toolkit project. A Cognite Toolkit administrator runs it once, in an empty directory, to create the Git repository that data engineers later commit to.

Install the Cognite Toolkit CLI first. See [Set up locally](https://docs.cognite.com/cdf/deploy/cdf_toolkit/guides/setup.md).

**1. Start the wizard**

Open a terminal in an empty directory and run:

```shell theme={"languages":{"custom":["/_languages/kuiper.json"]}}
cdf init
```

The wizard lists four tasks. Only **Create toml file** is required. You can rerun a task, and you can quit and come back later. When the required task has succeeded, quitting prints `Setup complete!`.

```shell theme={"languages":{"custom":["/_languages/kuiper.json"]}}
$ cdf init
? Select a task: (Use arrow keys)
   ✓ Create toml file (required)
 » ○ Authentication
   ○ Modules
   ○ Git repository
   > Quit
```

**2. Create the cdf.toml file**

Select **Create toml file**. The Cognite Toolkit asks for an optional subdirectory:

```text theme={"languages":{"custom":["/_languages/kuiper.json"]}}
Enter an optional subdirectory for Toolkit content.
    HINT Use an organization directory if you use the
         repository for more than Toolkit.
    The current directory is the default.
```

Press Enter to use the current directory. If this repository will hold more than Cognite Toolkit configuration, enter a subdirectory name. The command writes `cdf.toml` there. That file sets the CLI version and optional features. See [`cdf.toml`](https://docs.cognite.com/cdf/deploy/cdf_toolkit/api/cdf_toml).

If `cdf.toml` already exists, the wizard skips this task.

**3. Set up authentication**

Select **Authentication**. This runs the same wizard as `cdf auth init`.

Choose a device-code or interactive sign-in flow for local development. Choose client credentials for a CI/CD service account. The wizard writes a `.env` file and checks that the credentials can reach Cognite Data Fusion (CDF).

> [!WARNING]
>
> The `.env` file contains secrets. Do not commit it. The Cognite Toolkit `.gitignore` excludes it.

See [Authenticating with the Cognite Toolkit](https://docs.cognite.com/cdf/deploy/cdf_toolkit/getting_started/auth.md) for the sign-in commands, and [Authentication and authorization](https://docs.cognite.com/cdf/deploy/cdf_toolkit/guides/auth.md) for how to register the identity provider application.

**4. Select modules**

Select **Modules**. This runs the same wizard as `cdf modules init`.

You pick one or more deployment packs, then the environments to create. **dev** and **prod** are selected by default. **staging** is optional. If a module includes example data, the wizard asks whether to download it.

The command creates a `modules/` directory and a `config.<environment>.yaml` file for each environment you select. You can add more packs later with `cdf modules add`. See [Working with modules](https://docs.cognite.com/cdf/deploy/cdf_toolkit/getting_started/modules.md) and [Deployment packs](https://docs.cognite.com/cdf/deploy/cdf_toolkit/references/packages.md).

**5. Add the Git repository files**

Run `git init` in the project directory before this task. If the directory is not a Git repository, the Cognite Toolkit warns you and continues.

Select **Git repository**. The wizard asks where you host the repository:

* **GitHub** copies `.github/workflows/` pipeline files.
* **Azure DevOps** copies `.devops/` pipeline files.
* **Other** and **None** skip the pipeline template. Set up the pipeline yourself. See [CI/CD](https://docs.cognite.com/cdf/deploy/cdf_toolkit/guides/cicd.md).

Every option copies `.gitignore` and `.env.tmpl`. Existing files are left in place. If `.gitignore` already exists, the command appends only the entries that are missing.

The same files are what `cdf repo init` writes. After the pipelines exist, connect them to your Git host. See [GitHub](https://docs.cognite.com/cdf/deploy/cdf_toolkit/guides/cicd/github_setup.md) or [Azure DevOps](https://docs.cognite.com/cdf/deploy/cdf_toolkit/guides/cicd/ado_setup.md).

## Next steps

Sign in and check what your credentials can change. See [Authenticating with the Cognite Toolkit](https://docs.cognite.com/cdf/deploy/cdf_toolkit/getting_started/auth.md).

If you added a deployment pack, set its variables, then build and deploy. See [Working with modules](https://docs.cognite.com/cdf/deploy/cdf_toolkit/getting_started/modules.md).
