---
title: "lean init"
description: "API reference for the command `lean init` in command line console."
canonical: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-init
markdown: https://www.quantconnect.com/docs/v2/lean-cli/api-reference/lean-init.md
language: python
source: https://github.com/QuantConnect/Documentation/tree/master/05%20Lean%20CLI/99%20API%20Reference/30%20lean%20init
modified: 2026-10-29
index: https://www.quantconnect.com/llms.txt
---

# lean init

[Documentation](https://www.quantconnect.com/docs/v2.md) > [Lean CLI](https://www.quantconnect.com/docs/v2/lean-cli.md) > [API Reference](https://www.quantconnect.com/docs/v2/lean-cli/api-reference.md) > lean init

> Code examples are shown in Python. Append `?lang=csharp` to this URL for the C# version of this page.

## Introduction

Scaffold a Lean configuration file and data directory.

```
$ lean init [OPTIONS]
```

To use the CLI, you must be a member in an [organization](https://www.quantconnect.com/docs/v2/cloud-platform/organizations/tier-features.md) on a paid tier.

## Description

Fills the current directory with all the files needed to get going. It'll create a Lean configuration file and a data directory containing some sample data. To view a full list of the created files, see [Directory Structure](https://www.quantconnect.com/docs/v2/lean-cli/initialization/organization-workspaces.md#03-Directory-Structure).

## Options

The `lean init` command supports the following options:

| Option | Description |
| --- | --- |
| `--organization <string>` | The name or id of the organization the Lean CLI will be scaffolded for |
| `-l, --language <enum: python\|csharp>` | The default language to use for new projects |
| `--verbose` | Enable debug logging |
| `--help` | Display the help text of the `lean init` command and exit |
