The CLI stores its persistent configuration in various places depending on the context of the configuration. We make the distinction between global configuration, Lean configuration, and project configuration, all of which store a specific subset of configurable properties.

Global Configuration

The global CLI configuration directory stores the CLI defaults and API credentials. The exact location of the directory depends on your operating system. The following table shows the path of each operating system:

Operating SystemPath

The global CLI configuration directory contains three files and one directory. The following table describes the files and directory:

credentialsThis file contains the API credentials given via lean login.
configThis file contains the CLI defaults, like the default project language used when running lean create-project.
cacheThis file contains an internal cache that the CLI uses whenever it needs to persistently store data. One of its uses is to store the last time an update check has run to make sure we don't check for updates too often.
sshThis directory contains the SSH keys that are needed to debug over SSH when debugging with Rider.

The global configuration files are always updated via the CLI and should not be updated or removed manually, unless when you are uninstalling the CLI.

Lean Configuration

The Lean configuration contains settings for running the LEAN engine locally. This configuration is created in the lean.json file when you run lean init in an empty directory. The configuration is stored as JSON, with support for both single-line and multiline comments.

The Lean configuration file is based on the Launcher/config.json file from the Lean repository. When you run lean init, the latest version of this file is downloaded and stored on your local drive. Before the file is stored, some properties are automatically removed because the CLI sets them automatically.

Project Configuration

For information about project configuration, see Projects > Configuration.

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: