dapr / dapr/cli

Proposal: Create a CLI config file

Open
#1,058 3 comments 1 reaction 0 assignees View on GitHub
discussion kind/proposal pinned
Dominant language
Go
Stars
353
Forks
221
Avg merge
3d 8h
Merged PRs (30d)
2

Description

## Describe the proposal

Currently a lot of commands in the dapr cli have a myriad of flags/environment variables and defaults and further more, more issues are there in the backlog asking for more configurability.

The current way the CLI works is that it is split from the runtime. Once CLI is init, then runtime binary can be installed in specific locations in Linux/Mac or Windows using the `dapr init` command. Furthermore the default places to look for `components` and `configurations` are within the `~/.dapr` folder, with the only way to override being flags or env var.

Additionally there are multiple variants of `dapr` available, `distroless` vs `mariner`.

Also there are multiple different config options available for most of the commands `init, run, mtls renew` etc.

The proposal here is to create a single config file where defaults are well defined and user modifiable. The CLI config file is the one the dapr CLI uses for setting defaults, locating default configuration/resources directory, setting default runtime, locating binaries in install path, supporting and choosing default `daprd` version etc.

Also we need to define clear precedence rules, wherein the CLI config file is default, with environment vars overriding it and them being overridden by flags for a specific command.

The location of the CLI config file say `.dapr_cli.yaml` will be based on the default config locations for each platform.

cc @artursouza @yaron2 thoughts?

## Release Note

RELEASE NOTE:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.