> For the complete documentation index, see [llms.txt](https://vostok.gitbook.io/configuration/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vostok.gitbook.io/configuration/sources/command-line-source.md).

# Command line source

**Location**: [main sources module](/configuration/modules/sources.md).

[**CommandLineSource**](https://github.com/vostok/configuration.sources/blob/master/Vostok.Configuration.Sources/CommandLine/CommandLineSource.cs) converts CLI arguments into settings nodes.

```
public static void Main(string[] args)
{
    var source = new CommandLineSource(args);
}
```

It supports 7 syntax options for key-value parameters:

* `--key=value`
* `--key value`
* `-key=value`
* `-key value`
* `/key=value`
* `/key value`
* `key=value`

Keys with dots (such as `a.b.c`) are treated as hierarchical and get split into segments:

```
--throttling.capacity=50 --> { "throttling": { "capacity": "50" } }
```

Multiple occurrences of the same key are merged into arrays.

This source is static and never issues data updates.

### Default keys and values

Standalone keys may optionally be supplied with a default value.

Standalone values may optionally be grouped under default key.

```
var source = new CommandLineSource(args, "main", "true");

--enable --> { "enable": "true" }
100 200 --> { "main": ["100", "200"] }
```

### Related pages

{% content-ref url="/pages/-M6UQMklC2EtQ\_nAUDjI" %}
[Configuration sources](/configuration/concepts-and-basics/configuration-sources.md)
{% endcontent-ref %}
