# Configuration

> The config file, its precedence, per-profile Regions and fetch strategy.

## Create the config file

```bash
ssm-explorer config init
```

This writes `~/.config/ssm-explorer/config.toml`. Use another file with
`--config /path/to/file.toml` or the `SSM_EXPLORER_CONFIG` environment
variable. The repository's `config.example.toml` documents every option.

```bash
ssm-explorer config path    # where the active file is
ssm-explorer config show    # the effective settings
ssm-explorer config set aws.profile my_dev_profile
```

## Precedence

From highest to lowest:

1. Command-line flags, such as `--profile prod --decrypt`.
2. The TOML config file.
3. Environment variables, such as `SSM_EXPLORER_SEARCH_DECRYPT=false`.
4. Built-in defaults.

## A Region per profile

Map each AWS profile to its Region once; afterwards `--profile` is enough.

```toml
[aws]
profile = ""
region = ""

[aws.profiles.prod_account]
region = "eu-west-1"

[aws.profiles.dev_account]
region = "us-east-2"
```

## Fetch strategy

`search.fetch_strategy = "auto"` (the default) lists names with
`DescribeParameters` in pages of 50, then fetches values in parallel
`GetParameters` batches of 10. If IAM denies those calls it falls back to
`GetParametersByPath`. Set `"path"` to use the single-call path for every request.

Client-side rate limits default to 20 `GetParameters` and 3
`DescribeParameters` calls per second, to stay under standard Parameter
Store quotas.

Source: https://douklar.app/docs/ssm-explorer/configuration (SSM Explorer docs, last checked 2026-10-17)
