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

# lean config set

[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 config set

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

## Introduction

Set a configurable option.

```
$ lean config set [OPTIONS] KEY VALUE
```

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

Updates the value of a configurable option in your [global configuration](https://www.quantconnect.com/docs/v2/lean-cli/initialization/configuration.md#02-Global-Configuration) directory. The command aborts with a descriptive error message if the given value is invalid for the given key.

The following keys can be set:

| Key | Description |
| --- | --- |
| `user-id` | The user Id used when making authenticated requests to the QuantConnect API. |
| `api-token` | The API token used when making authenticated requests to the QuantConnect API. |
| `default-language` | The default language used when creating new projects (must be either `python` or `csharp`). |
| `engine-image` | The Docker image used when running the LEAN engine (`quantconnect/lean:latest` if not set). |
| `research-image` | The Docker image used when running the research environment (`quantconnect/research:latest` if not set). |

## Arguments

The `lean config set` command expects the following arguments:

| Argument | Description |
| --- | --- |
| `<key>` | The key of the option to update. |
| `<value>` | The new value for the option with the given key. |

## Options

The `lean config set` command supports the following options:

| Option | Description |
| --- | --- |
| `--verbose` | Enable debug logging |
| `--help` | Display the help text of the `lean config set` command and exit |
