API Reference

lean create-project

Introduction

Alias for 'project-create'

$ lean create-project [OPTIONS] NAME

Description

Creates a new project with some basic starter code. If the language is set to python, this generates a main.py file, a Python-based research notebook, a project configuration file, and editor configuration files for PyCharm and VS Code.

If the language is set to csharp this generates a Main.cs file, a C#-based research notebook, a project configuration file, and editor configuration files for Visual Studio, Rider, and VS Code.

A full list of the created files can be found on the Projects > Structure page.

If no --language is given, the default language saved in the global configuration is used. You can update the default language to Python by running lean config set default-language python or to C# by running lean config set default-language csharp.

If the given project name contains slashes, the name is parsed as a path and the project is created in a subdirectory. Any subdirectories that don't exist yet are created automatically.

Arguments

The lean create-project command expects the following arguments:

ArgumentDescription
<name> The name of the project to create. This name may contain slashes to create a project in a subdirectory. The project name must only contain -, _, letters, numbers, and spaces. The project name can't start with a space or be any of the following reserved names: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, or LPT9. If the project is a Python library, the library name can only contain letters (a-z), numbers (0-9), and underscores (_). Python library names can't contain spaces or start with a number.

Options

The lean create-project command supports the following options:

OptionDescription
-l, --language <enum: python|csharp>The language of the project to create
--verboseEnable debug logging
--helpDisplay the help text of the lean create-project command and exit

You can also see our Videos. You can also get in touch with us via Discord.

Did you find this page helpful?

Contribute to the documentation: